Create Subscription
POST/subscriptions
Creates a new subscription with the specified parameters.
Subscription Lifecycle:
- When first created, the subscription has a
PENDINGstatus - To initiate billing, you must call the activate endpoint with payment details
- Once activated, the subscription will automatically bill according to the configured interval
Key Configuration Parameters:
- Billing settings: Amount, currency, interval (daily, weekly, monthly, yearly)
- Schedule customization: Interval count, trial period duration
- Trial pricing: Offer a free trial with
trialPeriodDays/trialPeriodEnd(no charge until the trial ends), or discounted introductory pricing withtrialAmount+trialIntervalCount(thetrialAmountis charged each billing cycle for that many cycles, then the regularamountapplies).trialAmountcan also be combined withtrialPeriodDays/trialPeriodEndto charge it once at activation for the whole trial period.trialIntervalCountrequirestrialAmountand cannot be combined withtrialPeriodDays/trialPeriodEnd
Example — 5 EUR for the first 3 months, then 10 EUR/month:
{
"amount": 1000,
"currency": "EUR",
"interval": "month",
"intervalCount": 1,
"trialAmount": 500,
"trialIntervalCount": 3
}
The customer pays 5.00 EUR at activation and for the next two monthly cycles (3 discounted cycles in total), then 10.00 EUR every month.
- Allowed payment methods: An array of strings specifying which payment methods are allowed for this subscription (e.g.,
card,bizum) - Customer information: Contact details, billing and shipping addresses
- Communication: Callback URLs for webhook notifications about subscription events
Best Practices:
- Set clear, descriptive names for subscriptions to help with identification
- Configure appropriate webhook notifications to monitor subscription status changes
- Consider offering trial periods to increase customer conversion rates
- Use metadata to store additional information relevant to your business logic
Request
Responses
- 200
- 400
- 401
- 404
- 422
- 500
- 503
A subscription object
The request is incorrect or could not be processed
Unauthorized error. Please check your auth credentials
The specified resource was not found
The request was well-formed but could not be processed due to semantic errors
Unexpected server error
The service is temporarily unavailable