Pain management in chinchillas used to be a very difficult part of veterinary medicine. Routinely, people would try to crush up baby aspirin and mix it with water to give orally. Butorphanol was also used, but only in the injectable form and with unknown side effects on the gastrointestinal tract. My favorite pain medication is meloxicam (brand name Metacam). I have been using meloxicam for over 10 years now in chinchillas as well as other small mammals and rabbits. 

Meloxicam is a non-steroidal anti-inflammatory (NSAID) and is available as an oral solution (1.5 mg/ml or 0.5 mg/ml). It is also currently available in the generic form, Meloxidyl, which is somewhat less expensive, but still a liquid suspension. The brand name as well as the generic are still only labelled for use in dogs, so when this medication is prescribed to a chinchilla, it is considered "off-label" use. (Pretty much every medication we use in small mammals is considered "off-label" because the pharmaceutical companies do not usually spend money on research studies to get medications approved for use in rabbits and rodents). The most common listed side effects are gastrointestinal abnormalities such as inappetance and soft stools. This is very important because these side effects can be deadly in chins if they are not noticed. I have yet to see any side effects in my home or practice, but I always warn everyone that you never know when they could occur.  Always contact your veterinarian before using any medications for your chinchillas.