Coupon codes are intended for one-time use only and shall be treated as used even if you cancel the order.
If you had redeemed reward points for an order, the same will be credited back to your account in the case of a cancellation.
In case you used gift card amount, the same would be credited back to your gift card in the case of a cancellation.