On This Page
REST Example: Create a Subscription with Plan Overrides
This example creates a subscription that overrides part of an existing plan.
For example, you can use an existing plan with an indefinite duration and a specific amount, and then,
for a given subscription, specify the number of remaining billing cycles.
Request
{ "planInformation": { "billingCycles": { "total": "5" } }, "subscriptionInformation": { "planId": "6868912495476705603955", "name": "Subscription with plan id and new number of billing cycles", "startDate": "2025-08-10", "originalTransactionId": "123456789", "originalTransactionAuthorizedAmount": "0.00" }, "paymentInformation": { "customer": { "id": "C24F5921EB870D99E053AF598E0A4105" } } }
Example Response to a Successful Request
{ "_links": { "self": { "href": "/rbs/v1/subscriptions/1619214795", "method": "GET" }, "update": { "href": "/rbs/v1/subscriptions/1619214795", "method": "PATCH" }, "cancel": { "href": "/rbs/v1/subscriptions/1619214795/cancel", "method": "POST" } }, "id": "1619214795", "status": "COMPLETED", "subscriptionInformation": { "code": "AWC-48", "status": "PENDING" } }
Example Response to a Failed Request
{ "status": "INVALID_REQUEST", "reason": "DUPLICATE_REQUEST", "message": "Duplicate requests are not supported within 15 minutes.", "details": [ { "field": "subscriptionInformation.planId or paymentInformation.customer.id or subscriptionInformation.startDate or subscriptionInformation.name", "subscriptionId": "1619214795", "reason": "INVALID_DATA" } ] }