Skip to main content
In the Bango Platform, entitlements describe a user’s ability to access a service provided by a merchant. To request service access for a user, you create an entitlement by making a POST request to the Bango Resale API. As part of the API request, you supply: The API response is a structure that contains:
  • A response code, indicating the result of the request. Use this code to determine what to do next.
  • For HTTP 200 responses, the entitlement record, including any custom data you’ve supplied.
For some services, the status of the new entitlement is ACTIVE and the user can access the service immediately. For others, the status is PENDING, which means the merchant won’t activate the service until a process is complete. This process might include actions by the user: for example, registering for the service. In this case the response code indicates what your code should do (for example, send the user to a web page), and the response contains any extra data required (for example, a registration URL).

Sequence diagrams

The Bango Platform activates the service for the user immediately, returning an entitlement with status ACTIVE.
Image
The merchant requires the user to perform a process such as registration. The Bango Platform returns an entitlement with status PENDING, with the response code CLIENT_ACTION_REQUIRED and action NAVIGATE_TO_URL, together with the target URL. You send the user to the URL, and when the user completes the process the Bango Platform notifies you by direct server-to-server communication.
Image
The Bango Platform can’t activate the service for the user, and returns the reason in the response to the API request.
Image

Skeleton code

Here’s some sample code in a C/Java-like language: adapt this code to your needs. Use the same API endpoint prefix with test credentials and with production credentials. Some functions referenced in the skeleton code, such as redirect_device_to, are not defined. You need to implement these where possible.

FAQ

You must set the customerIdentifier, merchantAccountKey, and productKey parameters, to identify the merchant service and the user.Some merchants may also require you to set the offerKey parameter.Bango recommends you set the notificationUrl to receive asynchronous notifications from the Bango Platform.See Bango Resale / For resellers / Reseller API reference / Reseller API reference overview for detailed information on all request parameters.
Use your own system’s unique identifier for the user. The Bango Platform treats this as an opaque string.
The merchantAccountKey and productKey parameters, and (depending on the merchant) the offerKey parameter, together identify the service you want to allow the user to access.Bango maintains the allowed values for these keys. When you have an agreement with a merchant to resell a service, Bango will let you know which values to use. The Bango Platform ensures you can only create entitlements for authorized services.For testing, use special values for these keys. See Bango Resale / For resellers / Testing.
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.See Bango Resale / For resellers / Reseller API reference / Reseller API reference overview for detailed information on all responses.