Create an active subscription with a pending charge through the REST API
This task guides you through creating an active subscription with a pending charge using the REST API by specifying necessary fields and using the "Create an order" operation.
To create an active subscription with a pending charge, use the Create an order operation to perform a Create Subscription order action as follows:
- Determine the values of the following fields:
Variable
Description
statusThe status of the order. To create an active subscription with pending charges, you must specify the
statusfield toCompleted.ContractEffectiveThe date of the contract that governs the subscription. To create an active subscription with pending charges, you must specify this field.
ServiceActivationThe date on which the services or products within a subscription have been activated and access has been provided to the customer. To create an active subscription with pending charges, you must specify this field.
CustomerAcceptanceThe date on which the services or products within a subscription have been accepted by the customer. To create an active subscription with pending charges, you must specify this field.
triggerEventThe trigger condition for the charge to become active. To create an active subscription with pending charges, you must specify the
triggerEventfield toSpecificDatebut without specifying a value in thespecificTriggerDatefield.estimatedStartDateThe estimated start date for the pending charge. Set the
estimatedStartDatefield as you want and note that this date must be a date within the subscription term. The system will then automatically calculate and determine the estimated end date for the pending charge. The estimated start and end dates are used to manage the estimated charge duration and forecast the revenue for the pending charge. - Use the "Create an order" operation to create an active subscription with a pending charge:
Request
POST /v1/orders/Request Body
{ "existingAccountNumber": "A00000001", "status":"Completed", "orderDate": "2024-07-03", "subscriptions": [ { "orderActions": [ { "type": "CreateSubscription", "triggerDates": [ { "triggerDate": "2024-08-29", "name": "ContractEffective" }, { "name": "ServiceActivation", "triggerDate": "2024-08-29" }, { "name": "CustomerAcceptance", "triggerDate": "2024-08-29" } ], "createSubscription": { "terms": { "initialTerm": { "startDate": "2024-07-03", "period": 6, "periodType": "Month", "termType": "TERMED" }, "renewalTerms": [ { "period": 1, "periodType": "Month" } ], "autoRenew": false, "renewalSetting": "RENEW_WITH_SPECIFIC_TERM" }, "subscribeToRatePlans": [ { "productRatePlanId": "f5cf07304ce942618c7429befc0e0000", "chargeOverrides": [ { "productRatePlanChargeId": "f5cf07304ce942618c7429bf83b30003", "estimatedStartDate": "2024-09-27", "startDate": { "triggerEvent": "SpecificDate" } } ] } ] } } ] } ] }