FILTER BY TAG

Create a Subscription Using the API

You must use a customer token to create a subscription. 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. You can 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 using 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 authorization amount. Contact Customer Support for more details.
The best way to perform this transaction is with the REST API. For more information, see the
Token Management Service
Developer Guide
.
You can still use the Secure Acceptance Checkout or the SCMP or Simple Order API, but only to perform the transaction that initializes the subscription agreement and creates a validated token.
Follow these steps to create tokens using Secure Acceptance Checkout or the SCMP or Simple Order API:
  1. Set the value of the
    recurring_frequency
    request field to
    on-demand
  2. Remove any other subscription-related fields (field names that begin with
    recurring_*
    ) from the request message.
IMPORTANT
If you choose to continue using the Simple Order API, make sure your keys are up to date.
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
.