If you do not use a gift card purchased through a "Pay with app" offer within 4 hours, it will be canceled automatically. If you've used the gift card or already cashed out your earnings from the offer, you won't be able to cancel it.
Note: Depending on your bank, it may take up to 7 days for them to return the funds to your account.