OPTIONS request to the Bango Payment API. The response includes information to help you improve the user experience.
As part of the API request, you supply:
- The user’s identified Bango ID
- A structure representing the item the user wants to purchase
- Optionally, the payment methods you would like to be offered
- Optionally, custom transaction data
- Either the payment methods you can use (for display in your user interface)
- Or a reason why the purchase is not possible
Sequence diagrams
Purchase is possible
Purchase is possible
The Bango Platform determines that the purchase is possible, and includes the available payment methods in the API response:
Purchase is not possible
Purchase is not possible
The Bango Platform determines that the purchase isn’t possible, and supplies a reason:
Skeleton code
FAQ
Which request parameters should I set?
Which request parameters should I set?
You must set the
bangoUserId and paymentItems parameters, to allow the Bango Platform to check whether the user is permitted to purchase the item, and to check whether the prices are supported price points for the payment provider.You can omit paymentMethods if you want the Bango Platform to consider all possible payment methods.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. For each distinct responseCode, the response might include other useful values.The most interesting case is when responseCode is OK. In this case, the response object includes a property availablePaymentMethods that describes which payment methods are permitted for the purchase.See Bango Payment / Merchant API reference / API reference overview for detailed information on all responses.
