On This Page 
    Creating a Plan
    Create a plan to define the billing schedule, which includes the amount, frequency,
            and billing cycles for a subscription. The interval between subscription payments cannot
            exceed 12 months. 
IMPORTANT
If a subscription is to use a one-time plan
                instead of a standard plan, you create the one-time plan when you create the
                subscription. The plan details are embedded in the subscription
                request.
When you create a plan, the system assigns an ID to the plan. Use
                the plan ID to request these actions: 
- Creating a subscription
 - Retrieving a plan
 - Amending a plan
 - Activating a plan
 - Deactivating a plan
 - Deleting a plan
 
Follow these steps to create a plan:
- Send the request to the recurring billing endpoint:
 
Required Fields for Creating a Plan
    Include these fields in your request to create a plan:
- orderInformation.amountDetails.billingAmount
 - orderInformation.amountDetails.currency
 - planInformation.billingCycles.total
 - Required for a plan with a defined plan period.
 - planInformation.billingPeriod.length
 - planInformation.billingPeriod.unit
 - planInformation.name
 
Optional Fields for Creating a Plan
    - orderInformation.amountDetails.setupFee
 - planInformation.code
 - planInformation.description
 - planInformation.status
 
REST Example: Creating a Plan
    Request
{ "planInformation": { "billingPeriod": { "unit": "w", "length": "1" }, "billingCycles": { "total": "4" }, "code":"1619310018", "name": "Test plan", "description": "Description", "status":"active" }, "orderInformation": { "amountDetails": { "billingAmount": "7", "currency": "USD", "setupFee": "0" } } }
Response to a Successful Request
{ "_links": { "self": { "href": "/rbs/v1/plans/1619212820", "method": "GET" }, "update": { "href": "/rbs/v1/plans/1619212820", "method": "PATCH" }, "deactivate": { "href": "/rbs/v1/plans/1619212820/deactivate", "method": "POST" } }, "id": "1619212820", "status": "COMPLETED", "planInformation": { "code": "1619310018", "status": "ACTIVE" } }
Error Response 
{ "status": "INVALID_REQUEST", "reason": "INVALID_DATA", "message": "One or more fields in the request contains invalid data.", "details": [ { "field": "planInformation.code", "reason": "DUPLICATE" } ] }