Create Subscription

Creates a subscription object that defines a billing schedule (frequency, interval, start/end date, etc).

⚠️ This API only creates the subscription object; it does not associate the subscription with a payment link. For the subscription to function correctly, the returned subscription identifier must be attached to a payment link using the subscription_id attribute on the Create Payment Link or Update Payment Link APIs.

Body Params
string
enum
required

Defines the interval that this subscription will be run on. daily and test are only available in the sandbox environment for testing purposes and are rejected in production.

Allowed:
integer
required
≥ 1

Defines how often this subscription will run. This will be based on the frequency property defined above.

string
\d{4}\/\d{2}\/\d{2}

The last date this subscription could run on.

integer

Number of times this subscription will occur. If end_date is defined, end_date takes precedence.

string
enum

The day of the week this subscription starts on. Only applicable when frequency is weekly.

Allowed:
integer
1 to 28

The day of the month this subscription starts on. Only applicable when frequency is monthly or annually.

Responses

500

Unexpected error

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