v1
latestOpenAPI 3.1.02026-07-24770322.0 KBCreate Subscription
This API endpoint creates a subscription. A subscription is used to bill clients on a recurring basis.
post/v1/subscriptions
Request body
Response
200
Example response
{
"id": "sub_01HN4V8K5P7RNQJ6MGXKDZ8T2W",
"object": "subscription",
"createdAt": "2024-02-21T15:31:16.789Z",
"collectionMethod": "sendInvoice",
"status": "active",
"recipientId": "441424f5-2d9a-494f-b3d6-5e596a235e5a",
"clientId": "441424f5-2d9a-494f-b3d6-5e596a235e5a",
"companyId": "441424f5-2d9a-494f-b3d6-5e596a235e5a",
"memo": "Enterprise subscription with support",
"taxPercentage": 8.5,
"currency": "USD",
"interval": "month",
"intervalCount": 1,
"daysUntilDue": 30,
"canceledAt": "null-date",
"paymentMethodPreferences": [
{
"type": "creditCard"
}
],
"lineItems": [
{
"priceId": "ZC9UiqQSR",
"productId": "d0000000-d7a5-473d-a75b-9821a8f4e191",
"description": "Enterprise Plan",
"quantity": 1
}
]
}