Change a subscription's plan
Use this endpoint to change a subscription’s plan immediately or at a later date, given the unique identifier allocated by Bango for the subscription. This endpoint returns the updated subscription record.
To identify the plan, specify both the plan name and the merchant account key for the provider of the product or service.
Specify the date on which the plan should change by including either the billingPolicy or requestedDate parameters.
Authorizations
Base64 encoding of username:password as supplied by Bango Support
Headers
An arbitrary, optional, globally unique identifier for the request. If present, this ID is used for idempotency.
Path Parameters
The unique identifier generated by Bango for a subscription. The unique identifier generated by Bango for a subscription. This is a globally unique, opaque string
"123e4567-e89b-12d3-a456-426614174000"
Body
Data for changing a subscription's plan.
The unique identifier for the merchant supplying the product or service. Bango assigns these identifiers
"BANGO_ENTERTAINMENT"
When attempting a productName update, a planName must also be specified. The product catalog defines these identifiers
"bango-music"
The unique identifier for the plan detailing the prices and offer periods associated with the subscription. Bango use NCName type which means that the planName cannot contain several symbol characters like :, @, $, %, &, /, +, ,, ;, whitespace characters or different parenthesis.
"bango-music-3-months-free"
When the change of plan becomes effective. (Include either this parameter or requestedDate - not both.)
START_OF_TERM, END_OF_TERM, IMMEDIATE When the change of plan becomes effective. (Include either this parameter or billingPolicy - not both.)
Arbitrary key-value pairs, where values are always strings. API consumers can use this to store custom data for the subscription.
Response
Subscription found and updated
A subscription record in the Bango Platform
Always 'OK'
OK "Success"
The unique identifier generated by Bango for a subscription. This is a globally unique, opaque string
"123e4567-e89b-12d3-a456-426614174000"
The Bango user identifier. This is a globally unique, opaque string.
"1234567890"
An optional unique identifier for the subscription, meaningful to the API consumer. This must be a globally unique, opaque string.
Use this identifier as an alternative to the subscriptionId assigned by Bango.
"my-external-identifier"
The YYYY-MM-DD UTC date on which the subscription entitlement starts
"2020-08-19"
The unique identifier for the merchant supplying the product or service. Bango assigns these identifiers
"BANGO_ENTERTAINMENT"
The unique identifier for the product or service the user is subscribing to. The product catalog defines these identifiers. The first character of the planName can't be a number.
"bango-music"
Arbitrary key-value pairs, where values are always strings. API consumers can use this to store custom data for the subscription.
How frequently the user is billed. For the avoidance of doubt:
- BIWEEKLY = every 2 weeks
- BIMESTRIAL = every 2 months
- BIANNUAL = every 6 months
- BIENNIAL = every 2 years
MONTHLY, DAILY, WEEKLY, BIWEEKLY, THIRTY_DAYS, SIXTY_DAYS, NINETY_DAYS, BIMESTRIAL, QUARTERLY, TRIANNUAL, BIANNUAL, ANNUAL, BIENNIAL, NO_BILLING_PERIOD TRIAL, DISCOUNT, FIXEDTERM, EVERGREEN The unique identifier for the plan detailing the prices and offer periods associated with the subscription. Bango use NCName type which means that the planName cannot contain several symbol characters like :, @, $, %, &, /, +, ,, ;, whitespace characters or different parenthesis.
"bango-music-3-months-free"
The current state of a subscription.
A subscription starts in ACTIVE if it's created with entitlementStartDate set to today's date or a past date. It starts in PENDING if entitlementStartDate is set to a future date, and automatically transitions to ACTIVE on that date.
A subscription is CANCELLED when the user no longer has access to the product or service. (A subscription scheduled to be cancelled at a future date is still ACTIVE until that date, and until then it can be uncancelled.)
ACTIVE, PENDING, CANCELLED If not null, the effective YYYY-MM-DD UTC date of cancellation. Might be a date in the future. If null, the subscription has not been cancelled.
The YYYY-MM-DD UTC date up to which the subscription has been paid for.
The YYYY-MM-DD UTC date on which billing starts or started.
If not null, the YYYY-MM-DD UTC date on which billing ends or ended. If null, billing has not ended.
1
Details of a single payment. For nextPayment, this is the next payment scheduled to occur. For lastPayment, this is the most recent successful payment.
Details of a single payment. For nextPayment, this is the next payment scheduled to occur. For lastPayment, this is the most recent successful payment.

