Skip to main content
This endpoint creates a subscription in the incomplete state together with its first charge, and returns the checkout link to redirect your customer to. The subscription becomes active once that first charge is paid — see the lifecycle.

Body

integer
required
Amount debited at each cycle, in millimes. Minimum 100.
string
default:"TND"
Only TND is accepted.
string
required
Billing cadence unit: day, week, month or year.
integer
default:"1"
Number of interval units per cycle. A cycle may not exceed one year: at most 366 for day, 52 for week, 12 for month, 1 for year.
string
required
Plan name shown on the checkout and in the customer’s app. Maximum 50 characters.
string
Optional description, maximum 200 characters.
string
required
Your reference for this subscription, 1–50 characters. Unique per merchant: repeating one returns HTTP 409 with the existing subscription instead of creating a second one.
HTTPS URL the customer is redirected to after paying the first charge.
HTTPS URL the customer is redirected to when the first charge fails or expires.
string
HTTPS URL that receives the signed subscription events. Strongly recommended — it is the only way to learn about renewals without polling.
integer
default:"1200"
How long the customer has to pay the first charge, in seconds. Between 1200 and 7200. After that the subscription becomes incomplete_expired.
string
Your identifier for the customer, maximum 255 characters. Lets you filter List Subscriptions by customer.
integer
Total number of payments to collect (installments), first charge included. Omit for an open-ended subscription. When the last payment is collected the subscription is canceled with cancellation_reason: completed.
boolean
default:"false"
Card subscriptions are coming soon. Sending true is refused with card_recurring_not_enabled unless card recurring is enabled on your affiliation.

Response Fields

string
required
Identifier of the subscription. Use it on every other subscription endpoint.
string
required
Identifier of the first charge. You can follow it with Verify Payment like any payment.
Hosted checkout URL to redirect the customer to.
string
required
Always incomplete at creation.

Errors

Two shapes: a field that fails validation comes back as {"<field>": ["<reason>"]} (no envelope); a refusal by the platform comes back enveloped, with the code in result.error.
Treat a 409 as success for your retry logic: read result.subscription_id and result.link rather than generating a new developer_tracking_id.