Create a subscription
Creates a recurring subscription for a client or company. Requires a recipient (clientId or companyId), at least one line item, and a connected payout account on the portal. The billing interval is inferred from recurring prices when present, otherwise taken from the request.
Authorizations
Body
Subscription to create
ClientID is the client the subscription bills. Exactly one of clientId, companyId, or recipientId must be provided.
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
CollectionMethod is how invoices for the subscription are collected.
sendInvoice, chargeAutomatically "sendInvoice"
CompanyID is the company the subscription bills. Exactly one of clientId, companyId, or recipientId must be provided.
"f0e1d2c3-b4a5-6789-0123-456789abcdef"
Currency is the ISO currency code.
"usd"
DaysUntilDue sets the invoice due date relative to issuance.
30
Interval is the billing period.
day, week, month, quarterly, biannually, year, semiannually "month"
IntervalCount is the number of intervals between billings.
1
LineItems are the subscription line items. Required unless templateId is provided, in which case the template's line items are used when omitted. Must contain at least one item when provided.
1Memo is an optional note shown on generated invoices.
"Monthly retainer"
PaymentMethodPreferences restricts which payment methods are offered.
RecipientID is the recipient (client or company) of the subscription. Exactly one of clientId, companyId, or recipientId must be provided.
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
TaxPercentage is an optional tax rate applied to generated invoices.
8.25
TemplateID optionally seeds the subscription from a subscription template.
"a7c3e9f1-2b4d-4e6a-8c0f-1d2e3f4a5b6c"
Response
OK
StripeObject would hold field from stripe's subscription or subscription schedule object
CancelledAt is the RFC 3339 timestamp at which the subscription was cancelled; absent while active.
"2024-02-20T14:05:00Z"
ClientID is the ID of the client user the subscription bills.
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
CollectionMethod determines how the subscription's invoices are collected.
sendInvoice, chargeAutomatically "sendInvoice"
CompanyID is the ID of the company the subscription bills.
"f0e1d2c3-b4a5-6789-0123-456789abcdef"
Currency is the ISO 4217 currency code the subscription is billed in.
"usd"
DaysUntilDue is the number of days a recipient has to pay an invoice when collected by sending an invoice.
30
{client_id}/INBOX_NOTIFICATION
ForcePaused indicates the subscription was paused because the workspace plan lapsed.
false
Interval is the billing period the subscription recurs on.
day, week, month, quarterly, biannually, year, semiannually "monthly"
IntervalCount is the number of intervals between each billing cycle.
1
LineItems are the products and ad-hoc charges billed on each cycle.
Memo is an optional note shown to the recipient on generated invoices.
"Monthly retainer"
field is only used for platform api and should not be used anywhere else on FE/BE
PaymentSourceId is the ID of the saved payment source charged for automatically-collected subscriptions.
"card_1a2b3c"
RecipientID is the ID of the client or company the subscription bills. Deprecated: use ClientID and CompanyID instead
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Status is the current lifecycle status of the subscription, mirrored from Stripe.
"active"
TaxPercentage is the tax rate applied to the subscription, as a percentage.
8.25
TemplateID is the ID of the subscription template the subscription was created from, when applicable.
"a7c3e9f1-2b4d-4e6a-8c0f-1d2e3f4a5b6c"