Requirements for the Subscription Creation Script {#rb-subs-migration-4-script-reqts}
=====================================================================================

Adhere to these requirements as you write the subscription creation script.

**Migration log file**
:
The script logs each API request message sent and the corresponding response information returned by the `Cybersource` subscription service.

**Retry logic**
:
For failed subscription creation requests, correct the request and resubmit it to the subscription service.

**Billing start date**
:
`Cybersource` Recurring Billing subscriptions begin billing on the date specified in the subscriptionInformation.startDate field.

**Reusable set of billing periods and billing cycles**
:
Create a *subscription plan* that defines a billing period (or billing cycle) and a number of billing cycles. In the REST API, use these fields:

    * planInformation.billingCycles.total
    * [planInformation.billingPeriod.length](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/plan-info-aa/plan-info-billing-period-length.md "")
    * [planInformation.billingPeriod.unit](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/plan-info-aa/plan-info-billing-period-length.md "")
    * [planInformation.description](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/plan-info-aa/plan-info-des.md "")
    * [planInformation.name](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/plan-info-aa/plan-info-name.md "")

**Plan options for new subscriptions**
:
`Cybersource` Recurring Billing subscriptions support these plan options:

    * Define a **one-time plan** for a subscription instead of creating a subscription plan.
    * Use the plan information defined in the **existing plan** referenced by the subscriptionInformation. planId field in the subscription creation message.
    * Specify **overrides** to some of the information in the referenced plan. For example, if the subscription was for a fixed period, specify the remaining number of billing cycles in the planInformation. billingCycles.total field.

For detailed examples of how to create plan-specific subscriptions, see [Reference Information](/docs/cybs/en-us/recurring-billing/migration/all/rest/recurring-billing-migrate/rb-subs-migration-7-reference.md "").
