Creates a subscription for a saved customer against a saved payment method, with no new checkout — the one-click post-purchase upsell path, given a saved provider_customer_id and one or more provider_price_ids. Recurring and one-time prices are sent together in items; there is no separate one_time_items array.
The payment method is the supplied provider_payment_method_id when present, otherwise the customer’s default payment method.
By default the first charge is taken during the request, off-session: a declined or authentication-required card returns an error and leaves no incomplete subscription behind, and a customer with no provider_payment_method_id and no default is blocked with a 400.
Set on_session: true to defer that charge to a browser confirmation the customer completes while present. Nothing is charged during the request, so a first-time customer with no saved card can subscribe, and a decline instead surfaces client-side after a 200, leaving the subscription incomplete. See on_session and payment_confirmation below.
Coupons and promotion codes can be applied at creation, on the whole subscription (discounts) or on a single line (items[].discounts) — this is the only place a discount reaches the first invoice. A discount that covers the whole first charge leaves no payment method on file: there is no payment to take, so nothing captures a card, and the first renewal after the coupon lapses has nothing to charge. If a discount may zero the first invoice, collect and pass provider_payment_method_id yourself.
Returns the created subscription in the same shape as GET /subscriptions/{provider_subscription_id}, plus the optional payment_confirmation block.
Service (M2M) access token issued by POST /auth/token using the client_credentials grant. Required scopes, where known, are listed on each operation below.
Headers
Idempotency-Key
string
Deduplicates retried requests with the same key and parameters instead of creating a second resource. Recommended: a deterministic, order-scoped value such as initial-subscription:{provider_customer_id}:{order_id} — a client that generates a fresh random value on retry defeats the deduplication and creates a second subscription. Mint a new key for a genuinely new attempt. Reusing a key replays the original response, so a retry after a 400 decline returns that same 400 instead of charging a replacement card, and changing items under an unchanged key is rejected as an idempotency conflict rather than retried. The replay window (roughly 24 hours) also outlives the subscription's own incomplete_expired deadline (roughly 20 hours), so once a prior attempt under a key has reached a terminal state, a genuinely new purchase needs a new key.
Body
application/json
provider_customer_id
string
required
Saved provider customer id (e.g. test_customer_id).
items
object[]
required
Non-empty. Carries both recurring and one-time prices — send every price in this one array. You do not say which is which: each provider_price_id is resolved with the provider, and a recurring price becomes a subscription item while a one-time price is billed once on the subscription's first invoice. Must include exactly one recurring price, with any number of one-time prices beside it: an items array of only one-time prices, or with two or more recurring prices, is rejected with a 400. Pause, resume and cancel act on the whole subscription, so create one subscription per recurring product. A one-time price is charged immediately even when trial_period_days is set: the trial defers the recurring charge, not the one-time item, which is what makes a "$1 first month then rebill" bundle a single call. Each entry has a required provider_price_id and optional quantity. A separate one_time_items array is not accepted — a request that still sends it is rejected with a 400 naming the field, so an upfront charge can never be silently skipped; move those entries into items. Invoice lines do not carry a coverage period.
Show child attributes
provider_payment_method_id
string
Saved provider payment-method id (e.g. test_payment_method_id). When provided, set as the new subscription's default payment method. Charged off-session during the request by default, or used as the method the customer confirms when on_session: true. When omitted, the customer's default payment method is used. On the off-session posture a customer with no default is rejected with a 400; on the on-session posture the field may be omitted for a customer with no saved method at all — the browser confirmation collects it, which is what makes a first purchase possible.
discounts
object[]
Discounts applied at creation, so the discount reaches the first invoice — how long it keeps applying afterwards is the coupon's own duration, not this field's. Each entry must specify exactly one of coupon, promotion_code or discount; sending two of them as non-empty strings, or none of them, is a 400. A blank or non-string member is ignored rather than rejected, so {"coupon": "", "promotion_code": "test_promotion_code_id"} is accepted as a promotion-code discount. Ids are trimmed before use. An empty array is treated as absent — identical to omitting the field: the provider default applies, which inherits any discount already on the billing customer. Per-item discounts go on items[].discounts instead.
Show child attributes
metadata
object
Free-form string key/value pairs attached to the subscription.
trial_period_days
integer
Starts the subscription on a trial of this many days, deferring the first recurring charge until the trial ends. Must be a positive integer. What happens when the trial ends is not configurable per request: OpenLoop sets the end behaviour to cancel, so a trial that ends with no payment method on file cancels the subscription rather than invoicing it. trial_settings is not a request field — a body that carries one is accepted and the field is ignored.
on_session
boolean
Opts into the on-session (customer-present) payment posture: the response then carries a payment_confirmation block whose client_secret your browser confirms while the customer is still present, which is what makes 3D Secure reachable and can reduce first-payment declines. Absent or false keeps the default off-session behavior unchanged, including the error on a declined card. Must be a boolean when supplied — a non-boolean value is rejected with a 400. If you set on_session: true and the response carries no payment_confirmation key, the posture was not honored — you are talking to a deployment that predates this field, and the first charge has already been attempted off-session. Do not proceed to browser confirmation in that case.
Response
Success.
data
object
required
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Partners API Documentation","colors":{"primary":"#e34376","light":"#e55484","dark":"#e3235f"},"logo":{"light":"https://mintcdn.com/openloop/uFqnU7STc2L-iY-j/logo/openloop_light.png?fit=max\u0026auto=format\u0026n=uFqnU7STc2L-iY-j\u0026q=85\u0026s=36c08284ca501fdefe4311339c563474","dark":"https://mintcdn.com/openloop/uFqnU7STc2L-iY-j/logo/openloop_dark.png?fit=max\u0026auto=format\u0026n=uFqnU7STc2L-iY-j\u0026q=85\u0026s=81c334cb0ffc5f63a9595a1d611595ce"},"favicon":"https://mintcdn.com/openloop/uFqnU7STc2L-iY-j/favicon.ico?fit=max\u0026auto=format\u0026n=uFqnU7STc2L-iY-j\u0026q=85\u0026s=7be86b4f76e18b47229f3b8646ba3fa2","api":{"playground":{"display":"interactive"}},"navbar":{"links":[{"href":"https://openloophealth.com","label":"OpenLoop Health"}],"primary":{"type":"button","label":"Get Started","href":"https://openloophealth.com/contact"}},"footer":{"socials":{"linkedin":"https://linkedin.com/company/openloophealth"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"OpenLoop Health","icon":"globe","href":"https://openloophealth.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"openloop","hasAudioNarration":false,"actualSubdomain":"openloop","customDomains":[],"gitSource":{"type":"github","owner":"openloophealth","repo":"patient-zero-openloop-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6aff28baca43cd0248039897","clientVersion":"0.0.4205","searchFilterCounts":[{"language":"default","tag":"API Reference","count":130},{"language":"default","tag":"Partner Cookbook","count":24},{"language":"default","tag":"Scheduling","count":9},{"language":"default","tag":"Guides","count":8},{"language":"default","tag":"Subscriptions","count":8},{"language":"default","tag":"Auth","count":7},{"language":"default","tag":"Billing Customers","count":7},{"language":"default","tag":"Eligibility","count":7},{"language":"default","tag":"When things go wrong","count":6},{"language":"default","tag":"Users","count":6}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/subscriptions/create-subscription","slug":"/api-reference/subscriptions/create-subscription","pageMetadata":{"title":"Create Subscription","description":"Creates a subscription for a saved customer against a saved payment method, with no new checkout — the one-click post-purchase upsell path, given a saved `provider_customer_id` and one or more `provider_price_id`s. Recurring and one-time prices are sent together in `items`; there is no separate `one_time_items` array.\n\nThe payment method is the supplied `provider_payment_method_id` when present, otherwise the customer's default payment method.\n\nBy default the first charge is taken during the request, **off-session**: a declined or authentication-required card returns an error and leaves no `incomplete` subscription behind, and a customer with no `provider_payment_method_id` and no default is blocked with a `400`.\n\nSet `on_session: true` to defer that charge to a browser confirmation the customer completes while present. Nothing is charged during the request, so a first-time customer with no saved card can subscribe, and a decline instead surfaces client-side after a `200`, leaving the subscription `incomplete`. See `on_session` and `payment_confirmation` below.\n\nCoupons and promotion codes can be applied at creation, on the whole subscription (`discounts`) or on a single line (`items[].discounts`) — this is the only place a discount reaches the **first** invoice. **A discount that covers the whole first charge leaves no payment method on file:** there is no payment to take, so nothing captures a card, and the first renewal after the coupon lapses has nothing to charge. If a discount may zero the first invoice, collect and pass `provider_payment_method_id` yourself.\n\nReturns the created subscription in the same shape as `GET /subscriptions/{provider_subscription_id}`, plus the optional `payment_confirmation` block.","deprecated":null,"version":null,"openapi":"/openapi.json post /subscriptions","href":"/api-reference/subscriptions/create-subscription","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Creates a subscription for a saved customer against a saved payment method, with no new checkout — the one-click post-purchase upsell path, given a saved \", _jsx(_components.code, {\n children: \"provider_customer_id\"\n }), \" and one or more \", _jsx(_components.code, {\n children: \"provider_price_id\"\n }), \"s. Recurring and one-time prices are sent together in \", _jsx(_components.code, {\n children: \"items\"\n }), \"; there is no separate \", _jsx(_components.code, {\n children: \"one_time_items\"\n }), \" array.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The payment method is the supplied \", _jsx(_components.code, {\n children: \"provider_payment_method_id\"\n }), \" when present, otherwise the customer’s default payment method.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"By default the first charge is taken during the request, \", _jsx(_components.strong, {\n children: \"off-session\"\n }), \": a declined or authentication-required card returns an error and leaves no \", _jsx(_components.code, {\n children: \"incomplete\"\n }), \" subscription behind, and a customer with no \", _jsx(_components.code, {\n children: \"provider_payment_method_id\"\n }), \" and no default is blocked with a \", _jsx(_components.code, {\n children: \"400\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Set \", _jsx(_components.code, {\n children: \"on_session: true\"\n }), \" to defer that charge to a browser confirmation the customer completes while present. Nothing is charged during the request, so a first-time customer with no saved card can subscribe, and a decline instead surfaces client-side after a \", _jsx(_components.code, {\n children: \"200\"\n }), \", leaving the subscription \", _jsx(_components.code, {\n children: \"incomplete\"\n }), \". See \", _jsx(_components.code, {\n children: \"on_session\"\n }), \" and \", _jsx(_components.code, {\n children: \"payment_confirmation\"\n }), \" below.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Coupons and promotion codes can be applied at creation, on the whole subscription (\", _jsx(_components.code, {\n children: \"discounts\"\n }), \") or on a single line (\", _jsx(_components.code, {\n children: \"items[].discounts\"\n }), \") — this is the only place a discount reaches the \", _jsx(_components.strong, {\n children: \"first\"\n }), \" invoice. \", _jsx(_components.strong, {\n children: \"A discount that covers the whole first charge leaves no payment method on file:\"\n }), \" there is no payment to take, so nothing captures a card, and the first renewal after the coupon lapses has nothing to charge. If a discount may zero the first invoice, collect and pass \", _jsx(_components.code, {\n children: \"provider_payment_method_id\"\n }), \" yourself.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Returns the created subscription in the same shape as \", _jsx(_components.code, {\n children: \"GET /subscriptions/{provider_subscription_id}\"\n }), \", plus the optional \", _jsx(_components.code, {\n children: \"payment_confirmation\"\n }), \" block.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Subscription","description":"Creates a subscription for a saved customer against a saved payment method, with no new checkout — the one-click post-purchase upsell path, given a saved `provider_customer_id` and one or more `provider_price_id`s. Recurring and one-time prices are sent together in `items`; there is no separate `one_time_items` array.\n\nThe payment method is the supplied `provider_payment_method_id` when present, otherwise the customer's default payment method.\n\nBy default the first charge is taken during the request, **off-session**: a declined or authentication-required card returns an error and leaves no `incomplete` subscription behind, and a customer with no `provider_payment_method_id` and no default is blocked with a `400`.\n\nSet `on_session: true` to defer that charge to a browser confirmation the customer completes while present. Nothing is charged during the request, so a first-time customer with no saved card can subscribe, and a decline instead surfaces client-side after a `200`, leaving the subscription `incomplete`. See `on_session` and `payment_confirmation` below.\n\nCoupons and promotion codes can be applied at creation, on the whole subscription (`discounts`) or on a single line (`items[].discounts`) — this is the only place a discount reaches the **first** invoice. **A discount that covers the whole first charge leaves no payment method on file:** there is no payment to take, so nothing captures a card, and the first renewal after the coupon lapses has nothing to charge. If a discount may zero the first invoice, collect and pass `provider_payment_method_id` yourself.\n\nReturns the created subscription in the same shape as `GET /subscriptions/{provider_subscription_id}`, plus the optional `payment_confirmation` block.","deprecated":null,"version":null,"openapi":"/openapi.json post /subscriptions","href":"/api-reference/subscriptions/create-subscription","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Create Subscription","tags":["Subscriptions"],"security":["a80e37ee-e966-483a-874a-d30f297d7515","e7a6f6eb-8e65-4467-9273-4e9e46724cd7"],"description":"Creates a subscription for a saved customer against a saved payment method, with no new checkout — the one-click post-purchase upsell path, given a saved `provider_customer_id` and one or more `provider_price_id`s. Recurring and one-time prices are sent together in `items`; there is no separate `one_time_items` array.\n\nThe payment method is the supplied `provider_payment_method_id` when present, otherwise the customer's default payment method.\n\nBy default the first charge is taken during the request, **off-session**: a declined or authentication-required card returns an error and leaves no `incomplete` subscription behind, and a customer with no `provider_payment_method_id` and no default is blocked with a `400`.\n\nSet `on_session: true` to defer that charge to a browser confirmation the customer completes while present. Nothing is charged during the request, so a first-time customer with no saved card can subscribe, and a decline instead surfaces client-side after a `200`, leaving the subscription `incomplete`. See `on_session` and `payment_confirmation` below.\n\nCoupons and promotion codes can be applied at creation, on the whole subscription (`discounts`) or on a single line (`items[].discounts`) — this is the only place a discount reaches the **first** invoice. **A discount that covers the whole first charge leaves no payment method on file:** there is no payment to take, so nothing captures a card, and the first renewal after the coupon lapses has nothing to charge. If a discount may zero the first invoice, collect and pass `provider_payment_method_id` yourself.\n\nReturns the created subscription in the same shape as `GET /subscriptions/{provider_subscription_id}`, plus the optional `payment_confirmation` block.","requestBody":"7e9b1bbf-6948-4dd3-ad47-9f98e304c07a","responses":{"200":"4bb907d6-a0d4-4dbc-9c1f-360cdf3c8d04","400":"be1de0c1-1fd1-4702-a46b-c5fc10d1657c","401":"cac498f3-006b-4995-bfee-7162bd4821ad","403":"dff5750e-40a3-44e8-ab4b-c93a411e5195","404":"5100fbcc-2a7d-4823-a0a9-d320777bd850","500":"a890eee3-4863-40c1-b489-535a5af19512"},"parameters":["87c79581-fb9b-4fe1-a01c-e5001b0a5cf2"],"method":"post","type":"path","servers":["c242b877-71eb-4138-9d4e-930ddd911326","538c36be-4e83-42ab-98cd-fcf6de7f10e5"],"path":"/subscriptions","baseUrlOptions":["https://api.openloophealth.com/v0.1","https://api-staging.openloophealth.com/v0.1"],"title":"Create Subscription","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"87c79581-fb9b-4fe1-a01c-e5001b0a5cf2":{"in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string","isRequired":false,"description":"Deduplicates retried requests with the same key and parameters instead of creating a second resource. Recommended: a **deterministic, order-scoped** value such as `initial-subscription:{provider_customer_id}:{order_id}` — a client that generates a fresh random value on retry defeats the deduplication and creates a second subscription. **Mint a new key for a genuinely new attempt.** Reusing a key replays the original response, so a retry after a `400` decline returns that same `400` instead of charging a replacement card, and changing `items` under an unchanged key is rejected as an idempotency conflict rather than retried. The replay window (roughly 24 hours) also outlives the subscription's own `incomplete_expired` deadline (roughly 20 hours), so once a prior attempt under a key has reached a terminal state, a genuinely new purchase needs a new key.","uniqueKey":"","typeLabel":"string"},"description":"Deduplicates retried requests with the same key and parameters instead of creating a second resource. Recommended: a **deterministic, order-scoped** value such as `initial-subscription:{provider_customer_id}:{order_id}` — a client that generates a fresh random value on retry defeats the deduplication and creates a second subscription. **Mint a new key for a genuinely new attempt.** Reusing a key replays the original response, so a retry after a `400` decline returns that same `400` instead of charging a replacement card, and changing `items` under an unchanged key is rejected as an idempotency conflict rather than retried. The replay window (roughly 24 hours) also outlives the subscription's own `incomplete_expired` deadline (roughly 20 hours), so once a prior attempt under a key has reached a terminal state, a genuinely new purchase needs a new key."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider_customer_id":{"type":"string","description":"Saved provider customer id (e.g. `test_customer_id`).","isRequired":true,"uniqueKey":"provider_customer_id","typeLabel":"string"},"items":{"type":"array","items":{"type":"object","properties":{"provider_price_id":{"type":"string","description":"Provider price id for a recurring or a one-time price (e.g. `test_price_id`). Resolved with the provider before the subscription is created, so an id the provider does not have is a `404` naming it — no subscription and no charge.","isRequired":true,"uniqueKey":"\\items.items.[INDEX].provider_price_id","typeLabel":"string"},"quantity":{"type":"number","description":"Positive integer.","uniqueKey":"\\items.items.[INDEX].quantity","typeLabel":"number"},"discounts":{"type":"array","items":{"type":"object","properties":{"coupon":{"type":"string","description":"Provider coupon id. Exactly one of `coupon`, `promotion_code` or `discount` per entry.","uniqueKey":"\\items.items.[INDEX].discounts.items.[INDEX].coupon","typeLabel":"string"},"promotion_code":{"type":"string","description":"Provider promotion-code id. Exactly one of `coupon`, `promotion_code` or `discount` per entry.","uniqueKey":"\\items.items.[INDEX].discounts.items.[INDEX].promotion_code","typeLabel":"string"},"discount":{"type":"string","description":"Provider id of an **existing** discount (`di_...`) on this subscription or its billing customer, to reuse it rather than create a new one. Exactly one of `coupon`, `promotion_code` or `discount` per entry.","uniqueKey":"\\items.items.[INDEX].discounts.items.[INDEX].discount","typeLabel":"string"}},"uniqueKey":"\\items.items.[INDEX].discounts.items.[INDEX]","typeLabel":"object"},"description":"Discounts applied to **this item only**, same entry shape as the top-level `discounts` — exactly one of `coupon`, `promotion_code` or `discount` per entry. Where the discount lands follows where the item lands: a **recurring** price's discounts attach to the subscription item, a **one-time** price's attach to the invoice line it becomes on the first invoice. Item-level discounts are applied before subscription-level ones. An empty array is treated as absent.","uniqueKey":"\\items.items.[INDEX].discounts","typeLabel":"object[]"}},"required":["provider_price_id"],"uniqueKey":"\\items.items.[INDEX]","typeLabel":"object"},"description":"Non-empty. Carries **both** recurring and one-time prices — send every price in this one array. You do not say which is which: each `provider_price_id` is resolved with the provider, and a recurring price becomes a subscription item while a one-time price is billed once on the subscription's first invoice. Must include exactly one recurring price, with any number of one-time prices beside it: an `items` array of only one-time prices, or with two or more recurring prices, is rejected with a `400`. Pause, resume and cancel act on the whole subscription, so create one subscription per recurring product. A one-time price is charged immediately **even when `trial_period_days` is set**: the trial defers the recurring charge, not the one-time item, which is what makes a \"$1 first month then rebill\" bundle a single call. Each entry has a required `provider_price_id` and optional `quantity`. A separate `one_time_items` array is not accepted — a request that still sends it is rejected with a `400` naming the field, so an upfront charge can never be silently skipped; move those entries into `items`. Invoice lines do not carry a coverage period.","isRequired":true,"uniqueKey":"\\items","typeLabel":"object[]"},"provider_payment_method_id":{"type":"string","description":"Saved provider payment-method id (e.g. `test_payment_method_id`). When provided, set as the new subscription's default payment method. Charged off-session during the request by default, or used as the method the customer confirms when `on_session: true`. When omitted, the customer's default payment method is used. On the **off-session** posture a customer with no default is rejected with a `400`; on the **on-session** posture the field may be omitted for a customer with no saved method at all — the browser confirmation collects it, which is what makes a first purchase possible.","uniqueKey":"provider_payment_method_id","typeLabel":"string"},"discounts":{"type":"array","items":{"type":"object","properties":{"coupon":{"type":"string","description":"Provider coupon id. Exactly one of `coupon`, `promotion_code` or `discount` per entry.","uniqueKey":"discounts.items.[INDEX].coupon","typeLabel":"string"},"promotion_code":{"type":"string","description":"Provider promotion-code id. Exactly one of `coupon`, `promotion_code` or `discount` per entry.","uniqueKey":"discounts.items.[INDEX].promotion_code","typeLabel":"string"},"discount":{"type":"string","description":"Provider id of an **existing** discount (`di_...`) on this subscription or its billing customer, to reuse it rather than create a new one. Exactly one of `coupon`, `promotion_code` or `discount` per entry.","uniqueKey":"discounts.items.[INDEX].discount","typeLabel":"string"}},"uniqueKey":"discounts.items.[INDEX]","typeLabel":"object"},"description":"Discounts applied at creation, so the discount reaches the **first** invoice — how long it keeps applying afterwards is the coupon's own `duration`, not this field's. Each entry must specify **exactly one** of `coupon`, `promotion_code` or `discount`; sending two of them as non-empty strings, or none of them, is a `400`. A blank or non-string member is ignored rather than rejected, so `{\"coupon\": \"\", \"promotion_code\": \"test_promotion_code_id\"}` is accepted as a promotion-code discount. Ids are trimmed before use. An **empty array is treated as absent** — identical to omitting the field: the provider default applies, which inherits any discount already on the billing customer. Per-item discounts go on `items[].discounts` instead.","uniqueKey":"discounts","typeLabel":"object[]"},"metadata":{"type":"object","description":"Free-form string key/value pairs attached to the subscription.","uniqueKey":"metadata","typeLabel":"object"},"trial_period_days":{"type":"integer","description":"Starts the subscription on a trial of this many days, deferring the first recurring charge until the trial ends. Must be a positive integer. What happens when the trial ends is not configurable per request: OpenLoop sets the end behaviour to `cancel`, so a trial that ends with no payment method on file cancels the subscription rather than invoicing it. `trial_settings` is not a request field — a body that carries one is accepted and the field is ignored.","uniqueKey":"trial_period_days","typeLabel":"integer"},"on_session":{"type":"boolean","description":"Opts into the on-session (customer-present) payment posture: the response then carries a `payment_confirmation` block whose `client_secret` your browser confirms while the customer is still present, which is what makes 3D Secure reachable and can reduce first-payment declines. Absent or `false` keeps the default off-session behavior unchanged, including the error on a declined card. Must be a boolean when supplied — a non-boolean value is rejected with a `400`. **If you set `on_session: true` and the response carries no `payment_confirmation` key, the posture was not honored** — you are talking to a deployment that predates this field, and the first charge has already been attempted off-session. Do not proceed to browser confirmation in that case.","uniqueKey":"on_session","typeLabel":"boolean"}},"required":["provider_customer_id","items"],"uniqueKey":"","typeLabel":"object"},"example":{"provider_customer_id":"test_customer_id","provider_payment_method_id":"test_payment_method_id","items":[{"provider_price_id":"test_price_id"}],"on_session":false},"examples":{"Example":{"title":"Example","value":{"provider_customer_id":"test_customer_id","provider_payment_method_id":"test_payment_method_id","items":[{"provider_price_id":"test_price_id"}],"on_session":false}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"4bb907d6-a0d4-4dbc-9c1f-360cdf3c8d04":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"config_id":{"type":"string","description":"Configuration ID.","uniqueKey":"data.config_id","typeLabel":"string"},"provider_account_id":{"oneOf":[{"type":"string","description":"Provider account ID.","uniqueKey":"data.provider_account_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Provider account ID.","uniqueKey":"data.provider_account_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.provider_account_id","typeLabel":"string | null"},"payment_provider":{"type":"string","description":"Provider enum (e.g. `\"stripe\"`).","uniqueKey":"data.payment_provider","typeLabel":"string"},"subscription":{"type":"object","properties":{"provider_customer_id":{"type":"string","description":"Provider customer ID owning the subscription.","uniqueKey":"data.subscription.provider_customer_id","typeLabel":"string"},"provider_subscription_id":{"type":"string","description":"Provider subscription ID.","uniqueKey":"data.subscription.provider_subscription_id","typeLabel":"string"},"status":{"type":"string","description":"Provider subscription status. A subscription paused by OpenLoop reads `active` here, never `paused` — detect a pause with the `paused` field. A pause created before the current pause mechanism still reports `status: \"paused\"`, so a correct consumer treats `paused === true` **or** `status === \"paused\"` as paused; neither alone covers both populations.","uniqueKey":"data.subscription.status","typeLabel":"string"},"description":{"oneOf":[{"type":"string","description":"Subscription description.","uniqueKey":"data.subscription.description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Subscription description.","uniqueKey":"data.subscription.description.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.description","typeLabel":"string | null"},"items":{"type":"array","items":{"type":"object","properties":{"provider_item_id":{"type":"string","description":"Provider subscription-item ID.","uniqueKey":"data.subscription.\\items.items.[INDEX].provider_item_id","typeLabel":"string"},"quantity":{"type":"number","description":"Item quantity.","uniqueKey":"data.subscription.\\items.items.[INDEX].quantity","typeLabel":"number"},"metadata":{"oneOf":[{"type":"object","description":"Custom metadata (string key/value pairs) or `null`.","uniqueKey":"data.subscription.\\items.items.[INDEX].metadata.oneOf.0","typeLabel":"object"},{"type":"null","description":"Custom metadata (string key/value pairs) or `null`.","uniqueKey":"data.subscription.\\items.items.[INDEX].metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.\\items.items.[INDEX].metadata","typeLabel":"object | null"},"price":{"oneOf":[{"type":"object","properties":{"provider_price_id":{"type":"string","description":"Provider price ID.","uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0.provider_price_id","typeLabel":"string"},"provider_product_id":{"type":"string","description":"Provider product ID.","uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0.provider_product_id","typeLabel":"string"},"currency":{"type":"string","description":"ISO 4217 currency code.","uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0.currency","typeLabel":"string"},"amount_cents":{"type":"number","description":"Unit amount in cents.","uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0.amount_cents","typeLabel":"number"},"active":{"oneOf":[{"type":"boolean","description":"Whether the price is still active; `false` when the subscription sits on a retired price. `null` when the provider omits it — treat that as unknown, not as retired.","uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0.active.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether the price is still active; `false` when the subscription sits on a retired price. `null` when the provider omits it — treat that as unknown, not as retired.","uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0.active.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0.active","typeLabel":"boolean | null"},"billing_scheme":{"oneOf":[{"type":"string","description":"`per_unit` or `tiered`; `null` when the provider omits it.","uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0.billing_scheme.oneOf.0","typeLabel":"string"},{"type":"null","description":"`per_unit` or `tiered`; `null` when the provider omits it.","uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0.billing_scheme.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0.billing_scheme","typeLabel":"string | null"},"created":{"oneOf":[{"type":"number","description":"Unix timestamp the price was created.","uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0.created.oneOf.0","typeLabel":"number"},{"type":"null","description":"Unix timestamp the price was created.","uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0.created.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0.created","typeLabel":"number | null"},"recurring":{"oneOf":[{"type":"object","properties":{"interval":{"type":"string","description":"Billing interval (e.g. `\"month\"`).","uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0.recurring.oneOf.0.interval","typeLabel":"string"},"interval_count":{"type":"number","description":"Number of intervals per billing cycle.","uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0.recurring.oneOf.0.interval_count","typeLabel":"number"}},"description":"Recurring interval details or `null` for one-time prices.","uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0.recurring.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"interval":{"type":"string","description":"Billing interval (e.g. `\"month\"`)."},"interval_count":{"type":"number","description":"Number of intervals per billing cycle."}},"description":"Recurring interval details or `null` for one-time prices.","uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0.recurring.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0.recurring","typeLabel":"object | null"}},"description":"Price details or `null`.","uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"provider_price_id":{"type":"string","description":"Provider price ID."},"provider_product_id":{"type":"string","description":"Provider product ID."},"currency":{"type":"string","description":"ISO 4217 currency code."},"amount_cents":{"type":"number","description":"Unit amount in cents."},"active":{"oneOf":[{"type":"boolean","description":"Whether the price is still active; `false` when the subscription sits on a retired price. `null` when the provider omits it — treat that as unknown, not as retired."},{"type":"null","description":"Whether the price is still active; `false` when the subscription sits on a retired price. `null` when the provider omits it — treat that as unknown, not as retired."}]},"billing_scheme":{"oneOf":[{"type":"string","description":"`per_unit` or `tiered`; `null` when the provider omits it."},{"type":"null","description":"`per_unit` or `tiered`; `null` when the provider omits it."}]},"created":{"oneOf":[{"type":"number","description":"Unix timestamp the price was created."},{"type":"null","description":"Unix timestamp the price was created."}]},"recurring":{"oneOf":[{"type":"object","properties":{"interval":{"type":"string","description":"Billing interval (e.g. `\"month\"`)."},"interval_count":{"type":"number","description":"Number of intervals per billing cycle."}},"description":"Recurring interval details or `null` for one-time prices."},{"type":"null","properties":{"interval":{"type":"string","description":"Billing interval (e.g. `\"month\"`)."},"interval_count":{"type":"number","description":"Number of intervals per billing cycle."}},"description":"Recurring interval details or `null` for one-time prices."}]}},"description":"Price details or `null`.","uniqueKey":"data.subscription.\\items.items.[INDEX].price.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.\\items.items.[INDEX].price","typeLabel":"object | null"},"product":{"oneOf":[{"type":"object","properties":{"name":{"type":"string","description":"Product name.","uniqueKey":"data.subscription.\\items.items.[INDEX].product.oneOf.0.name","typeLabel":"string"},"description":{"oneOf":[{"type":"string","description":"Product description.","uniqueKey":"data.subscription.\\items.items.[INDEX].product.oneOf.0.description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Product description.","uniqueKey":"data.subscription.\\items.items.[INDEX].product.oneOf.0.description.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.\\items.items.[INDEX].product.oneOf.0.description","typeLabel":"string | null"},"metadata":{"type":"object","description":"Custom metadata (string key/value pairs).","uniqueKey":"data.subscription.\\items.items.[INDEX].product.oneOf.0.metadata","typeLabel":"object"}},"description":"Product details or `null`.","uniqueKey":"data.subscription.\\items.items.[INDEX].product.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"name":{"type":"string","description":"Product name."},"description":{"oneOf":[{"type":"string","description":"Product description."},{"type":"null","description":"Product description."}]},"metadata":{"type":"object","description":"Custom metadata (string key/value pairs)."}},"description":"Product details or `null`.","uniqueKey":"data.subscription.\\items.items.[INDEX].product.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.\\items.items.[INDEX].product","typeLabel":"object | null"},"current_period_start":{"oneOf":[{"type":"number","description":"Unix timestamp of the current period start.","uniqueKey":"data.subscription.\\items.items.[INDEX].current_period_start.oneOf.0","typeLabel":"number"},{"type":"null","description":"Unix timestamp of the current period start.","uniqueKey":"data.subscription.\\items.items.[INDEX].current_period_start.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.\\items.items.[INDEX].current_period_start","typeLabel":"number | null"},"current_period_end":{"oneOf":[{"type":"number","description":"Unix timestamp of the current period end.","uniqueKey":"data.subscription.\\items.items.[INDEX].current_period_end.oneOf.0","typeLabel":"number"},{"type":"null","description":"Unix timestamp of the current period end.","uniqueKey":"data.subscription.\\items.items.[INDEX].current_period_end.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.\\items.items.[INDEX].current_period_end","typeLabel":"number | null"},"created":{"oneOf":[{"type":"number","description":"Unix timestamp the item was created.","uniqueKey":"data.subscription.\\items.items.[INDEX].created.oneOf.0","typeLabel":"number"},{"type":"null","description":"Unix timestamp the item was created.","uniqueKey":"data.subscription.\\items.items.[INDEX].created.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.\\items.items.[INDEX].created","typeLabel":"number | null"},"discounts":{"type":"array","items":{"type":"object","properties":{"provider_discount_id":{"type":"string","description":"Provider discount ID.","uniqueKey":"data.subscription.\\items.items.[INDEX].discounts.items.[INDEX].provider_discount_id","typeLabel":"string"},"provider_coupon_id":{"oneOf":[{"type":"string","description":"Provider coupon ID backing this discount, or `null`.","uniqueKey":"data.subscription.\\items.items.[INDEX].discounts.items.[INDEX].provider_coupon_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Provider coupon ID backing this discount, or `null`.","uniqueKey":"data.subscription.\\items.items.[INDEX].discounts.items.[INDEX].provider_coupon_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.\\items.items.[INDEX].discounts.items.[INDEX].provider_coupon_id","typeLabel":"string | null"},"provider_promotion_code_id":{"oneOf":[{"type":"string","description":"Provider promotion code ID that created this discount, or `null` when a coupon was applied directly.","uniqueKey":"data.subscription.\\items.items.[INDEX].discounts.items.[INDEX].provider_promotion_code_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Provider promotion code ID that created this discount, or `null` when a coupon was applied directly.","uniqueKey":"data.subscription.\\items.items.[INDEX].discounts.items.[INDEX].provider_promotion_code_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.\\items.items.[INDEX].discounts.items.[INDEX].provider_promotion_code_id","typeLabel":"string | null"},"start":{"oneOf":[{"type":"number","description":"Unix timestamp the discount started.","uniqueKey":"data.subscription.\\items.items.[INDEX].discounts.items.[INDEX].start.oneOf.0","typeLabel":"number"},{"type":"null","description":"Unix timestamp the discount started.","uniqueKey":"data.subscription.\\items.items.[INDEX].discounts.items.[INDEX].start.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.\\items.items.[INDEX].discounts.items.[INDEX].start","typeLabel":"number | null"},"end":{"oneOf":[{"type":"number","description":"Unix timestamp the discount ends, or `null` if open-ended.","uniqueKey":"data.subscription.\\items.items.[INDEX].discounts.items.[INDEX].end.oneOf.0","typeLabel":"number"},{"type":"null","description":"Unix timestamp the discount ends, or `null` if open-ended.","uniqueKey":"data.subscription.\\items.items.[INDEX].discounts.items.[INDEX].end.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.\\items.items.[INDEX].discounts.items.[INDEX].end","typeLabel":"number | null"}},"uniqueKey":"data.subscription.\\items.items.[INDEX].discounts.items.[INDEX]","typeLabel":"object"},"description":"Discounts applied to this item only, separate from the subscription-level `discounts`. Empty array when none.","uniqueKey":"data.subscription.\\items.items.[INDEX].discounts","typeLabel":"object[]"}},"uniqueKey":"data.subscription.\\items.items.[INDEX]","typeLabel":"object"},"description":"Subscription items.","uniqueKey":"data.subscription.\\items","typeLabel":"object[]"},"cancellation_details":{"oneOf":[{"type":"object","properties":{"comment":{"oneOf":[{"type":"string","description":"Cancellation comment.","uniqueKey":"data.subscription.cancellation_details.oneOf.0.comment.oneOf.0","typeLabel":"string"},{"type":"null","description":"Cancellation comment.","uniqueKey":"data.subscription.cancellation_details.oneOf.0.comment.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.cancellation_details.oneOf.0.comment","typeLabel":"string | null"},"feedback":{"oneOf":[{"type":"string","description":"Cancellation feedback code.","uniqueKey":"data.subscription.cancellation_details.oneOf.0.feedback.oneOf.0","typeLabel":"string"},{"type":"null","description":"Cancellation feedback code.","uniqueKey":"data.subscription.cancellation_details.oneOf.0.feedback.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.cancellation_details.oneOf.0.feedback","typeLabel":"string | null"},"reason":{"oneOf":[{"type":"string","description":"Cancellation reason.","uniqueKey":"data.subscription.cancellation_details.oneOf.0.reason.oneOf.0","typeLabel":"string"},{"type":"null","description":"Cancellation reason.","uniqueKey":"data.subscription.cancellation_details.oneOf.0.reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.cancellation_details.oneOf.0.reason","typeLabel":"string | null"}},"description":"Cancellation metadata or `null`.","uniqueKey":"data.subscription.cancellation_details.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"comment":{"oneOf":[{"type":"string","description":"Cancellation comment."},{"type":"null","description":"Cancellation comment."}]},"feedback":{"oneOf":[{"type":"string","description":"Cancellation feedback code."},{"type":"null","description":"Cancellation feedback code."}]},"reason":{"oneOf":[{"type":"string","description":"Cancellation reason."},{"type":"null","description":"Cancellation reason."}]}},"description":"Cancellation metadata or `null`.","uniqueKey":"data.subscription.cancellation_details.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.cancellation_details","typeLabel":"object | null"},"discounts":{"type":"array","items":{"type":"object","properties":{"provider_discount_id":{"type":"string","description":"Provider discount ID.","uniqueKey":"data.subscription.discounts.items.[INDEX].provider_discount_id","typeLabel":"string"},"provider_coupon_id":{"oneOf":[{"type":"string","description":"Provider coupon ID backing this discount, or `null`. Resolve its economics with `GET /coupons/{provider_coupon_id}` — discounts themselves cannot be fetched by ID.","uniqueKey":"data.subscription.discounts.items.[INDEX].provider_coupon_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Provider coupon ID backing this discount, or `null`. Resolve its economics with `GET /coupons/{provider_coupon_id}` — discounts themselves cannot be fetched by ID.","uniqueKey":"data.subscription.discounts.items.[INDEX].provider_coupon_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.discounts.items.[INDEX].provider_coupon_id","typeLabel":"string | null"},"provider_promotion_code_id":{"oneOf":[{"type":"string","description":"Provider promotion code ID that created this discount, or `null` when a coupon was applied directly. Resolve it with `GET /promotion-codes` filtered by `provider_coupon_id` — there is no fetch-by-ID for promotion codes.","uniqueKey":"data.subscription.discounts.items.[INDEX].provider_promotion_code_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Provider promotion code ID that created this discount, or `null` when a coupon was applied directly. Resolve it with `GET /promotion-codes` filtered by `provider_coupon_id` — there is no fetch-by-ID for promotion codes.","uniqueKey":"data.subscription.discounts.items.[INDEX].provider_promotion_code_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.discounts.items.[INDEX].provider_promotion_code_id","typeLabel":"string | null"},"start":{"oneOf":[{"type":"number","description":"Unix timestamp the discount started.","uniqueKey":"data.subscription.discounts.items.[INDEX].start.oneOf.0","typeLabel":"number"},{"type":"null","description":"Unix timestamp the discount started.","uniqueKey":"data.subscription.discounts.items.[INDEX].start.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.discounts.items.[INDEX].start","typeLabel":"number | null"},"end":{"oneOf":[{"type":"number","description":"Unix timestamp the discount ends; `null` for `once` and `forever` coupons.","uniqueKey":"data.subscription.discounts.items.[INDEX].end.oneOf.0","typeLabel":"number"},{"type":"null","description":"Unix timestamp the discount ends; `null` for `once` and `forever` coupons.","uniqueKey":"data.subscription.discounts.items.[INDEX].end.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.discounts.items.[INDEX].end","typeLabel":"number | null"}},"uniqueKey":"data.subscription.discounts.items.[INDEX]","typeLabel":"object"},"description":"Discounts currently applied to the subscription. Empty array when none.","uniqueKey":"data.subscription.discounts","typeLabel":"object[]"},"cancel_at_period_end":{"type":"boolean","description":"Whether the subscription cancels at period end.","uniqueKey":"data.subscription.cancel_at_period_end","typeLabel":"boolean"},"cancel_at":{"oneOf":[{"type":"number","description":"Unix timestamp the subscription is scheduled to cancel.","uniqueKey":"data.subscription.cancel_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Unix timestamp the subscription is scheduled to cancel.","uniqueKey":"data.subscription.cancel_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.cancel_at","typeLabel":"number | null"},"canceled_at":{"oneOf":[{"type":"number","description":"Unix timestamp the subscription was canceled.","uniqueKey":"data.subscription.canceled_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Unix timestamp the subscription was canceled.","uniqueKey":"data.subscription.canceled_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.canceled_at","typeLabel":"number | null"},"ended_at":{"oneOf":[{"type":"number","description":"Unix timestamp the subscription ended.","uniqueKey":"data.subscription.ended_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Unix timestamp the subscription ended.","uniqueKey":"data.subscription.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.ended_at","typeLabel":"number | null"},"paused":{"type":"boolean","description":"Whether a pause is currently in effect **and the subscription is still running**. A terminal subscription (`canceled` / `incomplete_expired`) reads `false` even if a leftover pause remains.","uniqueKey":"data.subscription.paused","typeLabel":"boolean"},"resumes_at":{"oneOf":[{"type":"number","description":"Unix timestamp the pause lifts itself; `null` when the pause is open-ended, the subscription is not paused, or the subscription is terminal.","uniqueKey":"data.subscription.resumes_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Unix timestamp the pause lifts itself; `null` when the pause is open-ended, the subscription is not paused, or the subscription is terminal.","uniqueKey":"data.subscription.resumes_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.resumes_at","typeLabel":"number | null"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"data.subscription.metadata.additionalProperties","typeLabel":"string"},"description":"Free-form string key/value pairs attached to the subscription.","uniqueKey":"data.subscription.metadata","typeLabel":"object"},"start_date":{"type":"number","description":"Unix timestamp the subscription started.","uniqueKey":"data.subscription.start_date","typeLabel":"number"},"trial_start":{"oneOf":[{"type":"number","description":"Unix timestamp the trial started.","uniqueKey":"data.subscription.trial_start.oneOf.0","typeLabel":"number"},{"type":"null","description":"Unix timestamp the trial started.","uniqueKey":"data.subscription.trial_start.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.trial_start","typeLabel":"number | null"},"trial_end":{"oneOf":[{"type":"number","description":"Unix timestamp the trial ends/ended.","uniqueKey":"data.subscription.trial_end.oneOf.0","typeLabel":"number"},{"type":"null","description":"Unix timestamp the trial ends/ended.","uniqueKey":"data.subscription.trial_end.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.trial_end","typeLabel":"number | null"},"collection_method":{"type":"string","description":"`charge_automatically` or `send_invoice`.","uniqueKey":"data.subscription.collection_method","typeLabel":"string"},"created":{"oneOf":[{"type":"number","description":"Unix timestamp.","uniqueKey":"data.subscription.created.oneOf.0","typeLabel":"number"},{"type":"null","description":"Unix timestamp.","uniqueKey":"data.subscription.created.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.created","typeLabel":"number | null"},"last_invoice":{"oneOf":[{"type":"object","properties":{"provider_invoice_id":{"type":"string","description":"Provider invoice ID.","uniqueKey":"data.subscription.last_invoice.oneOf.0.provider_invoice_id","typeLabel":"string"},"created":{"oneOf":[{"type":"number","description":"Unix timestamp the invoice was created.","uniqueKey":"data.subscription.last_invoice.oneOf.0.created.oneOf.0","typeLabel":"number"},{"type":"null","description":"Unix timestamp the invoice was created.","uniqueKey":"data.subscription.last_invoice.oneOf.0.created.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.last_invoice.oneOf.0.created","typeLabel":"number | null"}},"description":"Last invoice reference or `null`.","uniqueKey":"data.subscription.last_invoice.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"provider_invoice_id":{"type":"string","description":"Provider invoice ID."},"created":{"oneOf":[{"type":"number","description":"Unix timestamp the invoice was created."},{"type":"null","description":"Unix timestamp the invoice was created."}]}},"description":"Last invoice reference or `null`.","uniqueKey":"data.subscription.last_invoice.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.last_invoice","typeLabel":"object | null"},"provider_payment_method_id":{"oneOf":[{"type":"string","description":"Payment-method id that paid the latest invoice. When no payment method paid it (for example during a trial, or when the invoice was settled from credit balance), the payment method the payment provider will charge next: the subscription's default, otherwise the billing customer's invoice default. `null` when none is set.","uniqueKey":"data.subscription.provider_payment_method_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Payment-method id that paid the latest invoice. When no payment method paid it (for example during a trial, or when the invoice was settled from credit balance), the payment method the payment provider will charge next: the subscription's default, otherwise the billing customer's invoice default. `null` when none is set.","uniqueKey":"data.subscription.provider_payment_method_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription.provider_payment_method_id","typeLabel":"string | null"},"billing_cycle_anchor":{"type":"number","description":"Unix timestamp the subscription's billing cycles are anchored to.","uniqueKey":"data.subscription.billing_cycle_anchor","typeLabel":"number"}},"description":"Fields documented in the sub-table below.","uniqueKey":"data.subscription","typeLabel":"object"},"payment_confirmation":{"type":"object","properties":{"status":{"type":"string","description":"`requires_confirmation` — the first invoice needs the customer to confirm payment; `client_secret` carries the secret to do it with. `not_required` — there was nothing to confirm (e.g. a `$0` trial or fully-discounted first invoice), and the subscription starts `active` or `trialing`. Branch on this field rather than on whether `client_secret` is `null`. A card declined at confirmation leaves the PaymentIntent at `requires_payment_method` and the subscription `incomplete`: collect a replacement payment method and confirm the **same** PaymentIntent again — do not create a second subscription.","uniqueKey":"data.payment_confirmation.status","typeLabel":"string"},"client_secret":{"oneOf":[{"type":"string","description":"The first invoice's PaymentIntent client secret, used to confirm the payment client-side (e.g. Stripe's `confirmPayment`). `null` when `status` is `not_required`. Scoped to this one payment only — it does not grant broader account access.","uniqueKey":"data.payment_confirmation.client_secret.oneOf.0","typeLabel":"string"},{"type":"null","description":"The first invoice's PaymentIntent client secret, used to confirm the payment client-side (e.g. Stripe's `confirmPayment`). `null` when `status` is `not_required`. Scoped to this one payment only — it does not grant broader account access.","uniqueKey":"data.payment_confirmation.client_secret.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.payment_confirmation.client_secret","typeLabel":"string | null"}},"description":"Present only when the request set `on_session: true` — omitted entirely otherwise, so an off-session response is unchanged. **A `200` on this posture does not mean the customer has paid**: the subscription comes back `incomplete` and its first invoice is unpaid until the client confirms `client_secret`. Gate provisioning on the invoice-settled webhook, never on this response. An unconfirmed subscription transitions itself to `incomplete_expired` in under a day and its initial invoice is voided — that state is terminal, so create a new subscription rather than retrying it. Treat the status as the signal, not a clock; the exact window is the provider's to change.","uniqueKey":"data.payment_confirmation","typeLabel":"object"}},"isRequired":true,"uniqueKey":"data","typeLabel":"object"}},"required":["data"],"uniqueKey":"","typeLabel":"object"},"example":{"data":{"config_id":"test_config_id","provider_account_id":"test_account_id","payment_provider":"stripe","subscription":{"provider_customer_id":"test_customer_id","provider_subscription_id":"test_subscription_id","status":"active","description":null,"items":[{"provider_item_id":"test_subscription_item_id","quantity":1,"metadata":null,"price":null,"product":null,"current_period_end":1700,"current_period_start":1300,"created":1300,"discounts":[]}],"cancellation_details":null,"discounts":[],"cancel_at_period_end":false,"cancel_at":null,"canceled_at":null,"ended_at":null,"paused":false,"resumes_at":null,"metadata":{},"start_date":1300,"trial_start":null,"trial_end":null,"collection_method":"charge_automatically","created":1300,"last_invoice":{"provider_invoice_id":"test_invoice_id","created":1300},"provider_payment_method_id":"test_payment_method_id","billing_cycle_anchor":1300}}},"examples":{"Example":{"title":"Example","value":{"data":{"config_id":"test_config_id","provider_account_id":"test_account_id","payment_provider":"stripe","subscription":{"provider_customer_id":"test_customer_id","provider_subscription_id":"test_subscription_id","status":"active","description":null,"items":[{"provider_item_id":"test_subscription_item_id","quantity":1,"metadata":null,"price":null,"product":null,"current_period_end":1700,"current_period_start":1300,"created":1300,"discounts":[]}],"cancellation_details":null,"discounts":[],"cancel_at_period_end":false,"cancel_at":null,"canceled_at":null,"ended_at":null,"paused":false,"resumes_at":null,"metadata":{},"start_date":1300,"trial_start":null,"trial_end":null,"collection_method":"charge_automatically","created":1300,"last_invoice":{"provider_invoice_id":"test_invoice_id","created":1300},"provider_payment_method_id":"test_payment_method_id","billing_cycle_anchor":1300}}}}},"exampleType":"examples"}},"exampleType":"examples"},"be1de0c1-1fd1-4702-a46b-c5fc10d1657c":{"description":"ValidationError: A body carrying the removed `one_time_items` array (`one_time_items is no longer supported; send one-time prices in items` — checked first, before any other body validation, so a request written against the older shape is told exactly that); missing/empty `provider_customer_id`; `provider_payment_method_id` present but empty; empty `items`; an item without `provider_price_id`; non-positive/non-integer `quantity`; malformed `metadata`; an `items` array with no recurring price (`items must include at least one recurring price` — raised during the pre-create price lookup, so no subscription exists and nothing is charged); an `items` array with more than one recurring price (`A subscription can have only one recurring price. Create a separate subscription for each recurring product.` — raised by the same lookup, with the same guarantee); `trial_period_days` not a positive integer; `on_session` present but not a boolean; **no `provider_payment_method_id` supplied and the customer has no default payment method, on the off-session posture only** — not raised when `on_session: true`; the provider customer has been deleted, on both postures, **when no `provider_payment_method_id` was supplied** (supply one and the provider rejects the deleted customer instead); `discounts` (or an `items[].discounts`) that is not an array (`discounts must be an array`); a `discounts` entry that is not an object (`discounts entries must be objects with exactly one of coupon, promotion_code or discount`); a `discounts` entry carrying two or more of `coupon`, `promotion_code` and `discount` as non-empty strings, or none of them (`each discount entry must specify exactly one of coupon, promotion_code or discount`). ProviderError: the payment provider's own validation rejections, such as a payment method not attached to the customer; and, **on the off-session posture only**, a failed off-session charge (card declined or authentication required), returned with `error_code` `PROVIDER_ERROR`, after which no `incomplete` subscription is created. On the on-session posture the card is not charged during the request, so a decline surfaces client-side after a `200`.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"cac498f3-006b-4995-bfee-7162bd4821ad":{"description":"Missing or invalid bearer token.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"dff5750e-40a3-44e8-ab4b-c93a411e5195":{"description":"No configuration exists for your account, or provider access has been disabled for it.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"5100fbcc-2a7d-4823-a0a9-d320777bd850":{"description":"NotFoundError: Referenced customer not found in your account. Also an `items` entry whose `provider_price_id` the provider does not have (`items price not found: \u003cid>`) — raised during the pre-create price lookup, so no subscription exists and nothing is charged. If several ids are unresolvable, all of them are named in the one response.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"a890eee3-4863-40c1-b489-535a5af19512":{"description":"Payment provider integration error. The provider's own validation rejections (such as a payment method not attached to the customer) are a `400`, and an unknown `provider_price_id` is a `404`, not a `500`.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"a80e37ee-e966-483a-874a-d30f297d7515":{"serviceToken":{"type":"oauth2","description":"Service (M2M) access token issued by POST /auth/token using the client_credentials grant. Required scopes, where known, are listed on each operation below.","flows":{"clientCredentials":{"tokenUrl":"https://api.openloophealth.com/v0.1/auth/token","scopes":{}}},"scopes":[],"schemeName":"serviceToken"}},"e7a6f6eb-8e65-4467-9273-4e9e46724cd7":{"userToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"User access token issued by POST /auth/token via the verification-code grant (after Verify a one-time code) or the refresh_token grant.","scopes":[],"schemeName":"userToken"}}},"servers":{"c242b877-71eb-4138-9d4e-930ddd911326":{"url":"https://api.openloophealth.com/v0.1","description":"Production partner edge"},"538c36be-4e83-42ab-98cd-fcf6de7f10e5":{"url":"https://api-staging.openloophealth.com/v0.1","description":"Staging partner edge (sandbox credentials)"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"oauth2","description":"Service (M2M) access token issued by POST /auth/token using the client_credentials grant. Required scopes, where known, are listed on each operation below.","flows":{"clientCredentials":{"tokenUrl":"https://api.openloophealth.com/v0.1/auth/token","scopes":{}}},"scopes":[],"schemeName":"serviceToken"},"schema":{"title":"OAuth2 Auth","type":"string","isRequired":true,"description":"Service (M2M) access token issued by POST /auth/token using the client_credentials grant. Required scopes, where known, are listed on each operation below.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"serviceToken","name":"Authorization"}],"title":"serviceToken"},{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"User access token issued by POST /auth/token via the verification-code grant (after Verify a one-time code) or the refresh_token grant.","scopes":[],"schemeName":"userToken"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"User access token issued by POST /auth/token via the verification-code grant (after Verify a one-time code) or the refresh_token grant.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"userToken","name":"Authorization"}],"title":"userToken"}]},"originalFileLocation":"openapi.json"},"subdomain":"openloop","siteName":"Partners API Documentation","title":"Create Subscription - Partners API Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-19T16:50:11.137Z","originalFileLocation":"api-reference/subscriptions/create-subscription.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Creates a subscription for a saved customer against a saved payment method, with no new checkout — the one-click post-purchase upsell path, given a saved provider_customer_id and one or more provider_price_ids. Recurring and one-time prices are sent together in items; there is no separate one_time_items array. The payment method is the supplied provider_payment_method_id when present, otherwise the customer\u0026#x27;s default payment method. By default the first charge is taken during the request, off-session: a declined or authentication-required card returns an error and leaves no incomplete subscription behind, and a customer with no provider_payment_method_id and no default is blocked with a 400. Set on_session: true to defer that charge to a browser confirmation the customer completes while present. Nothing is charged during the request, so a first-time customer with no saved card can subscribe, and a decline instead surfaces client-side after a 200, leaving the subscription incomplete. See on_session and payment_confirmation below. Coupons and promotion codes can be applied at creation, on the whole subscription (discounts) or on a single line (items[].discounts) — this is the only place a discount reaches the first invoice. A discount that covers the whole first charge leaves no payment method on file: there is no payment to take, so nothing captures a card, and the first renewal after the coupon lapses has nothing to charge. If a discount may zero the first invoice, collect and pass provider_payment_method_id yourself. Returns the created subscription in the same shape as GET /subscriptions/{provider_subscription_id}, plus the optional payment_confirmation block.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Partners API Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/openloop/LIC2QTmC6gcwcygU/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/openloop/LIC2QTmC6gcwcygU/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/openloop/LIC2QTmC6gcwcygU/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/openloop/LIC2QTmC6gcwcygU/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/openloop/LIC2QTmC6gcwcygU/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/openloop/LIC2QTmC6gcwcygU/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/openloop/LIC2QTmC6gcwcygU/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/openloop/LIC2QTmC6gcwcygU/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/openloop/LIC2QTmC6gcwcygU/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Subscription - Partners API Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a subscription for a saved customer against a saved payment method, with no new checkout — the one-click post-purchase upsell path, given a saved provider_customer_id and one or more provider_price_ids. Recurring and one-time prices are sent together in items; there is no separate one_time_items array. The payment method is the supplied provider_payment_method_id when present, otherwise the customer\u0026#x27;s default payment method. By default the first charge is taken during the request, off-session: a declined or authentication-required card returns an error and leaves no incomplete subscription behind, and a customer with no provider_payment_method_id and no default is blocked with a 400. Set on_session: true to defer that charge to a browser confirmation the customer completes while present. Nothing is charged during the request, so a first-time customer with no saved card can subscribe, and a decline instead surfaces client-side after a 200, leaving the subscription incomplete. See on_session and payment_confirmation below. Coupons and promotion codes can be applied at creation, on the whole subscription (discounts) or on a single line (items[].discounts) — this is the only place a discount reaches the first invoice. A discount that covers the whole first charge leaves no payment method on file: there is no payment to take, so nothing captures a card, and the first renewal after the coupon lapses has nothing to charge. If a discount may zero the first invoice, collect and pass provider_payment_method_id yourself. Returns the created subscription in the same shape as GET /subscriptions/{provider_subscription_id}, plus the optional payment_confirmation block.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Partners API Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://openloop.mintlify.app/api-reference/subscriptions/create-subscription\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://openloop.mintlify.site/_mintlify/api/og/v2?division=Subscriptions\u0026amp;title=Create+Subscription\u0026amp;description=Creates+a+subscription+for+a+saved+customer+against+a+saved+payment+method%2C+with+no+new+checkout+%E2%80%94+the+one-click+post-purchase+upsell+path%2C+given+a+saved+%60provi\u0026amp;theme=c3eb8a84b98e9b697f555ff9\u0026amp;signature=63be10b8376de10f4bffb427c6b6bece1b88ba7f8dbf87939c1e80b55701ba18\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Subscription - Partners API Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a subscription for a saved customer against a saved payment method, with no new checkout — the one-click post-purchase upsell path, given a saved provider_customer_id and one or more provider_price_ids. Recurring and one-time prices are sent together in items; there is no separate one_time_items array. The payment method is the supplied provider_payment_method_id when present, otherwise the customer\u0026#x27;s default payment method. By default the first charge is taken during the request, off-session: a declined or authentication-required card returns an error and leaves no incomplete subscription behind, and a customer with no provider_payment_method_id and no default is blocked with a 400. Set on_session: true to defer that charge to a browser confirmation the customer completes while present. Nothing is charged during the request, so a first-time customer with no saved card can subscribe, and a decline instead surfaces client-side after a 200, leaving the subscription incomplete. See on_session and payment_confirmation below. Coupons and promotion codes can be applied at creation, on the whole subscription (discounts) or on a single line (items[].discounts) — this is the only place a discount reaches the first invoice. A discount that covers the whole first charge leaves no payment method on file: there is no payment to take, so nothing captures a card, and the first renewal after the coupon lapses has nothing to charge. If a discount may zero the first invoice, collect and pass provider_payment_method_id yourself. Returns the created subscription in the same shape as GET /subscriptions/{provider_subscription_id}, plus the optional payment_confirmation block.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://openloop.mintlify.site/_mintlify/api/og/v2?division=Subscriptions\u0026amp;title=Create+Subscription\u0026amp;description=Creates+a+subscription+for+a+saved+customer+against+a+saved+payment+method%2C+with+no+new+checkout+%E2%80%94+the+one-click+post-purchase+upsell+path%2C+given+a+saved+%60provi\u0026amp;theme=c3eb8a84b98e9b697f555ff9\u0026amp;signature=63be10b8376de10f4bffb427c6b6bece1b88ba7f8dbf87939c1e80b55701ba18\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/openloop/LIC2QTmC6gcwcygU/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Partners API Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#e34376\">\u003clink data-mint-head rel=\"canonical\" href=\"https://openloop.mintlify.app/api-reference/subscriptions/create-subscription\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/subscriptions/create-subscription.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://openloop.mintlify.app/#organization\",\"name\":\"Partners API Documentation\",\"url\":\"https://openloop.mintlify.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/openloop/uFqnU7STc2L-iY-j/logo/openloop_light.png?fit=max\u0026auto=format\u0026n=uFqnU7STc2L-iY-j\u0026q=85\u0026s=36c08284ca501fdefe4311339c563474\"}},{\"@type\":\"WebSite\",\"@id\":\"https://openloop.mintlify.app#website\",\"name\":\"Partners API Documentation\",\"url\":\"https://openloop.mintlify.app\",\"publisher\":{\"@id\":\"https://openloop.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://openloop.mintlify.app/api-reference/subscriptions/create-subscription#webpage\",\"url\":\"https://openloop.mintlify.app/api-reference/subscriptions/create-subscription\",\"name\":\"Create Subscription\",\"description\":\"Creates a subscription for a saved customer against a saved payment method, with no new checkout — the one-click post-purchase upsell path, given a saved provider_customer_id and one or more provider_price_ids. Recurring and one-time prices are sent together in items; there is no separate one_time_items array. The payment method is the supplied provider_payment_method_id when present, otherwise the customer's default payment method. By default the first charge is taken during the request, off-session: a declined or authentication-required card returns an error and leaves no incomplete subscription behind, and a customer with no provider_payment_method_id and no default is blocked with a 400. Set on_session: true to defer that charge to a browser confirmation the customer completes while present. Nothing is charged during the request, so a first-time customer with no saved card can subscribe, and a decline instead surfaces client-side after a 200, leaving the subscription incomplete. See on_session and payment_confirmation below. Coupons and promotion codes can be applied at creation, on the whole subscription (discounts) or on a single line (items[].discounts) — this is the only place a discount reaches the first invoice. A discount that covers the whole first charge leaves no payment method on file: there is no payment to take, so nothing captures a card, and the first renewal after the coupon lapses has nothing to charge. If a discount may zero the first invoice, collect and pass provider_payment_method_id yourself. Returns the created subscription in the same shape as GET /subscriptions/{provider_subscription_id}, plus the optional payment_confirmation block.\",\"dateModified\":\"2026-11-19T16:50:11.137Z\",\"isPartOf\":{\"@id\":\"https://openloop.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://openloop.mintlify.app/api-reference/subscriptions/create-subscription#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://openloop.mintlify.app/api-reference/subscriptions/create-subscription#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Subscriptions\",\"item\":\"https://openloop.mintlify.app/api-reference/subscriptions/get-subscriptions\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Subscription\",\"item\":\"https://openloop.mintlify.app/api-reference/subscriptions/create-subscription\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://openloop.mintlify.app/api-reference/subscriptions/create-subscription#apireference\",\"headline\":\"Create Subscription\",\"name\":\"Create Subscription\",\"description\":\"Creates a subscription for a saved customer against a saved payment method, with no new checkout — the one-click post-purchase upsell path, given a saved provider_customer_id and one or more provider_price_ids. Recurring and one-time prices are sent together in items; there is no separate one_time_items array. The payment method is the supplied provider_payment_method_id when present, otherwise the customer's default payment method. By default the first charge is taken during the request, off-session: a declined or authentication-required card returns an error and leaves no incomplete subscription behind, and a customer with no provider_payment_method_id and no default is blocked with a 400. Set on_session: true to defer that charge to a browser confirmation the customer completes while present. Nothing is charged during the request, so a first-time customer with no saved card can subscribe, and a decline instead surfaces client-side after a 200, leaving the subscription incomplete. See on_session and payment_confirmation below. Coupons and promotion codes can be applied at creation, on the whole subscription (discounts) or on a single line (items[].discounts) — this is the only place a discount reaches the first invoice. A discount that covers the whole first charge leaves no payment method on file: there is no payment to take, so nothing captures a card, and the first renewal after the coupon lapses has nothing to charge. If a discount may zero the first invoice, collect and pass provider_payment_method_id yourself. Returns the created subscription in the same shape as GET /subscriptions/{provider_subscription_id}, plus the optional payment_confirmation block.\",\"url\":\"https://openloop.mintlify.app/api-reference/subscriptions/create-subscription\",\"mainEntityOfPage\":{\"@id\":\"https://openloop.mintlify.app/api-reference/subscriptions/create-subscription#webpage\"},\"dateModified\":\"2026-11-19T16:50:11.137Z\",\"publisher\":{\"@id\":\"https://openloop.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://openloop.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Partners API Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Partners API Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/subscriptions/create-subscription.md","siteName":"Partners API Documentation","nav":{"global":{"anchors":[{"anchor":"OpenLoop Health","icon":"globe","href":"https://openloophealth.com"}]},"tabs":[{"tab":"Getting Started","pages":[{"title":"Getting Started","href":""}]},{"tab":"Partner Cookbook","pages":[{"title":"Partner Cookbook","href":"/cookbook"}]},{"tab":"API Reference","groups":[{"group":"Guides","pages":[{"title":"API Overview","href":"/api-reference/introduction"},{"title":"Data Standards","mode":"wide","href":"/api-reference/data-standards"},{"title":"Best Practices","href":"/best-practices"},{"title":"Product \u0026 Price IDs","href":"/api-reference/product-and-price-ids"},{"title":"Scheduling","href":"/api-reference/scheduling-guide"},{"title":"Eligibility","href":"/api-reference/eligibility-guide"},{"title":"User Registration","href":"/api-reference/user-registration-guide"},{"title":"How orders are created","href":"/orders/order-model"}]},{"group":"Events","pages":[{"title":"Events","href":"/events"}]},{"group":"Auth","pages":[{"title":"Obtain a service token","openapi":"POST /auth/token","href":"/auth/obtain-token"},{"title":"Register a user","openapi":"post /auth/register","href":"/auth/register"},{"title":"Send a one-time code","openapi":"post /auth/send-otp","href":"/auth/send-otp"},{"title":"Verify a one-time code","openapi":"post /auth/verify-otp","href":"/auth/verify-otp"},{"title":"Exchange a verification code","openapi":"POST /auth/token","href":"/auth/exchange-verification-code"},{"title":"Refresh a token","openapi":"POST /auth/token","href":"/auth/refresh-token"},{"title":"Revoke a session","openapi":"post /auth/revoke","href":"/auth/revoke"}]},{"group":"Users","pages":[{"openapi":"get /iam/users/find","title":"Find a user by email","href":"/users/find-user"},{"title":"Read a user's patient link","openapi":"get /iam/users/links","href":"/users/get-user-link"},{"title":"Delete the current user","openapi":"delete /iam/users/me","href":"/users/delete-user"}]},{"group":"Allergy Intolerances","pages":[{"title":"List allergy intolerances","deprecated":null,"version":null,"openapi":"/openapi.json get /allergy-intolerances","href":"/api-reference/allergy-intolerances/list-allergy-intolerances"},{"title":"Create allergy intolerance","deprecated":null,"version":null,"openapi":"/openapi.json post /allergy-intolerances","href":"/api-reference/allergy-intolerances/create-allergy-intolerance"},{"title":"Get allergy intolerance","deprecated":null,"version":null,"openapi":"/openapi.json get /allergy-intolerances/{id}","href":"/api-reference/allergy-intolerances/get-allergy-intolerance"},{"title":"Update allergy intolerance","deprecated":null,"version":null,"openapi":"/openapi.json put /allergy-intolerances/{id}","href":"/api-reference/allergy-intolerances/update-allergy-intolerance"}]},{"group":"Consents","pages":[{"title":"List consents","deprecated":null,"version":null,"openapi":"/openapi.json get /consents","href":"/api-reference/consents/list-consents"},{"title":"Create consent","deprecated":null,"version":null,"openapi":"/openapi.json post /consents","href":"/api-reference/consents/create-consent"},{"title":"Get consent","deprecated":null,"version":null,"openapi":"/openapi.json get /consents/{id}","href":"/api-reference/consents/get-consent"},{"title":"Update consent","deprecated":null,"version":null,"openapi":"/openapi.json put /consents/{id}","href":"/api-reference/consents/update-consent"}]},{"group":"Document References","pages":[{"title":"List document references","deprecated":null,"version":null,"openapi":"/openapi.json get /document-references","href":"/api-reference/document-references/list-document-references"},{"title":"Create document reference","deprecated":null,"version":null,"openapi":"/openapi.json post /document-references","href":"/api-reference/document-references/create-document-reference"},{"title":"Upload document content","deprecated":null,"version":null,"openapi":"/openapi.json post /document-references/content","href":"/api-reference/document-references/upload-document-content"},{"title":"Get document reference","deprecated":null,"version":null,"openapi":"/openapi.json get /document-references/{id}","href":"/api-reference/document-references/get-document-reference"},{"title":"Update document reference","deprecated":null,"version":null,"openapi":"/openapi.json put /document-references/{id}","href":"/api-reference/document-references/update-document-reference"},{"title":"Get document reference content","deprecated":null,"version":null,"openapi":"/openapi.json get /document-references/{id}/content","href":"/api-reference/document-references/get-document-reference-content"}]},{"group":"Laboratories","pages":[{"title":"Create lab requisition","deprecated":null,"version":null,"openapi":"/openapi.json post /laboratories","href":"/api-reference/laboratories/create-lab-requisition"}]},{"group":"Medication Statements","pages":[{"title":"List medication statements","deprecated":null,"version":null,"openapi":"/openapi.json get /medication-statements","href":"/api-reference/medication-statements/list-medication-statements"},{"title":"Create medication statement","deprecated":null,"version":null,"openapi":"/openapi.json post /medication-statements","href":"/api-reference/medication-statements/create-medication-statement"},{"title":"Get medication statement","deprecated":null,"version":null,"openapi":"/openapi.json get /medication-statements/{id}","href":"/api-reference/medication-statements/get-medication-statement"}]},{"group":"Observations","pages":[{"title":"List observations","deprecated":null,"version":null,"openapi":"/openapi.json get /observations","href":"/api-reference/observations/list-observations"},{"title":"Create observation","deprecated":null,"version":null,"openapi":"/openapi.json post /observations","href":"/api-reference/observations/create-observation"},{"title":"Get observation","deprecated":null,"version":null,"openapi":"/openapi.json get /observations/{id}","href":"/api-reference/observations/get-observation"}]},{"group":"Organizations","pages":[{"title":"Get organization","deprecated":null,"version":null,"openapi":"/openapi.json get /organizations/{id}","href":"/api-reference/organizations/get-organization"}]},{"group":"Patients","pages":[{"title":"List patients","deprecated":null,"version":null,"openapi":"/openapi.json get /patients","href":"/api-reference/patients/list-patients"},{"title":"Create patient","deprecated":null,"version":null,"openapi":"/openapi.json post /patients","href":"/api-reference/patients/create-patient"},{"title":"Get patient","deprecated":null,"version":null,"openapi":"/openapi.json get /patients/{id}","href":"/api-reference/patients/get-patient"},{"title":"Update patient","deprecated":null,"version":null,"openapi":"/openapi.json put /patients/{id}","href":"/api-reference/patients/update-patient"}]},{"group":"Users","pages":[{"title":"Delete your account","deprecated":null,"version":null,"openapi":"/openapi.json delete /iam/users/me","href":"/api-reference/users/delete-your-account"},{"title":"Get a user's linked record","deprecated":null,"version":null,"openapi":"/openapi.json get /iam/users/links","href":"/api-reference/users/get-a-users-linked-record"},{"title":"Find a user by email","deprecated":null,"version":null,"openapi":"/openapi.json get /iam/users/find","href":"/api-reference/users/find-a-user-by-email"}]},{"group":"Questionnaire Responses","pages":[{"title":"List questionnaire responses","deprecated":null,"version":null,"openapi":"/openapi.json get /questionnaire-responses","href":"/api-reference/questionnaire-responses/list-questionnaire-responses"},{"title":"Create questionnaire response","deprecated":null,"version":null,"openapi":"/openapi.json post /questionnaire-responses","href":"/api-reference/questionnaire-responses/create-questionnaire-response"},{"title":"Get questionnaire response","deprecated":null,"version":null,"openapi":"/openapi.json get /questionnaire-responses/{id}","href":"/api-reference/questionnaire-responses/get-questionnaire-response"},{"title":"Update questionnaire response","deprecated":null,"version":null,"openapi":"/openapi.json put /questionnaire-responses/{id}","href":"/api-reference/questionnaire-responses/update-questionnaire-response"}]},{"group":"Questionnaires","pages":[{"title":"List questionnaires","deprecated":null,"version":null,"openapi":"/openapi.json get /questionnaires","href":"/api-reference/questionnaires/list-questionnaires"},{"title":"Get questionnaire","deprecated":null,"version":null,"openapi":"/openapi.json get /questionnaires/{id}","href":"/api-reference/questionnaires/get-questionnaire"}]},{"group":"Related Persons","pages":[{"title":"List related persons","deprecated":null,"version":null,"openapi":"/openapi.json get /related-persons","href":"/api-reference/related-persons/list-related-persons"},{"title":"Create related person","deprecated":null,"version":null,"openapi":"/openapi.json post /related-persons","href":"/api-reference/related-persons/create-related-person"},{"title":"Get related person","deprecated":null,"version":null,"openapi":"/openapi.json get /related-persons/{id}","href":"/api-reference/related-persons/get-related-person"},{"title":"Update related person","deprecated":null,"version":null,"openapi":"/openapi.json put /related-persons/{id}","href":"/api-reference/related-persons/update-related-person"}]},{"group":"Sites","pages":[{"title":"List sites","deprecated":null,"version":null,"openapi":"/openapi.json get /sites","href":"/api-reference/sites/list-sites"},{"title":"Create site","deprecated":null,"version":null,"openapi":"/openapi.json post /sites","href":"/api-reference/sites/create-site"},{"title":"Get site","deprecated":null,"version":null,"openapi":"/openapi.json get /sites/{key}","href":"/api-reference/sites/get-site"},{"title":"Delete site","deprecated":null,"version":null,"openapi":"/openapi.json delete /sites/{key}","href":"/api-reference/sites/delete-site"},{"title":"Update site","deprecated":null,"version":null,"openapi":"/openapi.json patch /sites/{key}","href":"/api-reference/sites/update-site"}]},{"group":"Tasks","pages":[{"title":"List tasks","deprecated":null,"version":null,"openapi":"/openapi.json get /tasks","href":"/api-reference/tasks/list-tasks"},{"title":"Create task","deprecated":null,"version":null,"openapi":"/openapi.json post /tasks","href":"/api-reference/tasks/create-task"},{"title":"Get task","deprecated":null,"version":null,"openapi":"/openapi.json get /tasks/{id}","href":"/api-reference/tasks/get-task"},{"title":"Update task","deprecated":null,"version":null,"openapi":"/openapi.json put /tasks/{id}","href":"/api-reference/tasks/update-task"},{"title":"Delete task","deprecated":null,"version":null,"openapi":"/openapi.json delete /tasks/{id}","href":"/api-reference/tasks/delete-task"}]},{"group":"Scheduling","pages":[{"title":"List bookable appointment types","deprecated":null,"version":null,"openapi":"/openapi.json get /appointment-types","href":"/api-reference/scheduling/list-bookable-appointment-types"},{"title":"Retrieve an appointment type","deprecated":null,"version":null,"openapi":"/openapi.json get /appointment-types/{id}","href":"/api-reference/scheduling/retrieve-an-appointment-type"},{"title":"Search available slots","deprecated":null,"version":null,"openapi":"/openapi.json get /slots","href":"/api-reference/scheduling/search-available-slots"},{"title":"Reserve a slot","deprecated":null,"version":null,"openapi":"/openapi.json post /reservations","href":"/api-reference/scheduling/reserve-a-slot"},{"title":"Release a slot reservation","deprecated":null,"version":null,"openapi":"/openapi.json delete /reservations/{id}","href":"/api-reference/scheduling/release-a-slot-reservation"},{"title":"List appointments","deprecated":null,"version":null,"openapi":"/openapi.json get /appointments","href":"/api-reference/scheduling/list-appointments"},{"title":"Book an appointment","deprecated":null,"version":null,"openapi":"/openapi.json post /appointments","href":"/api-reference/scheduling/book-an-appointment"},{"title":"Retrieve an appointment","deprecated":null,"version":null,"openapi":"/openapi.json get /appointments/{id}","href":"/api-reference/scheduling/retrieve-an-appointment"},{"title":"Update an appointment","deprecated":null,"version":null,"openapi":"/openapi.json patch /appointments/{id}","href":"/api-reference/scheduling/update-an-appointment"}]},{"group":"Prices","pages":[{"title":"Get Price","deprecated":null,"version":null,"openapi":"/openapi.json get /prices/{price_id}","href":"/api-reference/prices/get-price"}]},{"group":"Products","pages":[{"title":"List Products","deprecated":null,"version":null,"openapi":"/openapi.json get /products","href":"/api-reference/products/list-products"},{"title":"Get Product By Id","deprecated":null,"version":null,"openapi":"/openapi.json get /products/{product_id}","href":"/api-reference/products/get-product-by-id"},{"title":"List Product Prices","deprecated":null,"version":null,"openapi":"/openapi.json get /products/{product_id}/prices","href":"/api-reference/products/list-product-prices"}]},{"group":"Checkout","pages":[{"title":"Create Checkout Session","deprecated":null,"version":null,"openapi":"/openapi.json post /checkouts/sessions","href":"/api-reference/checkout/create-checkout-session"}]},{"group":"Coupons","pages":[{"title":"List Coupons","deprecated":null,"version":null,"openapi":"/openapi.json get /coupons","href":"/api-reference/coupons/list-coupons"},{"title":"Create Coupons","deprecated":null,"version":null,"openapi":"/openapi.json post /coupons","href":"/api-reference/coupons/create-coupons"},{"title":"Get Coupon","deprecated":null,"version":null,"openapi":"/openapi.json get /coupons/{provider_coupon_id}","href":"/api-reference/coupons/get-coupon"},{"title":"Delete Coupon","deprecated":null,"version":null,"openapi":"/openapi.json delete /coupons/{provider_coupon_id}","href":"/api-reference/coupons/delete-coupon"}]},{"group":"Intents","pages":[{"title":"Get Payment Intent","deprecated":null,"version":null,"openapi":"/openapi.json get /intents/payments/{provider_payment_intent_id}","href":"/api-reference/intents/get-payment-intent"},{"title":"Get Setup Intent","deprecated":null,"version":null,"openapi":"/openapi.json get /intents/setups/{provider_setup_intent_id}","href":"/api-reference/intents/get-setup-intent"},{"title":"Create Setup Intent","deprecated":null,"version":null,"openapi":"/openapi.json post /intents/setups","href":"/api-reference/intents/create-setup-intent"}]},{"group":"Invoices","pages":[{"title":"Get Invoices","deprecated":null,"version":null,"openapi":"/openapi.json get /invoices","href":"/api-reference/invoices/get-invoices"},{"title":"Create Invoice Preview","deprecated":null,"version":null,"openapi":"/openapi.json post /invoices/previews","href":"/api-reference/invoices/create-invoice-preview"},{"title":"Pay Invoice","deprecated":null,"version":null,"openapi":"/openapi.json post /invoices/{provider_invoice_id}/payments","href":"/api-reference/invoices/pay-invoice"},{"title":"Create Refund","deprecated":null,"version":null,"openapi":"/openapi.json post /invoices/{provider_invoice_id}/refunds","href":"/api-reference/invoices/create-refund"}]},{"group":"Payment Methods","pages":[{"title":"Get Payment Methods","deprecated":null,"version":null,"openapi":"/openapi.json get /payment-methods","href":"/api-reference/payment-methods/get-payment-methods"}]},{"group":"Promotion Codes","pages":[{"title":"List Promotion Codes","deprecated":null,"version":null,"openapi":"/openapi.json get /promotion-codes","href":"/api-reference/promotion-codes/list-promotion-codes"},{"title":"Create Promotion Code","deprecated":null,"version":null,"openapi":"/openapi.json post /promotion-codes","href":"/api-reference/promotion-codes/create-promotion-code"},{"title":"Deactivate Promotion Code","deprecated":null,"version":null,"openapi":"/openapi.json delete /promotion-codes/{provider_promotion_code_id}","href":"/api-reference/promotion-codes/deactivate-promotion-code"}]},{"group":"Subscriptions","pages":[{"title":"Get Subscriptions","description":"Lists subscriptions for a customer identified by email. Supports limit and status filtering.","deprecated":null,"version":null,"openapi":"/openapi.json get /subscriptions","href":"/api-reference/subscriptions/get-subscriptions"},{"title":"Create Subscription","deprecated":null,"version":null,"openapi":"/openapi.json post /subscriptions","href":"/api-reference/subscriptions/create-subscription"},{"title":"Get Subscription","description":"Retrieves a single subscription by `provider_subscription_id` within your configuration, in the same shape as each item returned by `GET /subscriptions`.","deprecated":null,"version":null,"openapi":"/openapi.json get /subscriptions/{provider_subscription_id}","href":"/api-reference/subscriptions/get-subscription"},{"title":"Update Subscription","deprecated":null,"version":null,"openapi":"/openapi.json put /subscriptions/{provider_subscription_id}","href":"/api-reference/subscriptions/update-subscription"},{"title":"Cancel Subscription","deprecated":null,"version":null,"openapi":"/openapi.json delete /subscriptions/{provider_subscription_id}","href":"/api-reference/subscriptions/cancel-subscription"},{"title":"List Subscription Invoices","deprecated":null,"version":null,"openapi":"/openapi.json get /subscriptions/{provider_subscription_id}/invoices","href":"/api-reference/subscriptions/list-subscription-invoices"},{"title":"Pause Subscription","deprecated":null,"version":null,"openapi":"/openapi.json post /subscriptions/{provider_subscription_id}/pauses","href":"/api-reference/subscriptions/pause-subscription"},{"title":"Resume Subscription","deprecated":null,"version":null,"openapi":"/openapi.json delete /subscriptions/{provider_subscription_id}/pauses","href":"/api-reference/subscriptions/resume-subscription"}]},{"group":"Configs","pages":[{"title":"Get Config","deprecated":null,"version":null,"openapi":"/openapi.json get /configs","href":"/api-reference/configs/get-config"}]},{"group":"Billing Portals","pages":[{"title":"List Billing Portals","deprecated":null,"version":null,"openapi":"/openapi.json get /billing-portals","href":"/api-reference/billing-portals/list-billing-portals"},{"title":"Create Retention Portal Session","deprecated":null,"version":null,"openapi":"/openapi.json post /billing-portals/retention-sessions","href":"/api-reference/billing-portals/create-retention-portal-session"},{"title":"Create Portal Session","deprecated":null,"version":null,"openapi":"/openapi.json post /billing-portals/{provider_billing_portal_id}/sessions","href":"/api-reference/billing-portals/create-portal-session"}]},{"group":"Auth","pages":[]},{"group":"Billing Customers","pages":[{"title":"Get Customers","deprecated":null,"version":null,"openapi":"/openapi.json get /billing-customers","href":"/api-reference/billing-customers/get-customers"},{"title":"Create Customer","deprecated":null,"version":null,"openapi":"/openapi.json post /billing-customers","href":"/api-reference/billing-customers/create-customer"},{"title":"Get Customer","deprecated":null,"version":null,"openapi":"/openapi.json get /billing-customers/{provider_customer_id}","href":"/api-reference/billing-customers/get-customer"},{"title":"Update Customer","deprecated":null,"version":null,"openapi":"/openapi.json put /billing-customers/{provider_customer_id}","href":"/api-reference/billing-customers/update-customer"},{"title":"List Billing Customer Subscriptions","deprecated":null,"version":null,"openapi":"/openapi.json get /billing-customers/{provider_customer_id}/subscriptions","href":"/api-reference/billing-customers/list-billing-customer-subscriptions"},{"title":"List Balance Transactions","deprecated":null,"version":null,"openapi":"/openapi.json get /billing-customers/{provider_customer_id}/balance-transactions","href":"/api-reference/billing-customers/list-balance-transactions"},{"title":"Create Balance Transaction","deprecated":null,"version":null,"openapi":"/openapi.json post /billing-customers/{provider_customer_id}/balance-transactions","href":"/api-reference/billing-customers/create-balance-transaction"}]},{"group":"Eligibility","pages":[{"title":"Submit an eligibility verification","deprecated":null,"version":null,"openapi":"/openapi.json post /eligibility-verifications","href":"/api-reference/eligibility/submit-an-eligibility-verification"},{"title":"Retrieve an eligibility verification","deprecated":null,"version":null,"openapi":"/openapi.json get /eligibility-verifications/{id}","href":"/api-reference/eligibility/retrieve-an-eligibility-verification"},{"title":"Submit an insurance discovery","deprecated":null,"version":null,"openapi":"/openapi.json post /insurance-discoveries","href":"/api-reference/eligibility/submit-an-insurance-discovery"},{"title":"Retrieve an insurance discovery","deprecated":null,"version":null,"openapi":"/openapi.json get /insurance-discoveries/{id}","href":"/api-reference/eligibility/retrieve-an-insurance-discovery"},{"title":"Coordinate benefits across payers","deprecated":null,"version":null,"openapi":"/openapi.json post /benefit-coordinations","href":"/api-reference/eligibility/coordinate-benefits-across-payers"},{"title":"Resolve a Medicare Beneficiary Identifier","deprecated":null,"version":null,"openapi":"/openapi.json post /medicare-id-lookups","href":"/api-reference/eligibility/resolve-a-medicare-beneficiary-identifier"},{"title":"Check network status for a payer in a state","deprecated":null,"version":null,"openapi":"/openapi.json post /network-status","href":"/api-reference/eligibility/check-network-status-for-a-payer-in-a-state"}]},{"group":"Payer Directory","pages":[{"title":"List or search payers","deprecated":null,"version":null,"openapi":"/openapi.json get /payers","href":"/api-reference/payer-directory/list-or-search-payers"},{"title":"Retrieve a payer","deprecated":null,"version":null,"openapi":"/openapi.json get /payers/{payer_id}","href":"/api-reference/payer-directory/retrieve-a-payer"}]},{"group":"Patient Passport","pages":[{"title":"Get a patient's Passport profile","deprecated":null,"version":null,"openapi":"/openapi.json get /passport/profile","href":"/api-reference/patient-passport/get-a-patients-passport-profile"},{"title":"List a patient's Passport appointments","deprecated":null,"version":null,"openapi":"/openapi.json get /passport/appointments","href":"/api-reference/patient-passport/list-a-patients-passport-appointments"},{"title":"List a patient's Passport orders","deprecated":null,"version":null,"openapi":"/openapi.json get /passport/orders","href":"/api-reference/patient-passport/list-a-patients-passport-orders"},{"title":"List a patient's Passport subscriptions","deprecated":null,"version":null,"openapi":"/openapi.json get /passport/subscriptions","href":"/api-reference/patient-passport/list-a-patients-passport-subscriptions"},{"title":"Get a patient's Passport journey","deprecated":null,"version":null,"openapi":"/openapi.json get /passport/journey","href":"/api-reference/patient-passport/get-a-patients-passport-journey"}]}]}]},"basePath":"","title":"Create Subscription - Partners API Documentation","deploymentId":"dpl_FZMKUpaaKiVETbfqhoUe4sPFDTmY","buildId":"dpl_FZMKUpaaKiVETbfqhoUe4sPFDTmY","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-B6WFFOBL.js","utils-BN5um1KA.js","cloneDeep-C3md22mN.js","_Uint8Array-DLlL8L26.js","isObject-FP1Yky1u.js","utils-BSmbkXJR.js","addUniqueKeysToSchema-2tqcVnUE.js","snippetPresets-CtWfvr2J.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-DkKHBy30.js","isEqual-O3q7y6pq.js","usePlaygroundInputsStore-Brc5H9UJ.js","shallow-C4L4xvbs.js","getApiPlaygroundDisplay-2bxyq_aI.js","CodeSnippet-BJu8ddd5.js","CodeSnippets-dazWmoqB.js","Page-CnLhKuUV.js","getPastedJson-Chy3Qa1S.js","icon-CyO7h3jh.js","MethodPill-Dle0_91v.js","DuplicateIcon-CVvWAf4a.js","createIcon-Di07A27B.js","DynamicMarkdown-C4w9kavL.js","SectionHeading-XiBebVYC.js","axios-vUo_bRtp.js","Markdown-DTeL0SpS.js","dist-OCScizqf.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","katex-YMM-FMeD.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js","AssistantPageLink-KcneGfMY.js"]}