POST/subscriptions
Buys a new subscription for an organization that has a billing account but no active core plan (a repurchase,
never a trial), from product and seat lines, charged now. Send confirmationTokenId to pay with a new card or bank
account: it is the id Stripe.js createConfirmationToken returns from the Payment Element, and it becomes the
organization's default payment method. Leave it out to charge the default payment method already on file.
Requires OrganizationAdmin, an Idempotency-Key header and consent (disclosureVersion and the verbatim
disclosedTerms the buyer saw). If the payment is not completed, what this request created is cancelled; a
declined card returns 402 with a declineCode, and a new payment method that needs 3D Secure or bank
verification is refused with 400. Product ids come from Billing_GetProducts. To add to an existing subscription
use Licenses_AddLicense. A success returns the outcome Applied.
| Field | Type | Required | Description |
|---|
| Idempotency-Key | string | Optional | |
Request Body
| Field | Type | Required | Description |
|---|
| lines | CreateSubscriptionRequestPurchaseLine[] | Optional | |
| confirmationTokenId | string | Optional | |
| consent | CreateSubscriptionRequestConsentInfo | Optional | |
CreateSubscriptionRequestPurchaseLine
| Field | Type | Description |
|---|
| productId | uuid | |
| seats | integer | |
CreateSubscriptionRequestConsentInfo
| Field | Type | Description |
|---|
| disclosureVersion | string| null | |
| disclosedTerms | string| null | |
Response
| Field | Type | Description |
|---|
| outcome | string| null | |
| hostedInvoiceUrl | string| null | |
| accessUntil | date-time| null | |