Amending a Subscription
Subscriptions store customer details using a Token Management Service (TMS) token and
have an assigned payment plan. Subscriptions consist of this information:
- Subscription code
- Use thesubscriptionInformation.codeREST API field to specify an amended value.
- Subscription name
- Use thesubscriptionInformation.nameREST API field to specify an amended value.
- Start date
- Use thesubscriptionInformation.startDateREST API field to specify an amended value.
- Token Management Service (TMS) token
- You cannot change this information.
- Plan: standard or one-time
- Astandard planis created and stored within the recurring billing service for re-use. You can assign these plans to multiple subscriptions.
- Aone-time planis created specifically for a single subscription, and you create the plan when you create the subscription. A one-time plan does not include a plan code, plan name, or plan description.
IMPORTANT
The subscription information that you can amend
depends on the status of the subscription. Note the limitations described in in the paragraphs that follow.
IMPORTANT
When you change the plan ID (
subscriptionInformation.planId
field) assigned to a subscription,
the first payment is processed immediately.
If proration is required after the change, it must be managed
outside of the recurring billing service.REST Example: Switching a Subscription to a Different Plan
Request
12345678910{"subscriptionInformation": { "planId": 7379850138646475304951, "name": "Update Sub Name - Switch Plan 6192115800926177701960", "code":"1619215852Code" }, "orderInformation": { "amountDetails": { "billingAmount": "13.23" } }}
Response to a Successful Request
1234567891011121314151617181920{"_links": { "self": { "href": "/rbs/v1/subscriptions/1619215852", "method": "GET" }, "update": { "href": "/rbs/v1/subscriptions/1619215852", "method": "PATCH" }, "cancel": { "href": "/rbs/v1/subscriptions/1619215852/cancel", "method": "POST" } }, "id": "1619215852", "status": "COMPLETED", "subscriptionInformation": { "code": "1619215852Code", "status": "PENDING" }}
Error Response to a Failed Request
123456789{"status": "INVALID_REQUEST", "reason": "INVALID_DATA", "message": "One or more fields in the request contains invalid data.", "details": [ { "field": "subscriptionInformation.code", "reason": "DUPLICATE" } ]}