If it's an auto-renewing subscription you can turn off its auto-renewal : View, change, or cancel your subscriptions - Apple Support
You can also prevent any in-app purchase via Settings > General > Restrictions on the device
For what you've just purchased, and though purchases are considered final, you could try the 'report a problem' page to contact iTunes Support and see if they will refund or credit you : http://reportaproblem.apple.com