{
"code": 40001,
"message": "Validation failed",
"error": {
"field": "productId",
"reason": "Product ID is required"
}
}
{
"code": 42901,
"message": "Too many requests"
}
Checkouts
Create a checkout session
Creates a new checkout session for a product. Returns a URL where you can redirect
your customer to complete the payment. Checkout sessions expire after 24 hours.
Amount and currency come from the active product; per-session price, currency and quantity
overrides are not supported. Hosted checkout must be enabled for the merchant.
Persist the session against your business order and reuse it on repeated purchase attempts.
Creation has no idempotency-key support: reconcile an uncertain creation result before retrying.
Configure the merchant Webhook URL and Secret before payment. Use the returned data.url directly;
browser success/cancel redirects are not payment confirmation.
{
"code": 40001,
"message": "Validation failed",
"error": {
"field": "productId",
"reason": "Product ID is required"
}
}
{
"code": 42901,
"message": "Too many requests"
}
Authorizations
x-api-key
string
header
required
Your API key. Public production API-key endpoints accept kyren_live_* keys. Staging credentials are environment-specific and must be used only with the staging environment for which KyrenPay issued them.
Body
application/json
productId
string
required
The ID of the product to create a checkout for
successUrl
string<uri>
required
URL to redirect the customer to after successful payment
cancelUrl
string<uri>
URL to redirect the customer to if they cancel the payment
customerEmail
string<email>
Pre-fill the customer's email on the checkout page
customerName
string
Pre-fill the customer's name on the checkout page
merchantCustomerId
string
Optional stable merchant-side customer ID, also accepted as merchant_customer_id.
This is separate from metadata used to associate your business order for fulfillment.
For DOKU OVO, an explicitly identified end customer must already be registered with KyrenPay;
omit this field to use the hosted anonymous browser binding flow.
displayMerchantName
string
Optional per-checkout merchant display name shown on the hosted checkout page. Also accepted as display_merchant_name.
Maximum string length: 80
metadata
object
Merchant-defined string values attached to the checkout, resulting order and payment
Webhook. Supply trusted server-side businessOrderId and userId values for reconciliation.
Product metadata is not automatically merged. Internal provider metadata keys are filtered
from Webhooks. Do not store secrets or card data here.
Show child attributes
Response
Checkout session created successfully
code
integer
Example:
0
message
string
Example:
"success"
data
object
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"KyrenPay","description":"KyrenPay developer documentation for payment APIs, hosted Checkout, Webhooks, Epay migration, and merchant operations for AI and SaaS teams.","colors":{"primary":"#0069FF","light":"#05B7E8","dark":"#0069FF"},"logo":{"light":"https://mintcdn.com/kyren/IdsitUiFY32Sa_Ja/logo/kyrenpay-wordmark.png?fit=max\u0026auto=format\u0026n=IdsitUiFY32Sa_Ja\u0026q=85\u0026s=fbfedaae45c37606148132460e5660d7","dark":"https://mintcdn.com/kyren/IdsitUiFY32Sa_Ja/logo/kyrenpay-wordmark.png?fit=max\u0026auto=format\u0026n=IdsitUiFY32Sa_Ja\u0026q=85\u0026s=fbfedaae45c37606148132460e5660d7"},"favicon":"https://mintcdn.com/kyren/IdsitUiFY32Sa_Ja/logo/kyrenpay-icon.png?fit=max\u0026auto=format\u0026n=IdsitUiFY32Sa_Ja\u0026q=85\u0026s=7eef50d8dfa4ae2514a6f0116bf57b22","background":{"color":{"light":"#FFFFFF","dark":"#081421"}},"seo":{"metatags":{"canonical":"https://docs.kyrenpay.com","og:site_name":"KyrenPay","og:image":"https://docs.kyrenpay.com/logo/kyrenpay-share.png","og:image:alt":"KyrenPay","twitter:image":"https://docs.kyrenpay.com/logo/kyrenpay-share.png","twitter:image:alt":"KyrenPay","twitter:card":"summary_large_image"},"organization":{"name":"KyrenPay","url":"https://kyrenpay.com","logo":"https://docs.kyrenpay.com/logo/kyrenpay-icon.png"},"indexing":"navigable"},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"footer":{"links":[{"header":"Get started","items":[{"label":"Quickstart","href":"/quickstart"},{"label":"API authentication","href":"/authentication"},{"label":"Launch checklist","href":"/go-live-checklist"}]},{"header":"Resources","items":[{"label":"Website","href":"https://kyrenpay.com"},{"label":"Brand guidelines","href":"https://kyrenpay.com/branding"},{"label":"Support","href":"mailto:support@kyrenpay.com"}]}]},"navbar":{"links":[{"href":"https://kyrenpay.com","label":"Website"}],"primary":{"type":"button","label":"Merchant dashboard","href":"https://merchant.kyrenpay.com"}},"href":"introduction"},{"language":"zh","footer":{"links":[{"header":"开始接入","items":[{"label":"快速开始","href":"/zh/quickstart"},{"label":"API 认证","href":"/zh/authentication"},{"label":"上线检查","href":"/zh/go-live-checklist"}]},{"header":"资源与支持","items":[{"label":"官方网站","href":"https://kyrenpay.com"},{"label":"品牌指南","href":"https://kyrenpay.com/branding"},{"label":"联系支持","href":"mailto:support@kyrenpay.com"}]}]},"navbar":{"links":[{"href":"https://kyrenpay.com","label":"官方网站"}],"primary":{"type":"button","label":"商户控制台","href":"https://merchant.kyrenpay.com"}},"href":"zh/introduction"},{"language":"zh-Hant","footer":{"links":[{"header":"開始串接","items":[{"label":"快速開始","href":"/zh-Hant/quickstart"},{"label":"API 認證","href":"/zh-Hant/authentication"},{"label":"上線檢查","href":"/zh-Hant/go-live-checklist"}]},{"header":"資源與支援","items":[{"label":"官方網站","href":"https://kyrenpay.com"},{"label":"品牌指南","href":"https://kyrenpay.com/branding"},{"label":"聯絡支援","href":"mailto:support@kyrenpay.com"}]}]},"navbar":{"links":[{"href":"https://kyrenpay.com","label":"官方網站"}],"primary":{"type":"button","label":"商戶控制台","href":"https://merchant.kyrenpay.com"}},"href":"zh-Hant/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"kyren","hasAudioNarration":false,"actualSubdomain":"kyren","customDomains":["docs.kyrenpay.com"],"gitSource":{"type":"github","owner":"kyren-network","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6affe8c152bb0af72b4e37ca","clientVersion":"0.0.4286","searchFilterCounts":[{"language":"en","tag":"Documentation","count":44},{"language":"zh-Hant","tag":"文檔","count":44},{"language":"zh","tag":"文档","count":44},{"language":"default","tag":"API Reference","count":22},{"language":"en","tag":"Dashboard Guide","count":13},{"language":"zh-Hant","tag":"控制台指南","count":13},{"language":"zh","tag":"控制台指南","count":13},{"language":"en","tag":"Troubleshooting","count":8},{"language":"zh-Hant","tag":"故障排除","count":8},{"language":"zh","tag":"故障排除","count":8},{"language":"en","tag":"Start Here","count":6},{"language":"en","tag":"Epay Migration","count":6},{"language":"zh-Hant","tag":"開始使用","count":6},{"language":"zh-Hant","tag":"易支付遷移","count":6},{"language":"zh","tag":"开始使用","count":6},{"language":"zh","tag":"易支付迁移","count":6},{"language":"default","tag":"Config","count":5},{"language":"default","tag":"Products","count":5},{"language":"en","tag":"References","count":4},{"language":"en","tag":"Webhooks","count":4},{"language":"zh-Hant","tag":"參考","count":4},{"language":"zh-Hant","tag":"Webhook","count":4},{"language":"zh","tag":"参考","count":4},{"language":"zh","tag":"Webhook","count":4},{"language":"default","tag":"Epay Compatibility","count":3},{"language":"default","tag":"Orders","count":3},{"language":"en","tag":"System Integrations","count":2},{"language":"zh-Hant","tag":"系統接入","count":2},{"language":"zh","tag":"系统接入","count":2},{"language":"default","tag":"Balance","count":2},{"language":"default","tag":"Checkouts","count":2},{"language":"default","tag":"Refunds","count":2},{"language":"en","tag":"FAQ","count":1},{"language":"zh-Hant","tag":"常見問題","count":1},{"language":"zh","tag":"常见问题","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"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":"site-roles","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":[{"filePath":"style.css","content":".nav-logo{box-sizing:content-box;width:168px;height:auto;max-width:none;padding:9px}body{font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", \"PingFang SC\",\n \"PingFang TC\", \"Noto Sans CJK SC\", \"Noto Sans CJK TC\", \"Microsoft YaHei\",\n sans-serif}"}]}
{"page":{"pagePath":"api-reference/checkouts/create-a-checkout-session","slug":"/api-reference/checkouts/create-a-checkout-session","pageMetadata":{"title":"Create a checkout session","description":"Creates a new checkout session for a product. Returns a URL where you can redirect\nyour customer to complete the payment. Checkout sessions expire after 24 hours.\nAmount and currency come from the active product; per-session price, currency and quantity\noverrides are not supported. Hosted checkout must be enabled for the merchant.\nPersist the session against your business order and reuse it on repeated purchase attempts.\nCreation has no idempotency-key support: reconcile an uncertain creation result before retrying.\nConfigure the merchant Webhook URL and Secret before payment. Use the returned data.url directly;\nbrowser success/cancel redirects are not payment confirmation.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/checkouts","href":"/api-reference/checkouts/create-a-checkout-session","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Creates a new checkout session for a product. Returns a URL where you can redirect\\nyour customer to complete the payment. Checkout sessions expire after 24 hours.\\nAmount and currency come from the active product; per-session price, currency and quantity\\noverrides are not supported. Hosted checkout must be enabled for the merchant.\\nPersist the session against your business order and reuse it on repeated purchase attempts.\\nCreation has no idempotency-key support: reconcile an uncertain creation result before retrying.\\nConfigure the merchant Webhook URL and Secret before payment. Use the returned data.url directly;\\nbrowser success/cancel redirects are not payment confirmation.\"\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 a checkout session","description":"Creates a new checkout session for a product. Returns a URL where you can redirect\nyour customer to complete the payment. Checkout sessions expire after 24 hours.\nAmount and currency come from the active product; per-session price, currency and quantity\noverrides are not supported. Hosted checkout must be enabled for the merchant.\nPersist the session against your business order and reuse it on repeated purchase attempts.\nCreation has no idempotency-key support: reconcile an uncertain creation result before retrying.\nConfigure the merchant Webhook URL and Secret before payment. Use the returned data.url directly;\nbrowser success/cancel redirects are not payment confirmation.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/checkouts","href":"/api-reference/checkouts/create-a-checkout-session","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"createCheckout","tags":["Checkouts"],"summary":"Create a checkout session","description":"Creates a new checkout session for a product. Returns a URL where you can redirect\nyour customer to complete the payment. Checkout sessions expire after 24 hours.\nAmount and currency come from the active product; per-session price, currency and quantity\noverrides are not supported. Hosted checkout must be enabled for the merchant.\nPersist the session against your business order and reuse it on repeated purchase attempts.\nCreation has no idempotency-key support: reconcile an uncertain creation result before retrying.\nConfigure the merchant Webhook URL and Secret before payment. Use the returned data.url directly;\nbrowser success/cancel redirects are not payment confirmation.\n","requestBody":"868ea6ac-24f0-4699-9d6e-0bcbcc1d6a0a","responses":{"200":"3e9e318a-aa71-4a92-a091-7df11ddafdab","400":"9a03519c-0ddd-4ee6-a372-78d369ba251e","401":"744769cf-7a8d-44ce-97e7-94d05d3f0f88","429":"458b8740-c076-433f-bb2b-875fc61b0544"},"method":"post","type":"path","servers":["e24212ae-d88f-4805-8417-c0acbb5d5dcb","e8d53657-d7be-49ec-83ef-2844dea30150"],"security":["8eed4c36-6ec7-436d-87e9-1cbca2a2c9f0"],"path":"/v1/checkouts","baseUrlOptions":["https://api.kyrenpay.com","https://staging-api.kyren.top"],"title":"Create a checkout session","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["productId","successUrl"],"properties":{"productId":{"type":"string","description":"The ID of the product to create a checkout for","isRequired":true,"uniqueKey":"productId","typeLabel":"string"},"successUrl":{"type":"string","format":"uri","description":"URL to redirect the customer to after successful payment","isRequired":true,"uniqueKey":"successUrl","typeLabel":"string\u003curi>"},"cancelUrl":{"type":"string","format":"uri","description":"URL to redirect the customer to if they cancel the payment","uniqueKey":"cancelUrl","typeLabel":"string\u003curi>"},"customerEmail":{"type":"string","format":"email","description":"Pre-fill the customer's email on the checkout page","uniqueKey":"customerEmail","typeLabel":"string\u003cemail>"},"customerName":{"type":"string","description":"Pre-fill the customer's name on the checkout page","uniqueKey":"customerName","typeLabel":"string"},"merchantCustomerId":{"type":"string","description":"Optional stable merchant-side customer ID, also accepted as merchant_customer_id.\nThis is separate from metadata used to associate your business order for fulfillment.\nFor DOKU OVO, an explicitly identified end customer must already be registered with KyrenPay;\nomit this field to use the hosted anonymous browser binding flow.\n","uniqueKey":"merchantCustomerId","typeLabel":"string"},"displayMerchantName":{"type":"string","maxLength":80,"description":"Optional per-checkout merchant display name shown on the hosted checkout page. Also accepted as `display_merchant_name`.","uniqueKey":"displayMerchantName","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"metadata.additionalProperties","typeLabel":"string"},"description":"Merchant-defined string values attached to the checkout, resulting order and payment\nWebhook. Supply trusted server-side businessOrderId and userId values for reconciliation.\nProduct metadata is not automatically merged. Internal provider metadata keys are filtered\nfrom Webhooks. Do not store secrets or card data here.\n","uniqueKey":"metadata","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"productId":"prod_abc123","successUrl":"https://example.com/success","cancelUrl":"https://example.com/cancel","customerEmail":"customer@example.com","displayMerchantName":"Campaign Store","metadata":{"userId":"user_456"}},"examples":{"Example":{"title":"Example","value":{"productId":"prod_abc123","successUrl":"https://example.com/success","cancelUrl":"https://example.com/cancel","customerEmail":"customer@example.com","displayMerchantName":"Campaign Store","metadata":{"userId":"user_456"}}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"3e9e318a-aa71-4a92-a091-7df11ddafdab":{"description":"Checkout session created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","example":0,"uniqueKey":"code","typeLabel":"integer"},"message":{"type":"string","example":"success","uniqueKey":"message","typeLabel":"string"},"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier","uniqueKey":"data.id","typeLabel":"string"},"productId":{"type":"string","uniqueKey":"data.productId","typeLabel":"string"},"amount":{"type":"string","description":"Order amount (e.g. \"9.99\")","uniqueKey":"data.amount","typeLabel":"string"},"currency":{"type":"string","uniqueKey":"data.currency","typeLabel":"string"},"status":{"type":"string","enum":["OPEN","COMPLETE","EXPIRED"],"description":"- `OPEN` — Checkout session is awaiting payment\n- `COMPLETE` — Payment has been completed\n- `EXPIRED` — Checkout session has expired (24 hours)\n","uniqueKey":"data.status","typeLabel":"enum\u003cstring>"},"checkoutMode":{"type":"string","enum":["ONE_TIME","SUBSCRIPTION"],"description":"Product billing mode; this guide's one-time integration uses ONE_TIME.","uniqueKey":"data.checkoutMode","typeLabel":"enum\u003cstring>"},"orderId":{"type":"string","description":"KyrenPay order ID for the final successful payment. Present only after the checkout has been linked to that order.","uniqueKey":"data.orderId","typeLabel":"string"},"url":{"type":"string","format":"uri","description":"The URL to redirect the customer to for payment","uniqueKey":"data.url","typeLabel":"string\u003curi>"},"expiresAt":{"type":"integer","format":"int64","description":"Unix timestamp in milliseconds","uniqueKey":"data.expiresAt","typeLabel":"integer\u003cint64>"},"createdAt":{"type":"integer","format":"int64","description":"Unix timestamp in milliseconds","uniqueKey":"data.createdAt","typeLabel":"integer\u003cint64>"}},"uniqueKey":"data","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"code":0,"message":"success","data":{"id":"cs_xyz789","productId":"prod_abc123","amount":"9.99","currency":"USD","status":"OPEN","checkoutMode":"ONE_TIME","url":"https://payment.kyren.io/checkout/one-time/cs_xyz789","expiresAt":1736934000000,"createdAt":1736932200000}},"examples":{"Example":{"title":"Example","value":{"code":0,"message":"success","data":{"id":"cs_xyz789","productId":"prod_abc123","amount":"9.99","currency":"USD","status":"OPEN","checkoutMode":"ONE_TIME","url":"https://payment.kyren.io/checkout/one-time/cs_xyz789","expiresAt":1736934000000,"createdAt":1736932200000}}}},"exampleType":"examples"}},"exampleType":"examples"},"9a03519c-0ddd-4ee6-a372-78d369ba251e":{"description":"Bad request — invalid parameters","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","description":"KyrenPay business error code, not the HTTP status. For example, HTTP 400 may contain code 40001.","uniqueKey":"code","typeLabel":"integer"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"},"error":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"error.field","typeLabel":"string"},"reason":{"type":"string","uniqueKey":"error.reason","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"code":40001,"message":"Validation failed","error":{"field":"productId","reason":"Product ID is required"}},"examples":{"Example":{"title":"Example","value":{"code":40001,"message":"Validation failed","error":{"field":"productId","reason":"Product ID is required"}}}},"exampleType":"examples"}},"exampleType":"examples"},"744769cf-7a8d-44ce-97e7-94d05d3f0f88":{"description":"Unauthorized — missing or invalid API key. Authentication middleware may return an empty body; inspect the HTTP status before parsing JSON.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"458b8740-c076-433f-bb2b-875fc61b0544":{"description":"Rate limit exceeded. Ordinary API requests default to 100 per minute per IP; checkout creation defaults to 60 per minute per merchant. Deployment settings may differ.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","description":"KyrenPay business error code, not the HTTP status. For example, HTTP 400 may contain code 40001.","uniqueKey":"code","typeLabel":"integer"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"},"error":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"error.field","typeLabel":"string"},"reason":{"type":"string","uniqueKey":"error.reason","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"code":42901,"message":"Too many requests"},"examples":{"Example":{"title":"Example","value":{"code":42901,"message":"Too many requests"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"8eed4c36-6ec7-436d-87e9-1cbca2a2c9f0":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key. Public production API-key endpoints accept `kyren_live_*` keys. Staging credentials are environment-specific and must be used only with the staging environment for which KyrenPay issued them.\n","scopes":[],"schemeName":"ApiKeyAuth"}}},"servers":{"e24212ae-d88f-4805-8417-c0acbb5d5dcb":{"url":"https://api.kyrenpay.com","description":"Production"},"e8d53657-d7be-49ec-83ef-2844dea30150":{"url":"https://staging-api.kyren.top","description":"Staging, available only with credentials issued by KyrenPay"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key. Public production API-key endpoints accept `kyren_live_*` keys. Staging credentials are environment-specific and must be used only with the staging environment for which KyrenPay issued them.\n","scopes":[],"schemeName":"ApiKeyAuth"},"schema":{"title":"x-api-key","type":"string","description":"Your API key. Public production API-key endpoints accept `kyren_live_*` keys. Staging credentials are environment-specific and must be used only with the staging environment for which KyrenPay issued them.\n","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyAuth","name":"x-api-key"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"kyren","siteName":"KyrenPay","title":"Create a checkout session - KyrenPay","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/checkouts/create-a-checkout-session","matchLevel":0},"zh":{"href":"/api-reference/checkouts/create-a-checkout-session","matchLevel":0},"zh-Hant":{"href":"/api-reference/checkouts/create-a-checkout-session","matchLevel":0}}},"lastModified":"2026-11-20T06:29:27.004Z","originalFileLocation":"api-reference/checkouts/create-a-checkout-session.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=\"Creates a new checkout session for a product. Returns a URL where you can redirect your customer to complete the payment. Checkout sessions expire after 24 hours. Amount and currency come from the active product; per-session price, currency and quantity overrides are not supported. Hosted checkout must be enabled for the merchant. Persist the session against your business order and reuse it on repeated purchase attempts. Creation has no idempotency-key support: reconcile an uncertain creation result before retrying. Configure the merchant Webhook URL and Secret before payment. Use the returned data.url directly; browser success/cancel redirects are not payment confirmation.\">\u003cmeta data-mint-head name=\"application-name\" content=\"KyrenPay\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/kyren/pAyDzZJNrLpvzFP1/_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/kyren/pAyDzZJNrLpvzFP1/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/kyren/pAyDzZJNrLpvzFP1/_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/kyren/pAyDzZJNrLpvzFP1/_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/kyren/pAyDzZJNrLpvzFP1/_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/kyren/pAyDzZJNrLpvzFP1/_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/kyren/pAyDzZJNrLpvzFP1/_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/kyren/pAyDzZJNrLpvzFP1/_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/kyren/pAyDzZJNrLpvzFP1/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a checkout session - KyrenPay\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a new checkout session for a product. Returns a URL where you can redirect your customer to complete the payment. Checkout sessions expire after 24 hours. Amount and currency come from the active product; per-session price, currency and quantity overrides are not supported. Hosted checkout must be enabled for the merchant. Persist the session against your business order and reuse it on repeated purchase attempts. Creation has no idempotency-key support: reconcile an uncertain creation result before retrying. Configure the merchant Webhook URL and Secret before payment. Use the returned data.url directly; browser success/cancel redirects are not payment confirmation.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"KyrenPay\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.kyrenpay.com/api-reference/checkouts/create-a-checkout-session\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://docs.kyrenpay.com/logo/kyrenpay-share.png\">\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 a checkout session - KyrenPay\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a new checkout session for a product. Returns a URL where you can redirect your customer to complete the payment. Checkout sessions expire after 24 hours. Amount and currency come from the active product; per-session price, currency and quantity overrides are not supported. Hosted checkout must be enabled for the merchant. Persist the session against your business order and reuse it on repeated purchase attempts. Creation has no idempotency-key support: reconcile an uncertain creation result before retrying. Configure the merchant Webhook URL and Secret before payment. Use the returned data.url directly; browser success/cancel redirects are not payment confirmation.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://docs.kyrenpay.com/logo/kyrenpay-share.png\">\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/kyren/pAyDzZJNrLpvzFP1/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"KyrenPay\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0069FF\">\u003cmeta data-mint-head name=\"og:image:alt\" content=\"KyrenPay\">\u003cmeta data-mint-head name=\"twitter:image:alt\" content=\"KyrenPay\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.kyrenpay.com/api-reference/checkouts/create-a-checkout-session\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/checkouts/create-a-checkout-session.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://kyrenpay.com/#organization\",\"name\":\"KyrenPay\",\"url\":\"https://kyrenpay.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://docs.kyrenpay.com/logo/kyrenpay-icon.png\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.kyrenpay.com#website\",\"name\":\"KyrenPay\",\"url\":\"https://docs.kyrenpay.com\",\"publisher\":{\"@id\":\"https://kyrenpay.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.kyrenpay.com/api-reference/checkouts/create-a-checkout-session#webpage\",\"url\":\"https://docs.kyrenpay.com/api-reference/checkouts/create-a-checkout-session\",\"name\":\"Create a checkout session\",\"description\":\"Creates a new checkout session for a product. Returns a URL where you can redirect your customer to complete the payment. Checkout sessions expire after 24 hours. Amount and currency come from the active product; per-session price, currency and quantity overrides are not supported. Hosted checkout must be enabled for the merchant. Persist the session against your business order and reuse it on repeated purchase attempts. Creation has no idempotency-key support: reconcile an uncertain creation result before retrying. Configure the merchant Webhook URL and Secret before payment. Use the returned data.url directly; browser success/cancel redirects are not payment confirmation.\",\"dateModified\":\"2026-11-20T06:29:27.004Z\",\"isPartOf\":{\"@id\":\"https://docs.kyrenpay.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.kyrenpay.com/api-reference/checkouts/create-a-checkout-session#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.kyrenpay.com/api-reference/checkouts/create-a-checkout-session#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"KyrenPay\",\"item\":\"https://docs.kyrenpay.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a checkout session\",\"item\":\"https://docs.kyrenpay.com/api-reference/checkouts/create-a-checkout-session\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.kyrenpay.com/api-reference/checkouts/create-a-checkout-session#apireference\",\"headline\":\"Create a checkout session\",\"name\":\"Create a checkout session\",\"description\":\"Creates a new checkout session for a product. Returns a URL where you can redirect your customer to complete the payment. Checkout sessions expire after 24 hours. Amount and currency come from the active product; per-session price, currency and quantity overrides are not supported. Hosted checkout must be enabled for the merchant. Persist the session against your business order and reuse it on repeated purchase attempts. Creation has no idempotency-key support: reconcile an uncertain creation result before retrying. Configure the merchant Webhook URL and Secret before payment. Use the returned data.url directly; browser success/cancel redirects are not payment confirmation.\",\"url\":\"https://docs.kyrenpay.com/api-reference/checkouts/create-a-checkout-session\",\"mainEntityOfPage\":{\"@id\":\"https://docs.kyrenpay.com/api-reference/checkouts/create-a-checkout-session#webpage\"},\"image\":\"https://docs.kyrenpay.com/logo/kyrenpay-share.png\",\"dateModified\":\"2026-11-20T06:29:27.004Z\",\"publisher\":{\"@id\":\"https://kyrenpay.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.kyrenpay.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"KyrenPay\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"KyrenPay\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/checkouts/create-a-checkout-session.md","siteName":"KyrenPay","nav":{"global":null,"languages":[{"language":"en","default":true,"footer":{"links":[{"header":"Get started","items":[{"label":"Quickstart","href":"/quickstart"},{"label":"API authentication","href":"/authentication"},{"label":"Launch checklist","href":"/go-live-checklist"}]},{"header":"Resources","items":[{"label":"Website","href":"https://kyrenpay.com"},{"label":"Brand guidelines","href":"https://kyrenpay.com/branding"},{"label":"Support","href":"mailto:support@kyrenpay.com"}]}]},"navbar":{"links":[{"href":"https://kyrenpay.com","label":"Website"}],"primary":{"type":"button","label":"Merchant dashboard","href":"https://merchant.kyrenpay.com"}},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"Config","pages":[{"title":"Get supported currencies","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/config/currencies","href":"/api-reference/config/get-supported-currencies"},{"title":"Get settlement configuration","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/config/settlement","href":"/api-reference/config/get-settlement-configuration"},{"title":"Get legal configuration","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/config/legal","href":"/api-reference/config/get-legal-configuration"},{"title":"Get current merchant services agreement","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/config/legal/merchant-services-agreement","href":"/api-reference/config/get-current-merchant-services-agreement"},{"title":"Get historical merchant services agreement","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/config/legal/merchant-services-agreement/{version}","href":"/api-reference/config/get-historical-merchant-services-agreement"}]},{"group":"Products","pages":[{"title":"List all products","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/products","href":"/api-reference/products/list-all-products"},{"title":"Create a product","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/products","href":"/api-reference/products/create-a-product"},{"title":"Retrieve a product","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/products/{id}","href":"/api-reference/products/retrieve-a-product"},{"title":"Archive a product","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/products/{id}","href":"/api-reference/products/archive-a-product"},{"title":"Update a product","description":"Updates an existing product. Only the provided fields will be updated.","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/products/{id}","href":"/api-reference/products/update-a-product"}]},{"group":"Checkouts","pages":[{"title":"Create a checkout session","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/checkouts","href":"/api-reference/checkouts/create-a-checkout-session"},{"title":"Retrieve a checkout session","description":"Retrieves a session belonging to the authenticated merchant. OPEN is awaiting payment,\nCOMPLETE indicates completion and exposes the associated successful orderId, and EXPIRED\nindicates session expiry. orderId is omitted until a successful order is associated.\nFor payment reconciliation, retrieve that order and use the same idempotent fulfillment\ntransaction as Webhooks. Session expiry is not evidence that an existing payment attempt failed.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/checkouts/{id}","href":"/api-reference/checkouts/retrieve-a-checkout-session"}]},{"group":"Orders","pages":[{"title":"List all orders","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/orders","href":"/api-reference/orders/list-all-orders"},{"title":"Retrieve an order","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/orders/{id}","href":"/api-reference/orders/retrieve-an-order"},{"title":"Export orders as CSV","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/orders/export","href":"/api-reference/orders/export-orders-as-csv"}]},{"group":"Refunds","pages":[{"title":"Create a refund","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/orders/{orderId}/refunds","href":"/api-reference/refunds/create-a-refund"},{"title":"Retrieve a refund","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/refunds/{refundId}","href":"/api-reference/refunds/retrieve-a-refund"}]},{"group":"Balance","pages":[{"title":"Retrieve account balance","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/balance","href":"/api-reference/balance/retrieve-account-balance"},{"title":"List balance transactions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/balance/transactions","href":"/api-reference/balance/list-balance-transactions"}]},{"group":"Epay Compatibility","pages":[{"title":"submit.php (redirect checkout compatibility endpoint)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /epay/submit.php","href":"/api-reference/epay-compatibility/submitphp-redirect-checkout-compatibility-endpoint"},{"title":"mapi.php (direct create payment compatibility endpoint)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /epay/mapi.php","href":"/api-reference/epay-compatibility/mapiphp-direct-create-payment-compatibility-endpoint"},{"title":"api.php (order query/refund compatibility endpoint)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /epay/api.php","href":"/api-reference/epay-compatibility/apiphp-order-queryrefund-compatibility-endpoint"}]}]}]},{"language":"zh","footer":{"links":[{"header":"开始接入","items":[{"label":"快速开始","href":"/zh/quickstart"},{"label":"API 认证","href":"/zh/authentication"},{"label":"上线检查","href":"/zh/go-live-checklist"}]},{"header":"资源与支持","items":[{"label":"官方网站","href":"https://kyrenpay.com"},{"label":"品牌指南","href":"https://kyrenpay.com/branding"},{"label":"联系支持","href":"mailto:support@kyrenpay.com"}]}]},"navbar":{"links":[{"href":"https://kyrenpay.com","label":"官方网站"}],"primary":{"type":"button","label":"商户控制台","href":"https://merchant.kyrenpay.com"}},"tabs":[{"tab":"文档","pages":[{"title":"文档","href":"/zh/introduction"}]},{"tab":"API 参考","groups":[{"group":"Config","pages":[{"title":"Get supported currencies","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/config/currencies","href":"/api-reference/config/get-supported-currencies"},{"title":"Get settlement configuration","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/config/settlement","href":"/api-reference/config/get-settlement-configuration"},{"title":"Get legal configuration","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/config/legal","href":"/api-reference/config/get-legal-configuration"},{"title":"Get current merchant services agreement","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/config/legal/merchant-services-agreement","href":"/api-reference/config/get-current-merchant-services-agreement"},{"title":"Get historical merchant services agreement","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/config/legal/merchant-services-agreement/{version}","href":"/api-reference/config/get-historical-merchant-services-agreement"}]},{"group":"Products","pages":[{"title":"List all products","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/products","href":"/api-reference/products/list-all-products"},{"title":"Create a product","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/products","href":"/api-reference/products/create-a-product"},{"title":"Retrieve a product","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/products/{id}","href":"/api-reference/products/retrieve-a-product"},{"title":"Archive a product","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/products/{id}","href":"/api-reference/products/archive-a-product"},{"title":"Update a product","description":"Updates an existing product. Only the provided fields will be updated.","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/products/{id}","href":"/api-reference/products/update-a-product"}]},{"group":"Checkouts","pages":[{"title":"Create a checkout session","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/checkouts","href":"/api-reference/checkouts/create-a-checkout-session"},{"title":"Retrieve a checkout session","description":"Retrieves a session belonging to the authenticated merchant. OPEN is awaiting payment,\nCOMPLETE indicates completion and exposes the associated successful orderId, and EXPIRED\nindicates session expiry. orderId is omitted until a successful order is associated.\nFor payment reconciliation, retrieve that order and use the same idempotent fulfillment\ntransaction as Webhooks. Session expiry is not evidence that an existing payment attempt failed.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/checkouts/{id}","href":"/api-reference/checkouts/retrieve-a-checkout-session"}]},{"group":"Orders","pages":[{"title":"List all orders","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/orders","href":"/api-reference/orders/list-all-orders"},{"title":"Retrieve an order","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/orders/{id}","href":"/api-reference/orders/retrieve-an-order"},{"title":"Export orders as CSV","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/orders/export","href":"/api-reference/orders/export-orders-as-csv"}]},{"group":"Refunds","pages":[{"title":"Create a refund","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/orders/{orderId}/refunds","href":"/api-reference/refunds/create-a-refund"},{"title":"Retrieve a refund","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/refunds/{refundId}","href":"/api-reference/refunds/retrieve-a-refund"}]},{"group":"Balance","pages":[{"title":"Retrieve account balance","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/balance","href":"/api-reference/balance/retrieve-account-balance"},{"title":"List balance transactions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/balance/transactions","href":"/api-reference/balance/list-balance-transactions"}]},{"group":"Epay Compatibility","pages":[{"title":"submit.php (redirect checkout compatibility endpoint)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /epay/submit.php","href":"/api-reference/epay-compatibility/submitphp-redirect-checkout-compatibility-endpoint"},{"title":"mapi.php (direct create payment compatibility endpoint)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /epay/mapi.php","href":"/api-reference/epay-compatibility/mapiphp-direct-create-payment-compatibility-endpoint"},{"title":"api.php (order query/refund compatibility endpoint)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /epay/api.php","href":"/api-reference/epay-compatibility/apiphp-order-queryrefund-compatibility-endpoint"}]}]}]},{"language":"zh-Hant","footer":{"links":[{"header":"開始串接","items":[{"label":"快速開始","href":"/zh-Hant/quickstart"},{"label":"API 認證","href":"/zh-Hant/authentication"},{"label":"上線檢查","href":"/zh-Hant/go-live-checklist"}]},{"header":"資源與支援","items":[{"label":"官方網站","href":"https://kyrenpay.com"},{"label":"品牌指南","href":"https://kyrenpay.com/branding"},{"label":"聯絡支援","href":"mailto:support@kyrenpay.com"}]}]},"navbar":{"links":[{"href":"https://kyrenpay.com","label":"官方網站"}],"primary":{"type":"button","label":"商戶控制台","href":"https://merchant.kyrenpay.com"}},"tabs":[{"tab":"文檔","pages":[{"title":"文檔","href":"/zh-Hant/introduction"}]},{"tab":"API 參考","groups":[{"group":"Config","pages":[{"title":"Get supported currencies","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/config/currencies","href":"/api-reference/config/get-supported-currencies"},{"title":"Get settlement configuration","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/config/settlement","href":"/api-reference/config/get-settlement-configuration"},{"title":"Get legal configuration","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/config/legal","href":"/api-reference/config/get-legal-configuration"},{"title":"Get current merchant services agreement","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/config/legal/merchant-services-agreement","href":"/api-reference/config/get-current-merchant-services-agreement"},{"title":"Get historical merchant services agreement","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/config/legal/merchant-services-agreement/{version}","href":"/api-reference/config/get-historical-merchant-services-agreement"}]},{"group":"Products","pages":[{"title":"List all products","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/products","href":"/api-reference/products/list-all-products"},{"title":"Create a product","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/products","href":"/api-reference/products/create-a-product"},{"title":"Retrieve a product","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/products/{id}","href":"/api-reference/products/retrieve-a-product"},{"title":"Archive a product","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/products/{id}","href":"/api-reference/products/archive-a-product"},{"title":"Update a product","description":"Updates an existing product. Only the provided fields will be updated.","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/products/{id}","href":"/api-reference/products/update-a-product"}]},{"group":"Checkouts","pages":[{"title":"Create a checkout session","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/checkouts","href":"/api-reference/checkouts/create-a-checkout-session"},{"title":"Retrieve a checkout session","description":"Retrieves a session belonging to the authenticated merchant. OPEN is awaiting payment,\nCOMPLETE indicates completion and exposes the associated successful orderId, and EXPIRED\nindicates session expiry. orderId is omitted until a successful order is associated.\nFor payment reconciliation, retrieve that order and use the same idempotent fulfillment\ntransaction as Webhooks. Session expiry is not evidence that an existing payment attempt failed.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/checkouts/{id}","href":"/api-reference/checkouts/retrieve-a-checkout-session"}]},{"group":"Orders","pages":[{"title":"List all orders","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/orders","href":"/api-reference/orders/list-all-orders"},{"title":"Retrieve an order","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/orders/{id}","href":"/api-reference/orders/retrieve-an-order"},{"title":"Export orders as CSV","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/orders/export","href":"/api-reference/orders/export-orders-as-csv"}]},{"group":"Refunds","pages":[{"title":"Create a refund","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/orders/{orderId}/refunds","href":"/api-reference/refunds/create-a-refund"},{"title":"Retrieve a refund","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/refunds/{refundId}","href":"/api-reference/refunds/retrieve-a-refund"}]},{"group":"Balance","pages":[{"title":"Retrieve account balance","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/balance","href":"/api-reference/balance/retrieve-account-balance"},{"title":"List balance transactions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/balance/transactions","href":"/api-reference/balance/list-balance-transactions"}]},{"group":"Epay Compatibility","pages":[{"title":"submit.php (redirect checkout compatibility endpoint)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /epay/submit.php","href":"/api-reference/epay-compatibility/submitphp-redirect-checkout-compatibility-endpoint"},{"title":"mapi.php (direct create payment compatibility endpoint)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /epay/mapi.php","href":"/api-reference/epay-compatibility/mapiphp-direct-create-payment-compatibility-endpoint"},{"title":"api.php (order query/refund compatibility endpoint)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /epay/api.php","href":"/api-reference/epay-compatibility/apiphp-order-queryrefund-compatibility-endpoint"}]}]}]}]},"basePath":"","title":"Create a checkout session - KyrenPay","deploymentId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","buildId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-x4vGgoST.js","snippetPresets-BGlsYH49.js","utils-D225GpYB.js","style-to-object-BY3JEAdk.js","utils-fb7dxv-3.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-D0sNzoEe.js","conditional-requirements-CFM0id0Q.js","cloneDeep-C4iMfrOs.js","_Uint8Array-DDor1j2p.js","isObject-FP1Yky1u.js","ApiExamples-Bw_TWYoP.js","usePlaygroundInputsStore-DLRpNM_Z.js","shallow-DCZ_mvT2.js","isEqual-BZMHHGz2.js","CodeSnippets-CqYNT6UN.js","CodeSnippet-AsYrl7_f.js","getApiPlaygroundDisplay-B1HdZsAn.js","Page-COAeG2by.js","DynamicMarkdown-Bg54PExR.js","SectionHeading-BVOfbSTS.js","icon-Bwg0LftJ.js","MethodPill-ETXe5J4U.js","getPastedJson-6m1DH7UM.js","Check2Icon-Bz4v4IkN.js","axios-CsQoIw0U.js","Markdown-CYkmN8yk.js","AssistantPageLink-BZUrxqjy.js","dist-C-58LlaB.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}