Wait until the purchase has completed and then ask for a refund. You cannot cancel purchases with Apple, you can only ask for refunds and that can't happen until the purchase has completed.
Here's how to request an app or media refund from Apple (From: Request a refund for apps or content that you bought from Apple - Apple Support - see the article for more detail.)
1. Sign in to https://reportaproblem.apple.com
2. Tap or click "I'd like to," then choose "Request a refund."
3. Choose the reason why you want a refund, then choose Next.
4. Choose the app, subscription, or other item, then choose Submit.
If you were charged for a subscription that you no longer want, you can also cancel the subscription using the directions in this article --> If you want to cancel a subscription from Apple - Apple Support