On This Page 
    Creating a Fully Customized Subscription with a One-Time Plan
    You can create a subscription with a one-time plan.
The start date must be in coordinated universal time (UTC) in
            this format: 
YYYY-MM-DDThh:mm:ssZ
. The T separates the date and the
            time. The Z
 indicates UTC. For example,
                2023-08-11T22:47:57Z
 indicates August 11, 2023, at 22:47:57
            (10:47:57PM).
            For subscriptions created on the start date, set the time to
            the current time and day in your time zone.Fields Specific to This Use Case
      These REST API request fields and values are specific to this use case:
- orderInformation.amountDetails.billingAmount
 - orderInformation.amountDetails.currency
 - orderInformation.amountDetails.setupFee
 - planInformation.billingCycles.total
 - planInformation.billingPeriod.length
 - planInformation.billingPeriod.unit
 - subscriptionInformation.startDate
 
Basic Steps
            Follow these steps to create a subscription:
- Create the request with the required API fields.
 - Send the request to one of these endpoints:
- Production:gateway-api.nab.com.au/rbs/v1/subscriptions
 - Test:POST https://gateway-api-test.nab.com.au/rbs/v1/subscriptions
 
 - Verify the response messages to make sure that the request was successful. A 200-level HTTP response code indicates success.See theTransaction Response Codes.
 
Required Fields
    These fields are required for creating a subscription with subscription one-time
                plan:
- orderInformation.amountDetails.billingAmount
 - orderInformation.amountDetails.currency
 - orderInformation.amountDetails.setupFee
 - paymentInformation.customer.id
 - planInformation.billingPeriod.length
 - planInformation.billingPeriod.unit
 - subscriptionInformation.name
 - subscriptionInformation.startDate
 
Optional Field
                - subscriptionInformation.originalTransactionId
 - Including this field ensures better authorization rates and Strong Customer Authentication (SCA) compliance where necessary.
 
REST Example: Creating a Fully Customized Subscription with
        a One-Time Plan
    This example creates a fully customized subscription with a one-time
        plan.
Example Request
{ "subscriptionInformation": { "name": "SubName Testing", "startDate": "2023-04-18T17:01:42Z", "originalTransactionId”: “016153570198200" }, "planInformation": { "billingCycles": { "total":"5" }, "billingPeriod": { "length": "3", "unit":"D" } }, "orderInformation": { "amountDetails": { "billingAmount": "1.21", "setupFee": "1.44", "currency":"USD" } }, "paymentInformation": { "customer": { "id": "C09F227C54F94951E0533F36CF0A3D91" } } }
Example Response to a Successful Request
{ "_links": { "self": { "href": "/rbs/v1/subscriptions/1619214861", "method": "GET" }, "update": { "href": "/rbs/v1/subscriptions/1619214861", "method": "PATCH" }, "cancel": { "href": "/rbs/v1/subscriptions/1619214861/cancel", "method": "POST" } }, "id": "1619214861", "status": "COMPLETED", "subscriptionInformation": { "code": "AWC-49", "status": "PENDING" } }
Example Error Response to a Failed Request
{ "status": "INVALID_REQUEST", "reason": "INVALID_DATA", "message": "One or more fields in the request contains invalid data.", "details": [ { "field": "planInformation.billingPeriod.length", "reason": "MAX_LENGTH" } ] }