DELETE request to the Bango Payment API, specifying the transaction ID.
Some payment providers may not support full or partial refunds.
As part of the API request, you supply:
- The transaction ID
- Optionally, a structure representing the item the user is purchasing (required for partial refunds only)
- Optionally, custom transaction data
Sequence diagrams
Successful cancellation
Successful cancellation
The Bango Platform successfully cancels authorization for a payment that is not yet captured:
Successful refund
Successful refund
The Bango Platform successfully refunds a captured payment:
Failed cancellation or refund
Failed cancellation or refund
The Bango Platform fails to cancel authorization or refund payment:
Skeleton code
FAQ
Which request parameters should I set?
Which request parameters should I set?
In the skeleton code above, the transaction ID is specified as a path parameter but no body parameters are included in the request. For refunds, this means the user is refunded the full amount for the purchase (the price specified when the payment was captured). To support partial refund, you would pass a body parameter that specifies a replacement
paymentItems structure where the grossAmount and/or taxAmount is less than the original. For authorized but not captured payments, only full cancellation is possible.You could also pass a body parameter that defines an externalTransactionId for the transaction.See Bango Payment / Merchant API reference / API reference overview for detailed information on all request parameters.What are all the possible API response structures?
What are all the possible API response structures?
All responses contain a
responseCode string that indicates the result of the request. Use this code to determine how to react.See Bango Payment / Merchant API reference / API reference overview for detailed information on all responses.
