Skip to main content
The Bango Platform currently supports a number of different payment methods, and more may be added. To determine which payment methods are available for a particular user at the time of purchase, and perhaps limit the payment methods to a subset of those supported, you can make an 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
The API response is a structure that contains:
  • Either the payment methods you can use (for display in your user interface)
  • Or a reason why the purchase is not possible
A purchase might not be possible if, for example, the user has exceeded a spending limit. The response is time-sensitive: the available payment methods may change over time. For example, the user may exceed the spending limit by other means. Avoid caching responses for too long, to avoid transaction errors later.

Sequence diagrams

The Bango Platform determines that the purchase is possible, and includes the available payment methods in the API response:
The Bango Platform determines that the purchase isn’t possible, and supplies a reason:

Skeleton code

FAQ

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.
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.