REST Example: Creating a Subscription with Plan
Overrides
Request
12345678910111213141516171819202122{"subscriptionInformation": { "planId": "1619214515", "name": "SubName With Overrides", "startDate": "2023-04-16T17:01:42Z", "originalTransactionId”: “016153570198200" }, "planInformation": { "billingCycles": { "total": "3" } }, "orderInformation": { "amountDetails": { "billingAmount": "13.14", "setupFee": "1.27" } }, "paymentInformation": { "customer": { "id": "C09F227C54F94951E0533F36CF0A3D91" } }}
Response to a Successful Request
1234567891011121314151617181920{"_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" }}
Error Response to a Failed Request
12345678910{"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" } ]}