Create Subscription

Create a Subscription link. In response you will get the Subscription Link reference and the Subscription link URL. You can share the subscription link with your customer. The master merchant can also create the subscription link for their sub-merchants, by passing the sub-merchant key as a header. Refer API docs for additional information.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required

The unique PortOne key for merchant

string
required
string
required

The unique merchant order reference generated by the merchant

string

Product name for the customer's subscription purchase

string
enum
required

default, api or checkout -- The Source of creation.

Allowed:
string

Email address of the customer

string

Name of the customer

string

Phone number of the customer

string
required

The currency of the subscription

string
enum
required

The environment of transacation either live OR sandbox

Allowed:
boolean

Specifies if email notifications should be sent

boolean

Specifies if phone notifications should be sent

string
required

The reference ID for the plan order

notes
array of objects

Additional Notes

Additional Notes
additional_costs
array of objects

Additional Cost. Optional for REGULAR Subscription, not available for ONDEMAND Subscription

Additional Cost. Optional for REGULAR Subscription, not available for ONDEMAND Subscription
string
required

The URL to redirect to after a successful subscription

string
required

The URL to redirect to after a failed subscription

string
required

The URL to redirect to for a pending subscription

string
enum
required

The type of subscription

Allowed:
double
≥ 1

The amount of the first deduction, can be a floating-point number. Required only for ONDEMAND Subscription, not available for REGULAR Subscription

boolean

Indicates whether the first transaction should be auto-refunded. Available only for ONDEMAND Subscription, not available for REGULAR Subscription

string
enum

Indicates whether accumulated payments are allowed. Possible values Y or N. Required only for REGULAR Subscription, not available for ONDEMAND Subscription

Allowed:
integer
≥ 1

The quantity of the item being subscribed. Required only for REGULAR Subscription, not available for ONDEMAND Subscription

number
≥ 1

The number of times the subscription will recur. Required only for REGULAR Subscription, not available for ONDEMAND Subscription

string

The start date and time of the subscription. Send empty value to start immediately, not available for ONDEMAND Subscription

integer
≥ 1

To have a trial set the trial frequency greater than 0. Use either start_date or trial_frequency and trial_period for REGULAR Subscription, not available for ONDEMAND Subscription

string
enum

To have a trial set the trial period. Use either start_date or trial_frequency and trial_period for REGULAR Subscription, not available for ONDEMAND Subscription. Hour trial_period is only for testing purpose

Allowed:
string

The expire date and time of the subscription link

Headers
string
string

The PortOne Key of the merchant

string

The Authorization header is used to include the JWT for authenticating API requests; learn how to generate the token in this guide

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json