Create Subscription


description: >- The Create Subscription API allows partners to create recurring payments using a card or bank account token.

Create Subscription

POST https://<Platform-host>/api/merchant/:merchantId/recurring-payments/subscriptions

Path Parameters

Name
Type
Description

merchant_id*

string

Merchant ID

Request Body

Name
Type
Description

merchant_id*

string

Merchant ID

data.plan_id*

string

Plan ID (created using Create Plan API)

data.description

string

Plan Description

data.start_date*

date

Start of the recurring payment. First transaction will be executed on this date.

data.card_token

string

Card token generated by Platform secure field API Required for Credit card subscription. Note: Either data.card_token or data.bank_account_token is required

data.bank_account_token

string

Bank Account Token. Required for ACH subscription.

Note: Either data.card_token or data.bank_account_token is required

Field Name
Type
Description
Required?

merchant_id

string

Merchant ID

Required

data.subscription_id

string

Platform system ID for the subscription

Required

data.subscription_status

string

ACTIVE | PENDING | CANCELLED | EXPIRED| BLOCKED

Required

data.plan_id

string

Recurring Payment Plan ID

Required

data.name

string

Recurring Payment Plan Name

data.amount

string

Recurring Payment Plan Amount

data.currency_code

string

Recurring Payment Plan Currency code ee.g. USD

data.billing_period

string

Recurring Payment Plan Billing Period

Accepted values are DAILY | WEEKLY | MONTHLY | QUARTERLY| ANNUAL

data.duration

string

Recurring Payment Plan Duration. Specify the number of recurring payments that will be processed in total

data.duration_unit

string

Recurring Payment Plan Duration Unit. Accepted values are DAYS | WEEKS | MONTHS | YEARS

data.created_at

string

Subcription Creation Date & Time

data.billing_start_date

string

Subscription Start date. First transaction will be executed on this date.

data.description

string

Subscription description

Subscription Status

  • PENDING: The subscription is not yet created.

  • ACTIVE: The subscription is currently active.

  • BLOCKED: The subscription is currently paused.

  • CANCELLED: The subscription has been cancelled.

  • EXPIRED: The subscription has expired.

Webhook event: SUBSCRIPTION_CREATED

Webhook Payload Example

Last updated