Create subscription
With subscriptions, you can schedule recurring payments to take place at regular intervals.
For example, by simply specifying an amount and an interval, you can create an endless subscription to charge a monthly fee, until you cancel the subscription.
Or, you could use the times parameter to only charge a limited number of times, for example to split a big transaction in multiple parts.
A few example usages:
amount[currency]="EUR" amount[value]="5.00" interval="2 weeks" Your customer will be charged €5 once every two weeks.
amount[currency]="EUR" amount[value]="20.00" interval="1 day" times=5 Your customer will be charged €20 every day, for five consecutive days.
amount[currency]="EUR" amount[value]="10.00" interval="1 month" startDate="2018-04-30" Your customer will be charged €10 on the last day of each month, starting in April 2018.
Headers
A unique key to ensure idempotent requests. This key should be a UUID v4 string.
Request body
Example request
{
"resource": "subscription",
"id": "sub_5B8cwPMGnU",
"mode": "live",
"status": "active",
"amount": {
"currency": "EUR",
"value": "10.00"
},
"times": 6,
"timesRemaining": 5,
"interval": "2 days",
"startDate": "2025-01-01",
"nextPaymentDate": "2025-01-01",
"description": "Subscription of streaming channel",
"method": "paypal",
"applicationFee": {
"amount": {
"currency": "EUR",
"value": "10.00"
},
"description": "Platform fee"
},
"webhookUrl": "https://example.com/webhook",
"customerId": "cst_5B8cwPMGnU",
"mandateId": "mdt_5B8cwPMGnU",
"createdAt": "2024-03-20T09:13:37+00:00",
"canceledAt": "2025-01-01T13:10:19+00:00",
"profileId": "pfl_5B8cwPMGnU",
"_links": {
"self": {
"href": "https://...",
"type": "application/hal+json"
},
"customer": {
"href": "https://...",
"type": "application/hal+json"
},
"mandate": {
"href": "https://...",
"type": "application/hal+json"
},
"profile": {
"href": "https://...",
"type": "application/hal+json"
},
"payments": {
"href": "https://...",
"type": "application/hal+json"
},
"documentation": {
"href": "https://...",
"type": "application/hal+json"
}
}
}Response
The newly created subscription object.
Changes
Changed in 4 of the 78 revisions of this API.617
- ○
the response property
////became required for the statusresponse-property-became-required
- ○
the response property
////became required for the statusresponse-property-became-required
- ○
the response property
////became required for the statusresponse-property-became-required
- ○
the response property
////became required for the statusresponse-property-became-required
- ○
the response property
////became required for the statusresponse-property-became-required
- ○
the response property
////became required for the statusresponse-property-became-required
- ○
the response property
////became required for the statusresponse-property-became-required
- ○
the response property
////became required for the statusresponse-property-became-required
- ○
the response property
////became required for the statusresponse-property-became-required
- ○
the response property
////became required for the statusresponse-property-became-required
- ○
- ▲
the request property
/became not nullablerequest-property-became-not-nullable
- ▲
the request property
/became not nullablerequest-property-became-not-nullable
- ▲
the request property
//became requiredrequest-property-became-required
- ▲
the request property
//became requiredrequest-property-became-required
- ▲
the request property
//became requiredrequest-property-became-required
- ▲
the request property
//became requiredrequest-property-became-required
- ○
the response property
//////became required for the statusresponse-property-became-required
- ○
the response property
//////became required for the statusresponse-property-became-required
- ○
the response property
//////became required for the statusresponse-property-became-required
- ○
the response property
//////became required for the statusresponse-property-became-required
- ▲
- ○
added the non-success response with the status
response-non-success-status-added
- ○
- ○
the endpoint scheme security
advancedAccessTokenwas added to the APIapi-security-added
- ○
the endpoint scheme security
organizationAccessTokenwas removed from the APIapi-security-removed
This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
Of the 78 revisions, 9 have no diff computed.