Skip to main content
In the Bango Platform, entitlements describe a user’s ability to access a service provided by a merchant. You can cancel an entitlement to stop the user accessing the service at the end of the period for which they have already paid. To restore access, where supported by the merchant and service, you reactivate the entitlement by making a POST request to the Bango Resale API supplying the entitlement ID in the path. 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 2xx responses, the entitlement record.
Depending on merchant requirements and potentially other factors, the response code might indicate that your code needs to take some action as a result of the reactivation request. For example, the reactivation might require the user to visit a web page to perform a process. In this case the entitlement record returned has status PENDING, and any later change to status ACTIVE is POSTed to the entitlement’s notificationUrl, if specified. Sequence diagrams Reactivation with no further action required The Bango Platform reactivates the entitlement and the user does not have to perform a process. The entitlement status changes to ACTIVE. Reactivate with required user process The merchant requires the user to perform a process. 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. Failed request to reactivate entitlement The Bango Platform can’t reactivate the entitlement, and returns the reason in the response to the API request.

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 Which request parameters should I set? The only parameter is the entitlement ID, passed in the path of the request URL. 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. See Bango Resale / End of Life / Entitlement reactivation API for detailed information on all responses.