Create a new subscription. The subscription is typically returned in incomplete status; the customer must complete first-payment authorization via the returned checkout_url before the subscription transitions to active (or trialing).
Billing cycle anchor, Unix seconds. Mutually exclusive with trial_end; in non-trial scenarios it must be in the future, or now/past for immediate first charge.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"StablePay 文档","description":"稳定、安全、易用的稳定币支付解决方案","colors":{"primary":"#2454fc","light":"#557efc","dark":"#d2eafb"},"logo":{"light":"https://mintcdn.com/stablepay-a1f5fa99/xOIDhGi9P3TuJYlm/images/%E8%8B%B1%E6%96%87logo.png?fit=max\u0026auto=format\u0026n=xOIDhGi9P3TuJYlm\u0026q=85\u0026s=c344e915c981d92f80998f8f5ec00792","dark":"https://mintcdn.com/stablepay-a1f5fa99/xOIDhGi9P3TuJYlm/images/%E8%8B%B1%E6%96%87logo.png?fit=max\u0026auto=format\u0026n=xOIDhGi9P3TuJYlm\u0026q=85\u0026s=c344e915c981d92f80998f8f5ec00792","href":"https://stablepayfi.ai/"},"favicon":"https://media.brand.dev/144a80cc-7738-4a39-9c0e-a2b7cbbf94ce.png","api":{"params":{"expanded":"closed"},"playground":{"display":"simple","proxy":true,"credentials":false},"examples":{"defaults":"all","languages":["bash","javascript"],"prefill":false,"autogenerate":false}},"appearance":{"default":"system"},"background":{"decoration":"gradient"},"seo":{"indexing":"navigable"},"styling":{"eyebrows":"section","codeblocks":"system","latex":false},"contextual":{"options":["copy","view","chatgpt"],"display":"header"},"metadata":{"timestamp":true},"navigation":{"languages":[{"language":"zh","default":true,"navbar":{"links":[{"href":"https://stablepayfi.ai/","label":"StablePay 官网"},{"href":"https://merchant.stablepayfi.ai/","label":"商户后台"}]},"href":"zh/product/Get-Started"},{"language":"en","navbar":{"links":[{"href":"https://stablepayfi.ai/","label":"StablePay Website"},{"href":"https://merchant.stablepayfi.ai/","label":"Merchant Portal"}]},"href":"en/product/Get-Started"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"stablepay-a1f5fa99","hasAudioNarration":false,"actualSubdomain":"stablepay-a1f5fa99","customDomains":["docs.stablepayfi.ai"],"gitSource":{"type":"github","owner":"stablepayfi-ai","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae302ba264f7878df3f7f5c","collectionId":"68f11468-abd9-4d60-aa67-87835873633e","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae302ba264f7878df3f7f5c"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae302ba264f7878df3f7f5c","clientVersion":"0.0.4021","searchFilterCounts":[{"language":"en","tag":"API","count":53},{"language":"zh","tag":"API 参考","count":53},{"language":"en","tag":"Product","count":20},{"language":"zh","tag":"产品文档","count":20},{"language":"en","tag":"Global Accounts API","count":17},{"language":"zh","tag":"全球账户 API","count":17},{"language":"en","tag":"Stablecoin Exchange API","count":10},{"language":"zh","tag":"稳定币兑换 API","count":10},{"language":"en","tag":"FAQ","count":9},{"language":"zh","tag":"常见问题","count":9},{"language":"en","tag":"Payouts API","count":7},{"language":"en","tag":"Reference","count":7},{"language":"zh","tag":"付款 API","count":7},{"language":"zh","tag":"参考","count":7},{"language":"en","tag":"Pay In","count":6},{"language":"zh","tag":"稳定币收单","count":6},{"language":"en","tag":"SaaS","count":4},{"language":"en","tag":"Payment API","count":4},{"language":"zh","tag":"SaaS接入","count":4},{"language":"zh","tag":"支付 API","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/subscriptions/create-subscription","slug":"/api-reference/subscriptions/create-subscription","pageMetadata":{"title":"Create subscription","description":"Create a new subscription. The subscription is typically returned in `incomplete` status; the customer must complete first-payment authorization via the returned `checkout_url` before the subscription transitions to `active` (or `trialing`).","deprecated":null,"version":null,"openapi":"/en/api/subscription-openapi.json post /api/v1/subscriptions/create","href":"/api-reference/subscriptions/create-subscription","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Create a new subscription. The subscription is typically returned in \", _jsx(_components.code, {\n children: \"incomplete\"\n }), \" status; the customer must complete first-payment authorization via the returned \", _jsx(_components.code, {\n children: \"checkout_url\"\n }), \" before the subscription transitions to \", _jsx(_components.code, {\n children: \"active\"\n }), \" (or \", _jsx(_components.code, {\n children: \"trialing\"\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":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Create subscription","description":"Create a new subscription. The subscription is typically returned in `incomplete` status; the customer must complete first-payment authorization via the returned `checkout_url` before the subscription transitions to `active` (or `trialing`).","deprecated":null,"version":null,"openapi":"/en/api/subscription-openapi.json post /api/v1/subscriptions/create","href":"/api-reference/subscriptions/create-subscription","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Subscriptions"],"operationId":"createSubscription","summary":"Create subscription","description":"Create a new subscription. The subscription is typically returned in `incomplete` status; the customer must complete first-payment authorization via the returned `checkout_url` before the subscription transitions to `active` (or `trialing`).","requestBody":"c50f7f4c-03b9-4261-a4b2-0735fdf74d3d","responses":{"200":"a7f67f76-9627-4e87-b026-1296522d1d72","400":"30433d7f-5e5d-4120-a7fa-b5d51cf782a0","401":"7cdbd7db-dc82-4e94-8a33-5f24c3deab93","500":"3112e56d-c683-45af-962c-fe38293de93b"},"parameters":["fe200780-25b7-4930-afdc-470d9a923865","f28546b9-bfcd-4cfb-b470-b56a3395ee27","09e7c5df-23bf-431a-9c03-97289fd768e4","3f09893e-941f-4d7f-b121-c624514f4dc4"],"method":"post","type":"path","servers":["263c7760-6782-4119-b1fe-918e4000200e"],"security":["da238c8d-45aa-40b2-ac96-53b85d6f5f58"],"path":"/api/v1/subscriptions/create","baseUrlOptions":["https://api.stablepay.co"],"title":"Create subscription","codeSamples":[],"requestExampleLanguages":["bash","javascript"],"requiredOnlyExamples":false,"disableCodeSampleGeneration":true,"responseExampleType":"generated"},"dependencies":{"parameters":{"fe200780-25b7-4930-afdc-470d9a923865":{"name":"Idempotency-Key","in":"header","required":true,"description":"Merchant-generated idempotency key, up to 128 characters. Retrying with the same key returns the first created subscription.","schema":{"type":"string","maxLength":128,"isRequired":true,"description":"Merchant-generated idempotency key, up to 128 characters. Retrying with the same key returns the first created subscription.","uniqueKey":"","typeLabel":"string"},"example":"sub_create_20260430_0001"},"f28546b9-bfcd-4cfb-b470-b56a3395ee27":{"name":"X-StablePay-Timestamp","in":"header","required":true,"description":"Unix timestamp in seconds. Must be within 5 minutes of server time.","schema":{"type":"string","isRequired":true,"description":"Unix timestamp in seconds. Must be within 5 minutes of server time.","uniqueKey":"","typeLabel":"string"},"example":"1735689600"},"09e7c5df-23bf-431a-9c03-97289fd768e4":{"name":"X-StablePay-Nonce","in":"header","required":true,"description":"Replay-protection nonce, 16-64 characters. Use a fresh UUID per request.","schema":{"type":"string","minLength":16,"maxLength":64,"isRequired":true,"description":"Replay-protection nonce, 16-64 characters. Use a fresh UUID per request.","uniqueKey":"","typeLabel":"string"},"example":"550e8400-e29b-41d4-a716-446655440000"},"3f09893e-941f-4d7f-b121-c624514f4dc4":{"name":"X-StablePay-Signature","in":"header","required":true,"description":"Lowercase hex HMAC-SHA256 of `{timestamp}.{nonce}.{requestBody}` signed with the merchant API Secret. For GET requests, `requestBody` is an empty string.","schema":{"type":"string","isRequired":true,"description":"Lowercase hex HMAC-SHA256 of `{timestamp}.{nonce}.{requestBody}` signed with the merchant API Secret. For GET requests, `requestBody` is an empty string.","uniqueKey":"","typeLabel":"string"},"example":"a1b2c3d4e5f6..."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items","customer"],"properties":{"items":{"type":"array","minItems":1,"maxItems":1,"description":"Subscription items. Exactly one item is currently supported.","items":{"type":"object","required":["price_data","quantity"],"properties":{"price_data":{"type":"object","required":["price_id","currency","product","unit_amount","recurring"],"properties":{"price_id":{"type":"string","description":"Price object ID. Required for business idempotency/identification.","isRequired":true,"uniqueKey":"\\items.items.[INDEX].price_data.price_id","typeLabel":"string"},"currency":{"type":"string","enum":["USD","usd"],"description":"Price currency. Currently only `USD` is supported.","isRequired":true,"uniqueKey":"\\items.items.[INDEX].price_data.currency","typeLabel":"enum\u003cstring>"},"product":{"type":"string","description":"Product ID or product name. Cannot be empty.","isRequired":true,"uniqueKey":"\\items.items.[INDEX].price_data.product","typeLabel":"string"},"unit_amount":{"type":"integer","format":"int64","minimum":1,"description":"Unit amount in minor units. Must be greater than 0.","isRequired":true,"uniqueKey":"\\items.items.[INDEX].price_data.unit_amount","typeLabel":"integer\u003cint64>"},"recurring":{"type":"object","required":["interval"],"properties":{"interval":{"type":"string","enum":["day","week","month","year"],"description":"Billing interval.","isRequired":true,"uniqueKey":"\\items.items.[INDEX].price_data.recurring.interval","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"\\items.items.[INDEX].price_data.recurring","typeLabel":"object"}},"isRequired":true,"uniqueKey":"\\items.items.[INDEX].price_data","typeLabel":"object"},"quantity":{"type":"integer","minimum":1,"description":"Quantity. The current implementation does not apply a default, so it must be supplied and be at least 1.","isRequired":true,"uniqueKey":"\\items.items.[INDEX].quantity","typeLabel":"integer"},"metadata":{"type":"object","additionalProperties":true,"description":"Subscription item metadata.","uniqueKey":"\\items.items.[INDEX].metadata","typeLabel":"object"}},"uniqueKey":"\\items.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"\\items","typeLabel":"object[]"},"customer":{"type":"string","description":"External customer ID from the merchant system.","isRequired":true,"uniqueKey":"customer","typeLabel":"string"},"customer_email":{"type":"string","format":"email","description":"Customer email.","uniqueKey":"customer_email","typeLabel":"string\u003cemail>"},"customer_phone":{"type":"string","description":"Customer phone number.","uniqueKey":"customer_phone","typeLabel":"string"},"customer_name":{"type":"string","maxLength":255,"description":"Customer name.","uniqueKey":"customer_name","typeLabel":"string"},"currency":{"type":"string","enum":["USD","usd"],"description":"Subscription currency. Currently only `USD` is supported; can be omitted and derived from price_data.currency.","uniqueKey":"currency","typeLabel":"enum\u003cstring>"},"description":{"type":"string","maxLength":500,"description":"Subscription description.","uniqueKey":"description","typeLabel":"string"},"success_url":{"type":"string","maxLength":512,"description":"Redirect URL after the initial payment succeeds. Maximum 512 characters.","uniqueKey":"success_url","typeLabel":"string"},"cancel_url":{"type":"string","maxLength":512,"description":"Redirect URL after the initial payment is canceled. Maximum 512 characters.","uniqueKey":"cancel_url","typeLabel":"string"},"trial_end":{"type":"integer","format":"int64","description":"Trial end time, Unix seconds. Mutually exclusive with `billing_cycle_anchor`.","uniqueKey":"trial_end","typeLabel":"integer\u003cint64>"},"billing_cycle_anchor":{"type":"integer","format":"int64","description":"Billing cycle anchor, Unix seconds. Mutually exclusive with `trial_end`; in non-trial scenarios it must be in the future, or now/past for immediate first charge.","uniqueKey":"billing_cycle_anchor","typeLabel":"integer\u003cint64>"},"cancel_at":{"type":"integer","format":"int64","description":"Scheduled cancellation time, Unix seconds. Must be in the future and is mutually exclusive with `iterations`.","uniqueKey":"cancel_at","typeLabel":"integer\u003cint64>"},"iterations":{"type":"integer","minimum":1,"description":"Automatically cancel after N billing cycles. Must be greater than 0 and is mutually exclusive with `cancel_at`.","uniqueKey":"iterations","typeLabel":"integer"},"metadata":{"type":"object","additionalProperties":true,"description":"Merchant metadata.","uniqueKey":"metadata","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"items":[{"price_data":{"price_id":"price_monthly_001","currency":"USD","product":"Pro Plan","unit_amount":1999,"recurring":{"interval":"month"}},"quantity":1}],"customer":"cust_001","customer_email":"alice@example.com","customer_name":"Alice","currency":"USD","description":"Pro Monthly Plan","success_url":"https://merchant.example/success","cancel_url":"https://merchant.example/cancel","metadata":{"merchant_order_no":"sub_order_1001"}},"examples":{"Example":{"title":"Example","value":{"items":[{"price_data":{"price_id":"price_monthly_001","currency":"USD","product":"Pro Plan","unit_amount":1999,"recurring":{"interval":"month"}},"quantity":1}],"customer":"cust_001","customer_email":"alice@example.com","customer_name":"Alice","currency":"USD","description":"Pro Monthly Plan","success_url":"https://merchant.example/success","cancel_url":"https://merchant.example/cancel","metadata":{"merchant_order_no":"sub_order_1001"}}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"a7f67f76-9627-4e87-b026-1296522d1d72":{"description":"Subscription created. Reusing the same `Idempotency-Key` returns the first created subscription.","content":{"application/json":{"schema":{"type":"object","description":"Subscription object.","properties":{"id":{"type":"string","description":"Subscription ID.","uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","example":"subscription","uniqueKey":"object","typeLabel":"string"},"customer":{"type":"string","description":"External customer ID.","uniqueKey":"customer","typeLabel":"string"},"store_id":{"type":"string","description":"Store ID.","uniqueKey":"store_id","typeLabel":"string"},"currency":{"type":"string","description":"Currency.","uniqueKey":"currency","typeLabel":"string"},"description":{"type":"string","description":"Subscription description.","uniqueKey":"description","typeLabel":"string"},"status":{"type":"string","enum":["incomplete","trialing","active","past_due","canceled","incomplete_expired"],"description":"Subscription status.","uniqueKey":"status","typeLabel":"enum\u003cstring>"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Subscription item ID.","uniqueKey":"\\items.items.[INDEX].id","typeLabel":"string"},"price_data":{"type":"object","properties":{"id":{"type":"string","description":"Price ID. This field is usually not returned by the current HTTP response.","uniqueKey":"\\items.items.[INDEX].price_data.id","typeLabel":"string"},"currency":{"type":"string","description":"Currency.","uniqueKey":"\\items.items.[INDEX].price_data.currency","typeLabel":"string"},"product":{"type":"string","description":"Product ID or product name.","uniqueKey":"\\items.items.[INDEX].price_data.product","typeLabel":"string"},"unit_amount":{"type":"integer","format":"int64","description":"Unit amount in minor units.","uniqueKey":"\\items.items.[INDEX].price_data.unit_amount","typeLabel":"integer\u003cint64>"},"recurring":{"type":"object","properties":{"interval":{"type":"string","enum":["day","week","month","year"],"description":"Billing interval.","uniqueKey":"\\items.items.[INDEX].price_data.recurring.interval","typeLabel":"enum\u003cstring>"},"interval_count":{"type":"integer","description":"Billing interval count. Currently fixed to 1 by the server.","uniqueKey":"\\items.items.[INDEX].price_data.recurring.interval_count","typeLabel":"integer"}},"uniqueKey":"\\items.items.[INDEX].price_data.recurring","typeLabel":"object"}},"uniqueKey":"\\items.items.[INDEX].price_data","typeLabel":"object"},"quantity":{"type":"integer","minimum":1,"description":"Quantity.","uniqueKey":"\\items.items.[INDEX].quantity","typeLabel":"integer"},"metadata":{"type":"object","additionalProperties":true,"description":"Subscription item metadata.","uniqueKey":"\\items.items.[INDEX].metadata","typeLabel":"object"}},"uniqueKey":"\\items.items.[INDEX]","typeLabel":"object"},"description":"Subscription items.","uniqueKey":"\\items","typeLabel":"object[]"},"payment_method_id":{"type":"string","description":"Default payment method ID.","uniqueKey":"payment_method_id","typeLabel":"string"},"billing_cycle_anchor":{"type":"integer","format":"int64","description":"Billing cycle anchor, Unix seconds.","uniqueKey":"billing_cycle_anchor","typeLabel":"integer\u003cint64>"},"current_period_start":{"type":"integer","format":"int64","description":"Current period start, Unix seconds.","uniqueKey":"current_period_start","typeLabel":"integer\u003cint64>"},"current_period_end":{"type":"integer","format":"int64","description":"Current period end, Unix seconds.","uniqueKey":"current_period_end","typeLabel":"integer\u003cint64>"},"canceled_at":{"type":"integer","format":"int64","description":"Cancellation time, Unix seconds.","uniqueKey":"canceled_at","typeLabel":"integer\u003cint64>"},"cancel_at":{"type":"integer","format":"int64","description":"Scheduled cancellation time, Unix seconds.","uniqueKey":"cancel_at","typeLabel":"integer\u003cint64>"},"latest_invoice":{"type":"string","description":"Latest invoice ID.","uniqueKey":"latest_invoice","typeLabel":"string"},"latest_invoice_object":{"type":"object","description":"Full invoice object returned when `expand=latest_invoice`.","required":["id","object","subscription_id","customer","amount_due","amount_paid","amount_remaining","currency","status","payment_status","billing_reason","period_start","period_end","created"],"properties":{"id":{"type":"string","description":"Invoice ID.","isRequired":true,"uniqueKey":"latest_invoice_object.id","typeLabel":"string"},"object":{"type":"string","example":"invoice","isRequired":true,"uniqueKey":"latest_invoice_object.object","typeLabel":"string"},"subscription_id":{"type":"string","description":"Related subscription ID.","isRequired":true,"uniqueKey":"latest_invoice_object.subscription_id","typeLabel":"string"},"customer":{"type":"string","description":"Customer ID.","isRequired":true,"uniqueKey":"latest_invoice_object.customer","typeLabel":"string"},"amount_due":{"type":"integer","format":"int64","description":"Amount due in minor units.","isRequired":true,"uniqueKey":"latest_invoice_object.amount_due","typeLabel":"integer\u003cint64>"},"amount_paid":{"type":"integer","format":"int64","description":"Amount paid in minor units.","isRequired":true,"uniqueKey":"latest_invoice_object.amount_paid","typeLabel":"integer\u003cint64>"},"amount_remaining":{"type":"integer","format":"int64","description":"Amount remaining in minor units.","isRequired":true,"uniqueKey":"latest_invoice_object.amount_remaining","typeLabel":"integer\u003cint64>"},"currency":{"type":"string","description":"Currency.","isRequired":true,"uniqueKey":"latest_invoice_object.currency","typeLabel":"string"},"status":{"type":"string","enum":["open","paid","void"],"description":"Invoice status.","isRequired":true,"uniqueKey":"latest_invoice_object.status","typeLabel":"enum\u003cstring>"},"payment_status":{"type":"string","enum":["pending","processing","completed","failed","canceled","expired"],"description":"Invoice payment status.","isRequired":true,"uniqueKey":"latest_invoice_object.payment_status","typeLabel":"enum\u003cstring>"},"billing_reason":{"type":"string","description":"Billing reason, for example `subscription_create` or `subscription_cycle`.","isRequired":true,"uniqueKey":"latest_invoice_object.billing_reason","typeLabel":"string"},"period_start":{"type":"integer","format":"int64","description":"Billing period start, Unix seconds.","isRequired":true,"uniqueKey":"latest_invoice_object.period_start","typeLabel":"integer\u003cint64>"},"period_end":{"type":"integer","format":"int64","description":"Billing period end, Unix seconds.","isRequired":true,"uniqueKey":"latest_invoice_object.period_end","typeLabel":"integer\u003cint64>"},"created":{"type":"integer","format":"int64","description":"Creation time, Unix seconds.","isRequired":true,"uniqueKey":"latest_invoice_object.created","typeLabel":"integer\u003cint64>"},"frequency":{"type":"string","description":"Human-readable billing frequency, for example `Monthly`.","uniqueKey":"latest_invoice_object.frequency","typeLabel":"string"},"recurring_interval":{"type":"string","enum":["day","week","month","year"],"description":"Recurring interval.","uniqueKey":"latest_invoice_object.recurring_interval","typeLabel":"enum\u003cstring>"},"recurring_interval_count":{"type":"integer","format":"int32","description":"Recurring interval count.","uniqueKey":"latest_invoice_object.recurring_interval_count","typeLabel":"integer\u003cint32>"},"payment_id":{"type":"string","description":"Related payment session ID. The API prefers payment_session_id and falls back to trade_order_id.","uniqueKey":"latest_invoice_object.payment_id","typeLabel":"string"},"paid_at":{"type":"integer","format":"int64","description":"Payment completion time, Unix seconds.","uniqueKey":"latest_invoice_object.paid_at","typeLabel":"integer\u003cint64>"},"due_date":{"type":"integer","format":"int64","description":"Due date, Unix seconds.","uniqueKey":"latest_invoice_object.due_date","typeLabel":"integer\u003cint64>"}},"uniqueKey":"latest_invoice_object","typeLabel":"object"},"customer_object":{"type":"object","description":"Full customer object returned when `expand=customer`.","properties":{"id":{"type":"string","description":"Customer ID.","uniqueKey":"customer_object.id","typeLabel":"string"},"object":{"type":"string","example":"customer","uniqueKey":"customer_object.object","typeLabel":"string"},"merchant_id":{"type":"string","description":"Merchant ID.","uniqueKey":"customer_object.merchant_id","typeLabel":"string"},"external_customer_id":{"type":"string","description":"External customer ID.","uniqueKey":"customer_object.external_customer_id","typeLabel":"string"},"email":{"type":"string","format":"email","description":"Customer email.","uniqueKey":"customer_object.email","typeLabel":"string\u003cemail>"},"name":{"type":"string","description":"Customer name.","uniqueKey":"customer_object.name","typeLabel":"string"},"phone":{"type":"string","description":"Customer phone number.","uniqueKey":"customer_object.phone","typeLabel":"string"},"default_payment_method":{"type":"string","description":"Default payment method ID.","uniqueKey":"customer_object.default_payment_method","typeLabel":"string"},"description":{"type":"string","description":"Customer description.","uniqueKey":"customer_object.description","typeLabel":"string"},"created":{"type":"integer","format":"int64","description":"Creation time, Unix seconds.","uniqueKey":"customer_object.created","typeLabel":"integer\u003cint64>"}},"uniqueKey":"customer_object","typeLabel":"object"},"payment_method_object":{"type":"object","description":"Full payment method object returned when `expand=payment_method`.","properties":{"id":{"type":"string","description":"Payment method ID.","uniqueKey":"payment_method_object.id","typeLabel":"string"},"object":{"type":"string","example":"payment_method","uniqueKey":"payment_method_object.object","typeLabel":"string"},"customer":{"type":"string","description":"Customer ID.","uniqueKey":"payment_method_object.customer","typeLabel":"string"},"merchant_id":{"type":"string","description":"Merchant ID.","uniqueKey":"payment_method_object.merchant_id","typeLabel":"string"},"type":{"type":"string","description":"Payment method type.","uniqueKey":"payment_method_object.type","typeLabel":"string"},"currency":{"type":"string","description":"Currency.","uniqueKey":"payment_method_object.currency","typeLabel":"string"},"chain_type":{"type":"integer","format":"int32","description":"Chain type.","uniqueKey":"payment_method_object.chain_type","typeLabel":"integer\u003cint32>"},"status":{"type":"string","enum":["active","inactive","revoked","unknown"],"description":"Payment method status.","uniqueKey":"payment_method_object.status","typeLabel":"enum\u003cstring>"},"mandate_id":{"type":"string","description":"Mandate ID.","uniqueKey":"payment_method_object.mandate_id","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":true,"description":"Metadata.","uniqueKey":"payment_method_object.metadata","typeLabel":"object"},"created":{"type":"integer","format":"int64","description":"Creation time, Unix seconds.","uniqueKey":"payment_method_object.created","typeLabel":"integer\u003cint64>"}},"uniqueKey":"payment_method_object","typeLabel":"object"},"checkout_url":{"type":"string","description":"Initial-payment checkout URL, returned on creation.","uniqueKey":"checkout_url","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":true,"description":"Merchant metadata.","uniqueKey":"metadata","typeLabel":"object"},"created":{"type":"integer","format":"int64","description":"Creation time, Unix seconds.","uniqueKey":"created","typeLabel":"integer\u003cint64>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","object":"subscription","customer":"\u003cstring>","store_id":"\u003cstring>","currency":"\u003cstring>","description":"\u003cstring>","status":"incomplete","items":[{"id":"\u003cstring>","price_data":{"id":"\u003cstring>","currency":"\u003cstring>","product":"\u003cstring>","unit_amount":123,"recurring":{"interval":"day","interval_count":123}},"quantity":2,"metadata":{}}],"payment_method_id":"\u003cstring>","billing_cycle_anchor":123,"current_period_start":123,"current_period_end":123,"canceled_at":123,"cancel_at":123,"latest_invoice":"\u003cstring>","latest_invoice_object":{"id":"\u003cstring>","object":"invoice","subscription_id":"\u003cstring>","customer":"\u003cstring>","amount_due":123,"amount_paid":123,"amount_remaining":123,"currency":"\u003cstring>","status":"open","payment_status":"pending","billing_reason":"\u003cstring>","period_start":123,"period_end":123,"created":123,"frequency":"\u003cstring>","recurring_interval":"day","recurring_interval_count":123,"payment_id":"\u003cstring>","paid_at":123,"due_date":123},"customer_object":{"id":"\u003cstring>","object":"customer","merchant_id":"\u003cstring>","external_customer_id":"\u003cstring>","email":"jsmith@example.com","name":"\u003cstring>","phone":"\u003cstring>","default_payment_method":"\u003cstring>","description":"\u003cstring>","created":123},"payment_method_object":{"id":"\u003cstring>","object":"payment_method","customer":"\u003cstring>","merchant_id":"\u003cstring>","type":"\u003cstring>","currency":"\u003cstring>","chain_type":123,"status":"active","mandate_id":"\u003cstring>","metadata":{},"created":123},"checkout_url":"\u003cstring>","metadata":{},"created":123}}},"exampleType":"generated"}},"exampleType":"generated"},"30433d7f-5e5d-4120-a7fa-b5d51cf782a0":{"description":"Invalid request parameters.","content":{"application/json":{"schema":{"type":"object","description":"Error response.","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error type.","uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","description":"Error code.","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Error message.","uniqueKey":"error.message","typeLabel":"string"},"param":{"type":"string","description":"Related parameter.","uniqueKey":"error.param","typeLabel":"string"},"doc_url":{"type":"string","description":"Error documentation URL.","uniqueKey":"error.doc_url","typeLabel":"string"},"decline_code":{"type":"string","description":"Decline code.","uniqueKey":"error.decline_code","typeLabel":"string"},"request_log_url":{"type":"string","description":"Request log URL.","uniqueKey":"error.request_log_url","typeLabel":"string"},"charge":{"type":"string","description":"Related payment ID.","uniqueKey":"error.charge","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Request ID.","uniqueKey":"request_id","typeLabel":"string"},"timestamp":{"type":"integer","format":"int64","description":"Error timestamp in Unix seconds.","uniqueKey":"timestamp","typeLabel":"integer\u003cint64>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","param":"\u003cstring>","doc_url":"\u003cstring>","decline_code":"\u003cstring>","request_log_url":"\u003cstring>","charge":"\u003cstring>"},"request_id":"\u003cstring>","timestamp":123}}},"exampleType":"generated"}},"exampleType":"generated"},"7cdbd7db-dc82-4e94-8a33-5f24c3deab93":{"description":"Authentication failed.","content":{"application/json":{"schema":{"type":"object","description":"Error response.","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error type.","uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","description":"Error code.","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Error message.","uniqueKey":"error.message","typeLabel":"string"},"param":{"type":"string","description":"Related parameter.","uniqueKey":"error.param","typeLabel":"string"},"doc_url":{"type":"string","description":"Error documentation URL.","uniqueKey":"error.doc_url","typeLabel":"string"},"decline_code":{"type":"string","description":"Decline code.","uniqueKey":"error.decline_code","typeLabel":"string"},"request_log_url":{"type":"string","description":"Request log URL.","uniqueKey":"error.request_log_url","typeLabel":"string"},"charge":{"type":"string","description":"Related payment ID.","uniqueKey":"error.charge","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Request ID.","uniqueKey":"request_id","typeLabel":"string"},"timestamp":{"type":"integer","format":"int64","description":"Error timestamp in Unix seconds.","uniqueKey":"timestamp","typeLabel":"integer\u003cint64>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","param":"\u003cstring>","doc_url":"\u003cstring>","decline_code":"\u003cstring>","request_log_url":"\u003cstring>","charge":"\u003cstring>"},"request_id":"\u003cstring>","timestamp":123}}},"exampleType":"generated"}},"exampleType":"generated"},"3112e56d-c683-45af-962c-fe38293de93b":{"description":"Server error.","content":{"application/json":{"schema":{"type":"object","description":"Error response.","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error type.","uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","description":"Error code.","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Error message.","uniqueKey":"error.message","typeLabel":"string"},"param":{"type":"string","description":"Related parameter.","uniqueKey":"error.param","typeLabel":"string"},"doc_url":{"type":"string","description":"Error documentation URL.","uniqueKey":"error.doc_url","typeLabel":"string"},"decline_code":{"type":"string","description":"Decline code.","uniqueKey":"error.decline_code","typeLabel":"string"},"request_log_url":{"type":"string","description":"Request log URL.","uniqueKey":"error.request_log_url","typeLabel":"string"},"charge":{"type":"string","description":"Related payment ID.","uniqueKey":"error.charge","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Request ID.","uniqueKey":"request_id","typeLabel":"string"},"timestamp":{"type":"integer","format":"int64","description":"Error timestamp in Unix seconds.","uniqueKey":"timestamp","typeLabel":"integer\u003cint64>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","param":"\u003cstring>","doc_url":"\u003cstring>","decline_code":"\u003cstring>","request_log_url":"\u003cstring>","charge":"\u003cstring>"},"request_id":"\u003cstring>","timestamp":123}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"da238c8d-45aa-40b2-ac96-53b85d6f5f58":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Bearer API Key, for example `Bearer sk_live_xxx`.","scopes":[]},"stablepayTimestamp":{"type":"apiKey","in":"header","name":"X-StablePay-Timestamp","description":"Unix timestamp in seconds. Must be within 5 minutes of server time.","scopes":[]},"stablepayNonce":{"type":"apiKey","in":"header","name":"X-StablePay-Nonce","description":"Replay-protection nonce, 16-64 characters. Use a fresh UUID per request.","scopes":[]},"stablepaySignature":{"type":"apiKey","in":"header","name":"X-StablePay-Signature","description":"Lowercase hex HMAC-SHA256 of `{timestamp}.{nonce}.{requestBody}` signed with the merchant API Secret. For GET requests, `requestBody` is an empty string.","scopes":[]}}},"servers":{"263c7760-6782-4119-b1fe-918e4000200e":{"url":"https://api.stablepay.co","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Bearer API Key, for example `Bearer sk_live_xxx`.","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer API Key, for example `Bearer sk_live_xxx`.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"},{"scheme":{"type":"apiKey","in":"header","name":"X-StablePay-Timestamp","description":"Unix timestamp in seconds. Must be within 5 minutes of server time.","scopes":[]},"schema":{"title":"X-StablePay-Timestamp","type":"string","description":"Unix timestamp in seconds. Must be within 5 minutes of server time.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"stablepayTimestamp","name":"X-StablePay-Timestamp"},{"scheme":{"type":"apiKey","in":"header","name":"X-StablePay-Nonce","description":"Replay-protection nonce, 16-64 characters. Use a fresh UUID per request.","scopes":[]},"schema":{"title":"X-StablePay-Nonce","type":"string","description":"Replay-protection nonce, 16-64 characters. Use a fresh UUID per request.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"stablepayNonce","name":"X-StablePay-Nonce"},{"scheme":{"type":"apiKey","in":"header","name":"X-StablePay-Signature","description":"Lowercase hex HMAC-SHA256 of `{timestamp}.{nonce}.{requestBody}` signed with the merchant API Secret. For GET requests, `requestBody` is an empty string.","scopes":[]},"schema":{"title":"X-StablePay-Signature","type":"string","description":"Lowercase hex HMAC-SHA256 of `{timestamp}.{nonce}.{requestBody}` signed with the merchant API Secret. For GET requests, `requestBody` is an empty string.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"stablepaySignature","name":"X-StablePay-Signature"}],"title":"bearerAuth \u0026 stablepayTimestamp \u0026 stablepayNonce \u0026 stablepaySignature"}]},"originalFileLocation":"en/api/subscription-openapi.json"},"subdomain":"stablepay-a1f5fa99","siteName":"StablePay 文档","title":"Create subscription - StablePay 文档","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"zh":{"href":"/zh/product/Get-Started","matchLevel":4},"en":{"href":"/api-reference/subscriptions/create-subscription","matchLevel":0}}},"originalFileLocation":"api-reference/subscriptions/create-subscription.mdx","locale":"en"},"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=\"Create a new subscription. The subscription is typically returned in incomplete status; the customer must complete first-payment authorization via the returned checkout_url before the subscription transitions to active (or trialing).\">\u003cmeta data-mint-head name=\"application-name\" content=\"StablePay 文档\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://media.brand.dev/144a80cc-7738-4a39-9c0e-a2b7cbbf94ce.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://media.brand.dev/144a80cc-7738-4a39-9c0e-a2b7cbbf94ce.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://media.brand.dev/144a80cc-7738-4a39-9c0e-a2b7cbbf94ce.png\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/png\" href=\"https://media.brand.dev/144a80cc-7738-4a39-9c0e-a2b7cbbf94ce.png\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create subscription - StablePay 文档\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a new subscription. The subscription is typically returned in incomplete status; the customer must complete first-payment authorization via the returned checkout_url before the subscription transitions to active (or trialing).\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"StablePay 文档\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.stablepayfi.ai/api-reference/subscriptions/create-subscription\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://stablepay-a1f5fa99.mintlify.app/_mintlify/api/og/v2?division=Subscription+API\u0026amp;title=Create+subscription\u0026amp;description=Create+a+new+subscription.+The+subscription+is+typically+returned+in+%60incomplete%60+status%3B+the+customer+must+complete+first-payment+authorization+via+the+returne\u0026amp;theme=199e3b3da1346596c36384ec\u0026amp;signature=0cecb9c33b89643a74215d53f0216da09c3952be18e905a7513b7b90e6eee571\">\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 - StablePay 文档\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a new subscription. The subscription is typically returned in incomplete status; the customer must complete first-payment authorization via the returned checkout_url before the subscription transitions to active (or trialing).\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://stablepay-a1f5fa99.mintlify.app/_mintlify/api/og/v2?division=Subscription+API\u0026amp;title=Create+subscription\u0026amp;description=Create+a+new+subscription.+The+subscription+is+typically+returned+in+%60incomplete%60+status%3B+the+customer+must+complete+first-payment+authorization+via+the+returne\u0026amp;theme=199e3b3da1346596c36384ec\u0026amp;signature=0cecb9c33b89643a74215d53f0216da09c3952be18e905a7513b7b90e6eee571\">\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=\"https://mintlify.s3.us-west-1.amazonaws.com/stablepay-a1f5fa99/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"StablePay 文档\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2454fc\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.stablepayfi.ai/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://docs.stablepayfi.ai/#organization\",\"name\":\"StablePay 文档\",\"url\":\"https://docs.stablepayfi.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/stablepay-a1f5fa99/xOIDhGi9P3TuJYlm/images/%E8%8B%B1%E6%96%87logo.png?fit=max\u0026auto=format\u0026n=xOIDhGi9P3TuJYlm\u0026q=85\u0026s=c344e915c981d92f80998f8f5ec00792\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.stablepayfi.ai#website\",\"name\":\"StablePay 文档\",\"url\":\"https://docs.stablepayfi.ai\",\"publisher\":{\"@id\":\"https://docs.stablepayfi.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.stablepayfi.ai/api-reference/subscriptions/create-subscription#webpage\",\"url\":\"https://docs.stablepayfi.ai/api-reference/subscriptions/create-subscription\",\"name\":\"Create subscription\",\"description\":\"Create a new subscription. The subscription is typically returned in incomplete status; the customer must complete first-payment authorization via the returned checkout_url before the subscription transitions to active (or trialing).\",\"isPartOf\":{\"@id\":\"https://docs.stablepayfi.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.stablepayfi.ai/api-reference/subscriptions/create-subscription#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.stablepayfi.ai/api-reference/subscriptions/create-subscription#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"StablePay 文档\",\"item\":\"https://docs.stablepayfi.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create subscription\",\"item\":\"https://docs.stablepayfi.ai/api-reference/subscriptions/create-subscription\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.stablepayfi.ai/api-reference/subscriptions/create-subscription#apireference\",\"headline\":\"Create subscription\",\"name\":\"Create subscription\",\"description\":\"Create a new subscription. The subscription is typically returned in incomplete status; the customer must complete first-payment authorization via the returned checkout_url before the subscription transitions to active (or trialing).\",\"url\":\"https://docs.stablepayfi.ai/api-reference/subscriptions/create-subscription\",\"mainEntityOfPage\":{\"@id\":\"https://docs.stablepayfi.ai/api-reference/subscriptions/create-subscription#webpage\"},\"publisher\":{\"@id\":\"https://docs.stablepayfi.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.stablepayfi.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"StablePay 文档\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"StablePay 文档","nav":{"global":null,"languages":[{"language":"zh","default":true,"navbar":{"links":[{"href":"https://stablepayfi.ai/","label":"StablePay 官网"},{"href":"https://merchant.stablepayfi.ai/","label":"商户后台"}]},"pages":[{"title":"zh","href":"/zh/product/Get-Started"}]},{"language":"en","navbar":{"links":[{"href":"https://stablepayfi.ai/","label":"StablePay Website"},{"href":"https://merchant.stablepayfi.ai/","label":"Merchant Portal"}]},"tabs":[{"tab":"Product","pages":[{"title":"Product","href":"/en/product/Get-Started"}]},{"tab":"API","groups":[{"group":"Getting Started","pages":[{"title":"Pre-integration Preparation","href":"/en/api/getting-started"},{"title":"Webhook Notifications","href":"/en/api/webhook-notifications"},{"title":"Checkout iframe Integration","href":"/en/api/checkout-iframe-integration"}]},{"group":"Payment API","pages":[{"title":"Create a payment session","deprecated":null,"version":null,"openapi":"/en/api/openapi.json post /api/v1/checkout/sessions/create","href":"/api-reference/payment-sessions/create-a-payment-session"},{"title":"Retrieve a payment session","deprecated":null,"version":null,"openapi":"/en/api/openapi.json get /api/v1/checkout/sessions/{session_id}","href":"/api-reference/payment-sessions/retrieve-a-payment-session"},{"title":"Cancel a payment session","deprecated":null,"version":null,"openapi":"/en/api/openapi.json post /api/v1/checkout/sessions/{session_id}/cancel","href":"/api-reference/payment-sessions/cancel-a-payment-session"},{"title":"Retrieve a payment method","deprecated":null,"version":null,"openapi":"/en/api/openapi.json get /api/v1/payment_method/{payment_method_id}","href":"/api-reference/payment-methods/retrieve-a-payment-method"}]},{"group":"QR Pay API","pages":[{"title":"Create QR Pay","deprecated":null,"version":null,"openapi":"/en/api/customer-deposits.openapi.json post /api/v1/customer-deposits","href":"/api-reference/qr-pay/create-qr-pay"},{"title":"Retrieve QR Pay","deprecated":null,"version":null,"openapi":"/en/api/customer-deposits.openapi.json get /api/v1/customer-deposits/{deposit_session_id}","href":"/api-reference/qr-pay/retrieve-qr-pay"}]},{"group":"Global Accounts API","pages":[{"title":"List all accounts and balances for the target merchant","api":"GET https://api.stablepay.co/api/v1/account","playground":"simple","href":"/en/api/global-accounts/get-account"},{"title":"Retrieve one account and balance","api":"GET https://api.stablepay.co/api/v1/account/{account_no}","playground":"simple","href":"/en/api/global-accounts/get-account-account-no"},{"title":"Pending settlement balances by currency","api":"GET https://api.stablepay.co/api/v1/pending_settlement_balance","playground":"simple","href":"/en/api/global-accounts/get-pending-settlement-balance"},{"title":"Retrieve a stablecoin deposit address","api":"GET https://api.stablepay.co/api/v1/fund/deposit_address","playground":"simple","href":"/en/api/global-accounts/get-fund-deposit-address"},{"title":"List stablecoin deposit records","api":"GET https://api.stablepay.co/api/v1/fund/deposits","playground":"simple","href":"/en/api/global-accounts/get-fund-deposits"},{"title":"Retrieve one stablecoin deposit","api":"GET https://api.stablepay.co/api/v1/fund/deposits/{deposit_id}","playground":"simple","href":"/en/api/global-accounts/get-fund-deposits-deposit-id"},{"title":"Add Travel Rule funding source details","api":"POST https://api.stablepay.co/api/v1/fund/deposits/{deposit_id}/confirm","playground":"simple","href":"/en/api/global-accounts/post-fund-deposits-deposit-id-confirm"},{"title":"Create a withdrawal","api":"POST https://api.stablepay.co/api/v1/fund/withdrawals","playground":"simple","href":"/en/api/global-accounts/post-fund-withdrawals"},{"title":"Retrieve a withdrawal","api":"GET https://api.stablepay.co/api/v1/fund/withdrawals/{withdrawal_id}","playground":"simple","href":"/en/api/global-accounts/get-fund-withdrawals-withdrawal-id"},{"title":"Create an account transfer","api":"POST https://api.stablepay.co/api/v1/fund/account_transfers","playground":"simple","href":"/en/api/global-accounts/post-fund-account-transfers"},{"title":"Retrieve an account transfer","api":"GET https://api.stablepay.co/api/v1/fund/account_transfers/{account_transfer_id}","playground":"simple","href":"/en/api/global-accounts/get-fund-account-transfers-account-transfer-id"},{"title":"Retrieve recipient field rules","api":"GET https://api.stablepay.co/api/v1/recipient/requirements","playground":"simple","href":"/en/api/global-accounts/get-recipient-requirements"},{"title":"Create a recipient","api":"POST https://api.stablepay.co/api/v1/recipient","playground":"simple","href":"/en/api/global-accounts/post-recipient"},{"title":"List recipients","api":"GET https://api.stablepay.co/api/v1/recipient","playground":"simple","href":"/en/api/global-accounts/get-recipient"},{"title":"Retrieve a recipient","api":"GET https://api.stablepay.co/api/v1/recipient/{recipient_id}","playground":"simple","href":"/en/api/global-accounts/get-recipient-recipient-id"},{"title":"Update a recipient","api":"PUT https://api.stablepay.co/api/v1/recipient/{recipient_id}","playground":"simple","href":"/en/api/global-accounts/put-recipient-recipient-id"},{"title":"Delete a recipient","api":"DELETE https://api.stablepay.co/api/v1/recipient/{recipient_id}","playground":"simple","href":"/en/api/global-accounts/delete-recipient-recipient-id"}]},{"group":"Stablecoin Exchange API","pages":[{"title":"List supported currency pairs","api":"GET https://api.stablepay.co/api/v1/quote/pairs","playground":"simple","href":"/en/api/stablecoin-exchange/get-quote-pairs"},{"title":"Retrieve the current pair rate","api":"GET https://api.stablepay.co/api/v1/quote/exchange_rate","playground":"simple","href":"/en/api/stablecoin-exchange/get-quote-exchange-rate"},{"title":"Create a quote and lock a rate","api":"POST https://api.stablepay.co/api/v1/quote","playground":"simple","href":"/en/api/stablecoin-exchange/post-quote"},{"title":"Retrieve a quote","api":"GET https://api.stablepay.co/api/v1/quote/{quote_id}","playground":"simple","href":"/en/api/stablecoin-exchange/get-quote-quote-id"},{"title":"Retrieve fiat collection details and reference code","api":"GET https://api.stablepay.co/api/v1/fiat/account_details","playground":"simple","href":"/en/api/stablecoin-exchange/get-fiat-account-details"},{"title":"List fiat deposit records","api":"GET https://api.stablepay.co/api/v1/fiat/deposits","playground":"simple","href":"/en/api/stablecoin-exchange/get-fiat-deposits"},{"title":"Retrieve one fiat deposit","api":"GET https://api.stablepay.co/api/v1/fiat/deposits/{fiat_deposit_id}","playground":"simple","href":"/en/api/stablecoin-exchange/get-fiat-deposits-fiat-deposit-id"},{"title":"Convertible fiat deposit balance","api":"GET https://api.stablepay.co/api/v1/fiat/deposit_balance","playground":"simple","href":"/en/api/stablecoin-exchange/get-fiat-deposit-balance"},{"title":"Create a transfer (fiat to stablecoin, stablecoin to fiat, stablecoin swap)","api":"POST https://api.stablepay.co/api/v1/transfer","playground":"simple","href":"/en/api/stablecoin-exchange/post-transfer"},{"title":"Retrieve a transfer","api":"GET https://api.stablepay.co/api/v1/transfer/{transfer_id}","playground":"simple","href":"/en/api/stablecoin-exchange/get-transfer-transfer-id"}]},{"group":"Refund API","pages":[{"title":"Create refund","deprecated":null,"version":null,"openapi":"/en/api/refund-openapi.json post /api/v1/refunds/create","href":"/api-reference/refunds/create-refund"},{"title":"Retrieve refund","deprecated":null,"version":null,"openapi":"/en/api/refund-openapi.json get /api/v1/refunds/{refund_id}","href":"/api-reference/refunds/retrieve-refund"},{"title":"Cancel refund","description":"Cancel a refund that is still in `processing`. Completed, failed, or already canceled refunds cannot be canceled.","deprecated":null,"version":null,"openapi":"/en/api/refund-openapi.json post /api/v1/refunds/{refund_id}/cancel","href":"/api-reference/refunds/cancel-refund"}]},{"group":"Subscription API","pages":[{"title":"Create subscription","deprecated":null,"version":null,"openapi":"/en/api/subscription-openapi.json post /api/v1/subscriptions/create","href":"/api-reference/subscriptions/create-subscription"},{"title":"Retrieve payment details","description":"Retrieve payment details by the `payment_id` returned from a subscription invoice. This `payment_id` identifies the payment generated for a subscription charge and can be used to confirm payment status, amount, and on-chain payment information.","deprecated":null,"version":null,"openapi":"/en/api/subscription-openapi.json get /api/v1/payment/{payment_id}","href":"/api-reference/subscriptions/retrieve-payment-details"},{"title":"Retrieve subscription","deprecated":null,"version":null,"openapi":"/en/api/subscription-openapi.json get /api/v1/subscriptions/{subscription_id}","href":"/api-reference/subscriptions/retrieve-subscription"},{"title":"List subscriptions","deprecated":null,"version":null,"openapi":"/en/api/subscription-openapi.json get /api/v1/subscriptions","href":"/api-reference/subscriptions/list-subscriptions"}]},{"group":"Invoice API","pages":[{"title":"List invoices","deprecated":null,"version":null,"openapi":"/en/api/invoice-openapi.json get /api/v1/invoices","href":"/api-reference/invoices/list-invoices"}]},{"group":"Bills API","pages":[{"title":"List Bills","api":"GET https://api.stablepay.co/api/v1/bills","playground":"simple","href":"/en/api/bills/list"},{"title":"Get Bill Download URL","api":"GET https://api.stablepay.co/api/v1/bills/{bill_id}/download_url","playground":"simple","href":"/en/api/bills/get-download-url"}]},{"group":"Payouts API","pages":[{"title":"Create Payout Batch","api":"POST https://api.stablepay.co/api/v1/payout-batches","playground":"simple","href":"/en/api/payouts/create-batch"},{"title":"Submit Payout Batch","api":"POST https://api.stablepay.co/api/v1/payout-batches/{batch_id}/submit","playground":"simple","href":"/en/api/payouts/submit-batch"},{"title":"Cancel Payout Batch","api":"POST https://api.stablepay.co/api/v1/payout-batches/{batch_id}/cancel","playground":"simple","href":"/en/api/payouts/cancel-batch"},{"title":"Get Payout Batch","api":"GET https://api.stablepay.co/api/v1/payout-batches/{batch_id}","playground":"simple","href":"/en/api/payouts/get-batch"},{"title":"List Payout Batches","api":"GET https://api.stablepay.co/api/v1/payout-batches","playground":"simple","href":"/en/api/payouts/list-batches"},{"title":"List Batch Items","api":"GET https://api.stablepay.co/api/v1/payout-batches/{batch_id}/items","playground":"simple","href":"/en/api/payouts/list-batch-items"},{"title":"Get Payout Item","api":"GET https://api.stablepay.co/api/v1/payout-items/{item_id}","playground":"simple","href":"/en/api/payouts/get-item"}]}]},{"tab":"SaaS","pages":[{"title":"SaaS","href":"/en/product/SaaS/Shopify"}]},{"tab":"FAQ","pages":[{"title":"FAQ","href":"/en/faq/Binance-Wallet-WalletConnect-Troubleshooting"}]}]}]},"title":"Create subscription - StablePay 文档","buildId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","deploymentId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-26-lDe7V.js","utils-CWQmgYtH.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-4-Aw3rSD.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-C2zjXYA5.js","snippetPresets-DFmpFA7C.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-FJpQavWq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-D_GvPF7k.js","shallow-Bs2ZB0NO.js","getApiPlaygroundDisplay-DCcqJJk-.js","CodeSnippet-DzDxawVe.js","CodeSnippets-aUr7fU-7.js","Page-CT9uE8Ip.js","getPastedJson-Y1fKsj_I.js","icon-DI4zTsDr.js","MethodPill-C0nDlmSQ.js","DuplicateIcon-NUXbx2nQ.js","createIcon-BdTHrPAi.js","DynamicMarkdown-CtpgKJwj.js","SectionHeading-B3x35tOt.js","axios-vUo_bRtp.js","Markdown-3OmurJMP.js","clsx-DMKzROTp.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-1ms6tsT-.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Ke9xIMFx.js"]}