On This Page
Creating a Subscription Using the API
To create a subscription, you need a customer token. Use the
Create a Subscription
in the
Cybersource
Developer Center
to create a test REST API request message.After migration, a customer token is created in
TMS
for each active subscription in the legacy system.
This token has the same ID as the subscription.
Use this token to create another subscription for the same customer.To create a subscription for a new customer, you must generate a new customer token.
To capture payment card data for future use,
validate the payment card account by one of these methods:
- Use a payment for a zero amount.
- If your processor does not support zero amount, use a minimal amount.
Enable the Data Enrichment for Card Verification feature to automatically choose the
minimal auth amount. Contact Customer Support for more details.
The best way to perform this transaction is with the REST API.
For more information, see the Create a Customer Token with Validated Payment Details
in the
Token Management Service Developer Guide
.To create tokens using Secure Acceptance Checkout or the SCMP or Simple Order API:
- Set the value of therecurring_frequencyrequest field toon-demand
- Remove any other subscription-related fields (field names that begin withrecurring_*) from the request message.
Your current integration will fail after migration begins.
Prepare changes on your site in advance.
Before migration, create tokens as described above.
After migration, create subscriptions for them.
To create a subscription, use this data from the payment response:
Customer ID:
- Payments REST API:tokenInformation.customer.id
- Secure Acceptance Checkout:payment_token
- SCMP API:pay_subscription_create_subscription_id
- Simple Order API:paySubscriptionCreateReply_subscriptionID
Original Transaction ID:
- Payments REST API:processorInformation.networkTransactionId
- Secure Acceptance Checkout:payment_network_transaction_id
- SCMP API:auth_payment_network_transaction_id
- Simple Order API:ccAuthReply_paymentNetworkTransactionID
Original Transaction Authorized Amount
()Required only for Diners and Discover cards)- Payments REST API:orderInformation.amountDetails.authorizedAmount
- Secure Acceptance Checkout:auth_amount
- SCMP API:auth_auth_amount
- Simple Order API:ccAuthReply_amount
For more information about creating a subscription,
see the Create a Subscription section in the
Recurring Billing User Guide
.