PUT request to the Bango Payment API, specifying the transaction ID. Some payment providers require capture to take place only after a purchased item is shipped or delivered: for physical goods, this means there may be significant time between authorization and capture. Note that an authorized payment that has not been captured typically means the user has not been charged.
If supported by a payment provider, you can capture partial payment if you need to. Here, the user pays less than the authorized amount.
After successfully capturing a payment, the transaction is marked as complete. Any further capture requests for the transaction will fail, even if you captured partial payment. In the partial payment case, to capture the rest of the payment you must authorize a new payment.
As part of the API request, you supply:
- The transaction ID
- Optionally, a structure representing the item the user is purchasing (required for partial capture only)
- Optionally, custom transaction data
Sequence diagrams
Successful capture
Successful capture
The Bango Platform successfully captures payment:
Failed capture
Failed capture
The Bango Platform fails to capture 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. This means the user is charged the full amount for the purchase (the price specified when the payment was authorized). To support partial capture, you would pass a body parameter that specifies a replacement
paymentItems structure where the grossAmount and/or taxAmount is less than the original.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.
