POST
/
subscription
/
create

Authorizations

Authorization
string
headerrequired

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
amount
integer
required

The amount in lowest count unit. e.g.: For USD 1, amount is 100 representing 100 cents (The minimum amount should be greater than 1 USD)

currency
enum<string>
required

Three letter abbreviation of the currency.

Available options:
USD
receiptId
string

Your identifier of the order

customerDetails
object
required

Details about the customer

description
string

Description of the order, if any

callbackUrl
string
required

The URL we will callback to with the order status once it finishes.

interval
enum<string>
required

The interval group between subscriptions.

Available options:
DAY,
WEEK,
MONTH,
YEAR
intervalCount
integer
required

The number of intervals between subscription billings. For example, interval = MONTH and intervalCount = 3 bills every 3 months.

cycleCount
integer
required

The number of billing cycles for which the subscription will renew before ending.

Response

200 - application/json
subscriptionId
string

Unique identifier of the subscription

createdAt
string

Timestamp of when the subscription was created

fwdUrl
string

The URL to redirect the customer to the xPay payment gateway for payment.