Historical subscription guide comparing Checkout Mode (payUrl redirect) with the Front-End Component that shows Google Pay, Apple Pay, and cards in one container, plus launch requirements and dispute fees.
HaiPay subscription payment supports membership, recurring services, auto-renewal, and other periodic billing scenarios. This page covers integration modes, key business rules, and launch requirements. For detailed API fields and debugging, refer to the corresponding API Reference.
Quick Start
Review integration steps, prerequisites, and recommended reading path.
Integration Modes
Compare Checkout Mode and Front-End Component.
Core APIs
Jump to subscription apply, query, cancel, and refund endpoints.
Provide clear subscription entry, billing cycle description, and unsubscribe entry.
Notify users via email or other off-site channels before and after each charge.
Provide a confirmable subscription agreement and only initiate after explicit user authorization.
Maintain customer support availability, at least covering service hours in primary operating regions.
Consumers may initiate a dispute within 180 days after a credit card charge.
Each dispute incurs a $20 dispute handling fee.
If you choose to contest, an additional $20 representment fee applies.
If the representment is successful, HaiPay refunds the representment fee; the original dispute handling fee is non-refundable.
PCI DSS strictly prohibits embedding credit card input pages in WebView or iframe. Always complete card information collection and payment authorization in a trusted browser environment to avoid compliance risks and sensitive data exposure.
Subscription payment offers two integration modes: PayUrl Redirect Mode (server obtains authorization link, redirects to HaiPay hosted page) and Front-End Component Mode (embed payment components in your own page using a client token). Choose based on your checkout design and frontend capabilities.
3
Integrate APIs, Notifications, and Cancellation
After completing the subscription apply, you need to query subscription status, handle charge callbacks, and provide a cancellation entry for users. Detailed fields and debugging entry points are in the API Reference cards below.
Subscription payment offers two integration modes. The core difference is who hosts the payment page:
Comparison
Checkout Mode
Front-End Component
Payment Page
Redirect to HaiPay hosted page
Embed payment components in merchant page
Frontend Work
Minimal, just handle redirects
Requires JS script and event listeners
UI Control
Low, styled by HaiPay
High, fully customizable
Key Return Field
payUrl from response
clientToken from response
Best For
Quick integration, no custom UI needs
Custom checkout, immersive payment
Checkout Mode
Front-End Component Mode
The simplest integration method. After the merchant server calls the subscription apply API, use the returned payUrl to redirect the user to the HaiPay hosted page for authorization and first payment.Integration Flow
1
Server calls subscription apply API
The merchant server sends a subscription apply request to HaiPay, including subscription amount, cycle, Callback URL, and other required parameters.
2
Get payUrl and redirect
The response includes a payUrl field. Redirect the user’s browser to this URL.
3
User completes payment
The user completes credit card entry and payment authorization on the HaiPay hosted page. After payment, HaiPay redirects the user back to the merchant’s callBackUrl and sends an async notification to notifyUrl.
Example code (frontend redirect after server obtains payUrl)
// Assume your server has called the subscription apply API and returned payUrlconst payUrl = response.data.payUrl;// Redirect in current windowwindow.location.href = payUrl;// Or open in new window// window.open(payUrl, '_blank');
Recommendations
Fastest subscription integration with minimal frontend changes.
No strong custom UI requirements for the payment page.
Redirect experience usually works well for mobile H5 scenarios.
By including the HaiPay Front-End Component script, embed payment components in the merchant’s own page. After calling the subscription apply API, use the returned clientToken to initialize the frontend component, allowing users to pay without leaving your page.Best for modern subscription checkout that displays Google Pay, Apple Pay, and Credit Card in a single container.Recommended Scripthttps://cashier.haipay.top/js/paymentMethodsSubscribe_1.0.0.min.jsKey Parameters
When subscription status changes or a recurring charge completes, HaiPay pushes async notifications to the notifyUrl provided during subscription apply.
To ensure API extensibility and compatibility, follow these callback parameter receiving practices:
Do NOT declare specific POJO objects to receive callback parameters.
MUST use generic data structures (e.g. JSONObject, Map) for parameter parsing.
This design ensures that future callback field extensions will not affect signature verification.
After receiving a notification, return SUCCESS (uppercase) in the response body.
Subscription Status Notification
Subscription Charge Notification
Triggered when subscription status changes (e.g. success, cancel, failure).
Maximum subscription duration is 3 years regardless of interval unit
Interval Unit
Apple Pay does not support W; use D + 7 days for weekly
Payment Type
Fixed as SUBSCRIPTION for subscription scenarios
User Notification
Recommended to send off-site notifications after subscription success, before and after charges
Unsubscribe
Production must provide a clear, accessible cancellation entry
Payment Method Parameter
Pass either inBankCode or paymentMethods in the Subscription Apply API: inBankCode for a single payment method, paymentMethods for a comma-separated list. paymentMethods currently only supports the Front-End Component Mode
When should I use this page vs. the API Reference?
This page helps you understand product capabilities, choose integration modes, and learn business rules. For development and debugging, go directly to the Subscription API Reference for complete fields, sample payloads, and debugging tools.
Why must subscription businesses emphasize unsubscribe entry and off-site notifications?
Subscription transactions are more prone to user disputes. Clear authorization, notification, and cancellation capabilities significantly reduce chargebacks, complaints, and risk control issues — key prerequisites for stable subscription operations.
How to handle Unsupported region: CN in production?
This usually means the production environment does not support the region, or the test configuration does not match the target region. Verify merchant configuration, target market, and payment method combination, then contact HaiPay support to confirm production availability.
How to choose between Checkout Mode and Front-End Component?
For fastest launch with minimal frontend changes, choose Checkout Mode. For custom checkout UI where users stay on your page, choose Front-End Component Mode. Both modes use the same Subscription Apply API — the only difference is whether you use the returned payUrl or clientToken.
Should I pass inBankCode or paymentMethods?
Choose one — they cannot be passed together or both empty. For a single payment method, pass inBankCode. For multiple payment methods (e.g. Front-End Component Mode), pass paymentMethods. Note: paymentMethods currently only supports the Front-End Component Mode; other modes should continue using inBankCode.
What mode is recommended for a quick modern subscription page?
If using Front-End Component Mode, it displays multiple payment methods in a single container for a more complete page, lower user cognitive load, and more manageable frontend development.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"HaiPay","description":"HaiPay payment API documentation for merchant onboarding, integration guides, testing workflows, and global payment references.","colors":{"primary":"#5F3CC7","light":"#9289FE","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/haipay-3385f6e8/Fh2duvg55RQO2xS-/images/logo/light.png?fit=max\u0026auto=format\u0026n=Fh2duvg55RQO2xS-\u0026q=85\u0026s=573f6622ee2aed0dbd22a52f7f1f3a5c","dark":"https://mintcdn.com/haipay-3385f6e8/Fh2duvg55RQO2xS-/images/logo/dark.png?fit=max\u0026auto=format\u0026n=Fh2duvg55RQO2xS-\u0026q=85\u0026s=ad633d1ef0dc99aafb8332e178794edf"},"favicon":"https://mintcdn.com/haipay-3385f6e8/bzbfpf1uH8h6Eq93/images/logo/favicon.png?fit=max\u0026auto=format\u0026n=bzbfpf1uH8h6Eq93\u0026q=85\u0026s=26754ae182abdf6a3e10188d15ff9d0d","api":{"playground":{"display":"interactive","proxy":true},"examples":{"languages":["bash","python","node","php","java"],"prefill":true}},"appearance":{"default":"light"},"navbar":{"links":[{"href":"https://www.haipay.net","label":"HaiPay.net"},{"href":"mailto:support@haipay.net","label":"Support"}]},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/haipay-global","github":"https://github.com/HaipayGroup"}},"search":{"prompt":"Search HaiPay docs..."},"seo":{"metatags":{"og:site_name":"HaiPay Documentation","og:image":"https://www.haipay.net/og-default.png","twitter:card":"summary_large_image","twitter:site":"@HaiPay_official","canonical":"https://doc.haipay.net"},"indexing":"navigable"},"contextual":{"options":["copy","chatgpt",{"title":"在通义千问中打开","description":"向qwen询问有关此页面的问题","icon":"/images/ai/qwen.svg","href":{"base":"https://www.qianwen.com/","query":[{"key":"q","value":"查看这份文档:$page"}]}},"claude","perplexity","mcp","cursor","vscode",{"title":"连接到Qoder","description":"在Qoder中安装HaiPay MCP","icon":"/images/ai/qoder.svg","href":"qoder://aicoding.aicoding-deeplink/mcp/add?name=HaiPay\u0026config=JTdCJTIydXJsJTIyJTNBJTIyaHR0cHMlM0ElMkYlMkZkb2MuaGFpcGF5Lm5ldCUyRm1jcCUyMiU3RA%3D%3D"}],"display":"header"},"metadata":{"timestamp":true},"styling":{"latex":false},"navigation":{"languages":[{"language":"zh","href":"zh/overview"},{"language":"en","href":"en/overview"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"haipay-3385f6e8","hasAudioNarration":false,"actualSubdomain":"haipay-3385f6e8","customDomains":["doc.haipay.net"],"gitSource":{"type":"github","owner":"haipaygroup","repo":"haipayapidoc","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae1723c3fdc9920443c6392","collectionId":"23a4a8d0-337c-4f9d-a74c-84cb305801f7","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae1723c3fdc9920443c6392"},"feedback":{"thumbs":false,"agentFeedback":false},"entitlements":{},"buildId":"6ae3371b4d48ffa49b8a7d92","clientVersion":"0.0.4006","searchFilterCounts":[{"language":"en","tag":"API","count":516},{"language":"zh","tag":"API","count":516},{"language":"en","tag":"Documentation Center","count":228},{"language":"zh","tag":"文档中心","count":228},{"language":"en","tag":"Global Payment","count":143},{"language":"zh","tag":"全球支付","count":143},{"language":"zh","tag":"亚洲","count":111},{"language":"en","tag":"Asia Pacific","count":59},{"language":"en","tag":"Asia","count":52},{"language":"en","tag":"Africa","count":43},{"language":"en","tag":"Payments","count":43},{"language":"zh","tag":"非洲","count":43},{"language":"zh","tag":"支付接入","count":43},{"language":"en","tag":"Merchant Guide","count":38},{"language":"zh","tag":"商户指南","count":38},{"language":"en","tag":"Local Payments","count":32},{"language":"zh","tag":"国家/地区支付","count":32},{"language":"en","tag":"Middle East","count":30},{"language":"zh","tag":"中东","count":30},{"language":"zh","tag":"中东与北非","count":27}],"searchSettings":{"showContentSnippets":true,"maxResults":10}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":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":"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":"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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"privacy":{"consentBanner":{"enabled":true}},"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".dark #sidebar-title,.light #sidebar-title{font-weight:700!important;color:#000!important;font-size:14px}.dark #sidebar-title{color:#fff!important}:lang(zh){font-family:\"Noto Sans SC\",sans-serif}:lang(en){font-family:\"Inter\",sans-serif}a.related-link:hover span{color:#5f3cc7}.frame{margin:24px 0;border:1px solid #e5e7eb;border-radius:8px;overflow:hidden;background:#fff}.frame img{width:100%;display:block;margin:0!important}.frame-caption{padding:10px 16px;font-size:13px;color:#6b7280;background:#fff;border-top:1px solid #f3f4f6}.dark .frame{border-color:#374151;background:#111827}.dark .frame-caption{color:#9ca3af;background:#111827;border-top-color:#374151}.badge-recommended{display:inline-block;padding:1px 8px;border-radius:4px;font-size:12px;font-weight:600;background:#f3eeff;color:#7b3ff2;vertical-align:middle;line-height:1.6}.dark .badge-recommended{background:rgba(123,63,242,.18);color:#c4b5fd}.doc-footer{font-size:13px;color:#9ca3af}.doc-footer p{margin:4px 0!important}.dark .doc-footer{color:#6b7280}"}],"page":{"pagePath":"en/history/V20260628/api/version2/Subscription","slug":"/en/history/V20260628/api/version2/Subscription","pageMetadata":{"title":"Subscription (Legacy navigation V20260628)","sidebarTitle":"Subscription","description":"Historical subscription guide comparing Checkout Mode (payUrl redirect) with the Front-End Component that shows Google Pay, Apple Pay, and cards in one container, plus launch requirements and dispute fees.","keywords":["HaiPay","subscription","credit card subscription","Subscription","API"],"href":"/en/history/V20260628/api/version2/Subscription"},"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: \"Historical subscription guide comparing Checkout Mode (payUrl redirect) with the Front-End Component that shows Google Pay, Apple Pay, and cards in one container, plus launch requirements and dispute fees.\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Card,CodeBlock,Columns,Danger,Heading,Step,Steps,Tab,Table,Tabs,Tip,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Columns)_missingMdxReference(`Columns`,true);if(!Danger)_missingMdxReference(`Danger`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`HaiPay subscription payment supports membership, recurring services, auto-renewal, and other periodic billing scenarios. This page covers integration modes, key business rules, and launch requirements. For detailed API fields and debugging, refer to the corresponding API Reference.`}),`\n`,_jsxs(Columns,{cols:3,children:[_jsx(Card,{title:`Quick Start`,icon:`rocket`,href:`#quick-start`,children:_jsx(_components.p,{children:`Review integration steps, prerequisites, and recommended reading path.`})}),_jsx(Card,{title:`Integration Modes`,icon:`layer-group`,href:`#integration-modes`,children:_jsx(_components.p,{children:`Compare Checkout Mode and Front-End Component.`})}),_jsx(Card,{title:`Core APIs`,icon:`list-check`,href:`#core-apis`,children:_jsx(_components.p,{children:`Jump to subscription apply, query, cancel, and refund endpoints.`})})]}),`\n`,_jsx(Warning,{title:`Product and Service Requirements Before Launch`,children:_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Provide clear subscription entry, billing cycle description, and unsubscribe entry.`}),`\n`,_jsx(_components.li,{children:`Notify users via email or other off-site channels before and after each charge.`}),`\n`,_jsx(_components.li,{children:`Provide a confirmable subscription agreement and only initiate after explicit user authorization.`}),`\n`,_jsx(_components.li,{children:`Maintain customer support availability, at least covering service hours in primary operating regions.`}),`\n`]})}),`\n`,_jsx(Tip,{title:`Credit Card Disputes and Fee Notice`,children:_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Consumers may initiate a dispute within 180 days after a credit card charge.`}),`\n`,_jsx(_components.li,{children:`Each dispute incurs a $20 dispute handling fee.`}),`\n`,_jsx(_components.li,{children:`If you choose to contest, an additional $20 representment fee applies.`}),`\n`,_jsx(_components.li,{children:`If the representment is successful, HaiPay refunds the representment fee; the original dispute handling fee is non-refundable.`}),`\n`]})}),`\n`,_jsx(Danger,{title:`PCI DSS Compliance Requirements`,children:_jsxs(_components.p,{children:[`PCI DSS strictly prohibits embedding credit card input pages in `,_jsx(_components.code,{children:`WebView`}),` or `,_jsx(_components.code,{children:`iframe`}),`. Always complete card information collection and payment authorization in a trusted browser environment to avoid compliance risks and sensitive data exposure.`]})}),`\n`,_jsx(`a`,{id:`quick-start`}),`\n`,_jsx(Heading,{level:`2`,id:`quick-start`,children:`Quick Start`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Confirm Business Model and Prerequisites`,children:_jsxs(_components.p,{children:[`First read the `,_jsx(_components.a,{href:`/en/history/V20260628/get-started/api-conventions`,children:`API Description Guide`}),` and `,_jsx(_components.a,{href:`/en/history/V20260628/payments/subscriptions/workflow`,children:`Subscription Flow`}),` to confirm your scenario is recurring billing, not one-time payment.`]})}),_jsx(Step,{title:`Choose Integration Mode`,children:_jsxs(_components.p,{children:[`Subscription payment offers two integration modes: `,_jsx(_components.strong,{children:`PayUrl Redirect Mode`}),` (server obtains authorization link, redirects to HaiPay hosted page) and `,_jsx(_components.strong,{children:`Front-End Component Mode`}),` (embed payment components in your own page using a client token). Choose based on your checkout design and frontend capabilities.`]})}),_jsx(Step,{title:`Integrate APIs, Notifications, and Cancellation`,children:_jsx(_components.p,{children:`After completing the subscription apply, you need to query subscription status, handle charge callbacks, and provide a cancellation entry for users. Detailed fields and debugging entry points are in the API Reference cards below.`})})]}),`\n`,_jsx(`a`,{id:`integration-modes`}),`\n`,_jsx(Heading,{level:`2`,id:`integration-modes`,children:`Integration Modes`}),`\n`,_jsx(_components.p,{children:`Subscription payment offers two integration modes. The core difference is who hosts the payment page:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Comparison`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Checkout Mode`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Front-End Component`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Payment Page`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Redirect to HaiPay hosted page`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Embed payment components in merchant page`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Frontend Work`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Minimal, just handle redirects`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Requires JS script and event listeners`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`UI Control`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Low, styled by HaiPay`}),_jsx(_components.td,{style:{textAlign:`left`},children:`High, fully customizable`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Key Return Field`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[_jsx(_components.code,{children:`payUrl`}),` from response`]}),_jsxs(_components.td,{style:{textAlign:`left`},children:[_jsx(_components.code,{children:`clientToken`}),` from response`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Best For`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Quick integration, no custom UI needs`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Custom checkout, immersive payment`})]})]})]}),`\n`,_jsxs(Tabs,{sync:false,children:[_jsxs(Tab,{title:`Checkout Mode`,icon:`arrow-up-right-from-square`,id:`checkout-mode`,children:[_jsxs(_components.p,{children:[`The simplest integration method. After the merchant server calls the subscription apply API, use the returned `,_jsx(_components.code,{children:`payUrl`}),` to redirect the user to the HaiPay hosted page for authorization and first payment.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Integration Flow`})}),_jsxs(Steps,{children:[_jsx(Step,{title:`Server calls subscription apply API`,children:_jsxs(_components.p,{children:[`The merchant server sends a `,_jsx(_components.a,{href:`/en/history/V20260628/api-reference/subscription/api/subscriptionApply`,children:`subscription apply`}),` request to HaiPay, including subscription amount, cycle, Callback URL, and other required parameters.`]})}),_jsx(Step,{title:`Get payUrl and redirect`,children:_jsxs(_components.p,{children:[`The response includes a `,_jsx(_components.code,{children:`payUrl`}),` field. Redirect the user’s browser to this URL.`]})}),_jsx(Step,{title:`User completes payment`,children:_jsxs(_components.p,{children:[`The user completes credit card entry and payment authorization on the HaiPay hosted page. After payment, HaiPay redirects the user back to the merchant’s `,_jsx(_components.code,{children:`callBackUrl`}),` and sends an async notification to `,_jsx(_components.code,{children:`notifyUrl`}),`.`]})})]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example code (frontend redirect after server obtains payUrl)`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Assume your server has called the subscription apply API and returned payUrl`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` payUrl`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payUrl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Redirect in current window`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`location`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`href`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` payUrl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Or open in new window`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// window.open(payUrl, '_blank');`})}),`\n`]})})}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Recommendations`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Fastest subscription integration with minimal frontend changes.`}),`\n`,_jsx(_components.li,{children:`No strong custom UI requirements for the payment page.`}),`\n`,_jsx(_components.li,{children:`Redirect experience usually works well for mobile H5 scenarios.`}),`\n`]})]}),_jsxs(Tab,{title:`Front-End Component Mode`,icon:`code`,id:`front-end-component-mode`,children:[_jsxs(_components.p,{children:[`By including the HaiPay Front-End Component script, embed payment components in the merchant’s own page. After calling the subscription apply API, use the returned `,_jsx(_components.code,{children:`clientToken`}),` to initialize the frontend component, allowing users to pay without leaving your page.`]}),_jsxs(_components.p,{children:[`Best for modern subscription checkout that displays `,_jsx(_components.code,{children:`Google Pay`}),`, `,_jsx(_components.code,{children:`Apple Pay`}),`, and `,_jsx(_components.code,{children:`Credit Card`}),` in a single container.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Recommended Script`})}),_jsx(_components.p,{children:_jsx(_components.code,{children:`https://cashier.haipay.top/js/paymentMethodsSubscribe_1.0.0.min.js`})}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Key Parameters`})}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Parameter`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Required`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`sandbox`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Yes`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[_jsx(_components.code,{children:`true`}),` for test, `,_jsx(_components.code,{children:`false`}),` for production`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`clientToken`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Yes`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Client token`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`themeMode`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`No`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Theme mode, default `,_jsx(_components.code,{children:`light`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`paymentMethodConfig`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`No`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Payment method combination, default `,_jsx(_components.code,{children:`[\"GOOGLE_PAY\",\"APPLE_PAY\",\"CREDIT_CARD\"]`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`applePayButtonType`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`No`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Apple Pay button text, e.g. `,_jsx(_components.code,{children:`buy`}),`, `,_jsx(_components.code,{children:`subscribe`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`googlePayButtonType`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`No`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Google Pay button text, e.g. `,_jsx(_components.code,{children:`buy`}),`, `,_jsx(_components.code,{children:`subscribe`})]})]})]})]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Key Events`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ready`}),`: Buttons rendered`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`error`}),`: Initialization or payment error`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`paymentStatus`}),`: Payment result callback (if not listened, the component handles the result by default)`]}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Recommendations`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Recommended for new checkout pages — clearer information architecture.`}),`\n`,_jsx(_components.li,{children:`If only some payment methods are needed, pass only the required combination.`}),`\n`,_jsx(_components.li,{children:`Reduces frontend customization effort.`}),`\n`,_jsxs(_components.li,{children:[`When using Front-End Component, pass `,_jsx(_components.code,{children:`paymentMethods`}),` instead of `,_jsx(_components.code,{children:`inBankCode`}),` in the Subscription Apply API, e.g. `,_jsx(_components.code,{children:`CREDIT_CARD,GOOGLE_PAY,APPLE_PAY`}),`.`]}),`\n`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`26`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`26`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` src`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://cashier.haipay.top/js/paymentMethodsSubscribe_1.0.0.min.js\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"paymentId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` elements`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` paymentMethodsSubscribe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sandbox:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` clientToken:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'your-client-token'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` themeMode:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'light'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` paymentMethodConfig:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'GOOGLE_PAY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'APPLE_PAY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'CREDIT_CARD'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`elements`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`mount`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'#paymentId'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`elements`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`on`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ready'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'rendered successfully:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`elements`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`on`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'error'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Payment error:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`elements`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`on`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'paymentStatus'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'payment status:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})})]})]}),`\n`,_jsx(`a`,{id:`core-apis`}),`\n`,_jsx(Heading,{level:`2`,id:`core-apis`,children:`Core APIs`}),`\n`,_jsx(_components.p,{children:`For detailed request fields, response structures, and online debugging, go directly to the API Reference:`}),`\n`,_jsxs(Columns,{cols:2,children:[_jsx(Card,{title:`Subscription Apply`,icon:`circle-plus`,href:`/en/history/V20260628/api-reference/subscription/api/subscriptionApply`,children:_jsx(_components.p,{children:`Create a subscription order, initiate user authorization, and complete the first payment.`})}),_jsx(Card,{title:`Subscription Query`,icon:`magnifying-glass`,href:`/en/history/V20260628/api-reference/subscription/subscription-query`,children:_jsx(_components.p,{children:`Query subscription status, platform subscription number, and charge records.`})}),_jsx(Card,{title:`Subscription Cancel`,icon:`ban`,href:`/en/history/V20260628/api-reference/subscription/subscription-cancel`,children:_jsx(_components.p,{children:`Merchant-initiated cancellation to stop future recurring charges.`})})]}),`\n`,_jsx(Heading,{level:`2`,id:`async-notifications`,children:`Async Notifications`}),`\n`,_jsxs(_components.p,{children:[`When subscription status changes or a recurring charge completes, HaiPay pushes async notifications to the `,_jsx(_components.code,{children:`notifyUrl`}),` provided during subscription apply.`]}),`\n`,_jsxs(Tip,{title:`Receiving Recommendations`,children:[_jsx(_components.p,{children:`To ensure API extensibility and compatibility, follow these callback parameter receiving practices:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Do NOT`}),` declare specific POJO objects to receive callback parameters.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`MUST`}),` use generic data structures (e.g. JSONObject, Map) for parameter parsing.`]}),`\n`,_jsx(_components.li,{children:`This design ensures that future callback field extensions will not affect signature verification.`}),`\n`]})]}),`\n`,_jsxs(_components.p,{children:[`After receiving a notification, return `,_jsx(_components.strong,{children:`SUCCESS`}),` (uppercase) in the response body.`]}),`\n`,_jsxs(Tabs,{sync:false,children:[_jsxs(Tab,{title:`Subscription Status Notification`,icon:`bell`,id:`subscription-status-notification`,children:[_jsx(_components.p,{children:`Triggered when subscription status changes (e.g. success, cancel, failure).`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Parameter`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Type`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`type`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`String`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Notification type, fixed as `,_jsx(_components.code,{children:`SUBSCRIPTION`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`appId`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Long`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Business ID`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`currency`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`String`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Currency`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`subscriptionOrderId`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`String`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Merchant subscription order ID`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`subscriptionNo`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`String`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Platform subscription number`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`amount`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`String`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Subscription amount`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`status`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Integer`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Subscription status (1: processing, 2: success, 3: failed, 4: cancelled, 5: completed)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`recurringInterval`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`String`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Recurring interval type (D/W/M/Y)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`recurringIntervalCount`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Integer`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Recurring interval count`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`subject`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`String`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Subscription title`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`sign`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`String`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Signature (use the business key corresponding to the currency for verification)`})]})]})]})]}),_jsxs(Tab,{title:`Subscription Charge Notification`,icon:`money-bill-wave`,id:`subscription-charge-notification`,children:[_jsx(_components.p,{children:`Triggered when a recurring charge succeeds or fails.`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Parameter`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Type`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`type`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`String`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Notification type, fixed as `,_jsx(_components.code,{children:`SUBSCRIPTIONS_DEDUCT`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`appId`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Long`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Business ID`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`currency`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`String`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Currency`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`subscriptionOrderId`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`String`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Merchant subscription order ID`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`subscriptionNo`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`String`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Platform subscription number`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`deductNo`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`String`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Charge number`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`orderNo`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`String`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Platform order number`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`amount`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`String`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Charge amount`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`status`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Integer`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Charge status (2: success, 3: failed)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`startTime`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`String`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Current charge cycle start time, format: yyyy-MM-dd HH:mm:ss`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`endTime`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`String`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Current charge cycle end time, format: yyyy-MM-dd HH:mm:ss`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`sign`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`String`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Signature (use the business key corresponding to the currency for verification)`})]})]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`key-business-rules`,children:`Key Business Rules`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Item`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Transaction Limit`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Subscription amount range: `,_jsx(_components.code,{children:`0.99 - 1000 USD`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Max Duration`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Maximum subscription duration is 3 years regardless of interval unit`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Interval Unit`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Apple Pay does not support `,_jsx(_components.code,{children:`W`}),`; use `,_jsx(_components.code,{children:`D`}),` + `,_jsx(_components.code,{children:`7`}),` days for weekly`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Payment Type`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Fixed as `,_jsx(_components.code,{children:`SUBSCRIPTION`}),` for subscription scenarios`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`User Notification`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Recommended to send off-site notifications after subscription success, before and after charges`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Unsubscribe`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Production must provide a clear, accessible cancellation entry`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Payment Method Parameter`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Pass either `,_jsx(_components.code,{children:`inBankCode`}),` or `,_jsx(_components.code,{children:`paymentMethods`}),` in the Subscription Apply API: `,_jsx(_components.code,{children:`inBankCode`}),` for a single payment method, `,_jsx(_components.code,{children:`paymentMethods`}),` for a comma-separated list. `,_jsx(_components.code,{children:`paymentMethods`}),` currently only supports the Front-End Component Mode`]})]})]})]}),`\n`,_jsx(Tip,{title:`Test Card Numbers`,children:_jsxs(_components.p,{children:[`For test card numbers, see `,_jsx(_components.a,{href:`/en/history/V20260628/testing/test-cards`,children:`Test Card Numbers`})]})}),`\n`,_jsx(Heading,{level:`2`,id:`frequently-asked-questions`,children:`Frequently Asked Questions`}),`\n`,_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`When should I use this page vs. the API Reference?`,defaultOpen:true,id:`when-should-i-use-this-page-vs-the-api-reference`,children:_jsxs(_components.p,{children:[`This page helps you understand product capabilities, choose integration modes, and learn business rules. For development and debugging, go directly to the `,_jsx(_components.a,{href:`/en/history/V20260628/api-reference/subscription/api/subscriptionApply`,children:`Subscription API Reference`}),` for complete fields, sample payloads, and debugging tools.`]})}),_jsx(Accordion,{title:`Why must subscription businesses emphasize unsubscribe entry and off-site notifications?`,id:`why-must-subscription-businesses-emphasize-unsubscribe-entry-and-off-site-notifications`,children:_jsx(_components.p,{children:`Subscription transactions are more prone to user disputes. Clear authorization, notification, and cancellation capabilities significantly reduce chargebacks, complaints, and risk control issues — key prerequisites for stable subscription operations.`})}),_jsx(Accordion,{title:`How to handle Unsupported region: CN in production?`,id:`how-to-handle-unsupported-region-cn-in-production`,children:_jsx(_components.p,{children:`This usually means the production environment does not support the region, or the test configuration does not match the target region. Verify merchant configuration, target market, and payment method combination, then contact HaiPay support to confirm production availability.`})}),_jsx(Accordion,{title:`How to choose between Checkout Mode and Front-End Component?`,id:`how-to-choose-between-checkout-mode-and-front-end-component`,children:_jsxs(_components.p,{children:[`For fastest launch with minimal frontend changes, choose Checkout Mode. For custom checkout UI where users stay on your page, choose Front-End Component Mode. Both modes use the same Subscription Apply API — the only difference is whether you use the returned `,_jsx(_components.code,{children:`payUrl`}),` or `,_jsx(_components.code,{children:`clientToken`}),`.`]})}),_jsx(Accordion,{title:`Should I pass inBankCode or paymentMethods?`,id:`should-i-pass-inbankcode-or-paymentmethods`,children:_jsxs(_components.p,{children:[`Choose one — they cannot be passed together or both empty. For a single payment method, pass `,_jsx(_components.code,{children:`inBankCode`}),`. For multiple payment methods (e.g. Front-End Component Mode), pass `,_jsx(_components.code,{children:`paymentMethods`}),`. Note: `,_jsx(_components.code,{children:`paymentMethods`}),` currently only supports the Front-End Component Mode; other modes should continue using `,_jsx(_components.code,{children:`inBankCode`}),`.`]})}),_jsx(Accordion,{title:`What mode is recommended for a quick modern subscription page?`,id:`what-mode-is-recommended-for-a-quick-modern-subscription-page`,children:_jsx(_components.p,{children:`If using Front-End Component Mode, it displays multiple payment methods in a single container for a more complete page, lower user cognitive load, and more manageable frontend development.`})})]}),`\n`,_jsx(Heading,{level:`2`,id:`related-topics`,children:`Related Topics`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/en/history/V20260628/api/version2/ApplePay`,children:`Apple Pay Subscription`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/en/history/V20260628/api/version2/GooglePay`,children:`Google Pay Subscription`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/en/history/V20260628/payments/cards/merchant-initiated-transactions`,children:`Merchant Initiated Transaction (MIT)`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/en/history/V20260628/api/version2/creditcard`,children:`VISA/MASTER Payment`})}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Subscription (Legacy navigation V20260628)","sidebarTitle":"Subscription","description":"Historical subscription guide comparing Checkout Mode (payUrl redirect) with the Front-End Component that shows Google Pay, Apple Pay, and cards in one container, plus launch requirements and dispute fees.","keywords":["HaiPay","subscription","credit card subscription","Subscription","API"],"href":"/en/history/V20260628/api/version2/Subscription"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Quick Start","slug":"quick-start","depth":2,"children":[]},{"title":"Integration Modes","slug":"integration-modes","depth":2,"children":[]},{"title":"Core APIs","slug":"core-apis","depth":2,"children":[]},{"title":"Async Notifications","slug":"async-notifications","depth":2,"children":[]},{"title":"Key Business Rules","slug":"key-business-rules","depth":2,"children":[]},{"title":"Frequently Asked Questions","slug":"frequently-asked-questions","depth":2,"children":[]},{"title":"Related Topics","slug":"related-topics","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/haipay-3385f6e8/f9eb4046a3d2a66d/public/inject-sign.js"],"subdomain":"haipay-3385f6e8","siteName":"HaiPay","title":"Subscription (Legacy navigation V20260628) - HaiPay","navMaps":{"firstHrefInVersion":{"V20261001":{"href":"/zh/overview","matchLevel":4},"V20260801":{"href":"/en/history/V20260801/payments/cashier","matchLevel":2},"V20260701":{"href":"/en/history/V20260701/payments/cashier","matchLevel":2},"V20260628":{"href":"/en/history/V20260628/api/version2/Subscription","matchLevel":0},"V20260623":{"href":"/en/history/V20260623/api/version2/Subscription","matchLevel":1}},"firstHrefInLanguage":{"zh":{"href":"/zh/history/V20260628/api/version2/Subscription","matchLevel":1},"en":{"href":"/en/history/V20260628/api/version2/Subscription","matchLevel":0}}},"lastModified":"2026-10-29T12:09:22.163Z","gitLastModified":"2026-10-29T11:11:35.000Z","originalFileLocation":"en/history/V20260628/api/version2/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=\"light\"}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=\"Historical subscription guide comparing Checkout Mode (payUrl redirect) with the Front-End Component that shows Google Pay, Apple Pay, and cards in one container, plus launch requirements and dispute fees.\">\u003cmeta data-mint-head name=\"application-name\" content=\"HaiPay\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/haipay-3385f6e8/zF8MnpYOAB0QG9P5/_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/haipay-3385f6e8/zF8MnpYOAB0QG9P5/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/haipay-3385f6e8/zF8MnpYOAB0QG9P5/_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/haipay-3385f6e8/zF8MnpYOAB0QG9P5/_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/haipay-3385f6e8/zF8MnpYOAB0QG9P5/_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/haipay-3385f6e8/zF8MnpYOAB0QG9P5/_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/haipay-3385f6e8/zF8MnpYOAB0QG9P5/_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/haipay-3385f6e8/zF8MnpYOAB0QG9P5/_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/haipay-3385f6e8/zF8MnpYOAB0QG9P5/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Subscription (Legacy navigation V20260628) - HaiPay\">\u003cmeta data-mint-head property=\"og:description\" content=\"Historical subscription guide comparing Checkout Mode (payUrl redirect) with the Front-End Component that shows Google Pay, Apple Pay, and cards in one container, plus launch requirements and dispute fees.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"HaiPay Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://doc.haipay.net/en/history/V20260628/api/version2/Subscription\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://www.haipay.net/og-default.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=\"Subscription (Legacy navigation V20260628) - HaiPay\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Historical subscription guide comparing Checkout Mode (payUrl redirect) with the Front-End Component that shows Google Pay, Apple Pay, and cards in one container, plus launch requirements and dispute fees.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://www.haipay.net/og-default.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/haipay-3385f6e8/zF8MnpYOAB0QG9P5/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"HaiPay\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5F3CC7\">\u003clink data-mint-head rel=\"canonical\" href=\"https://doc.haipay.net/en/history/V20260628/api/version2/Subscription\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/history/V20260628/api/version2/Subscription.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://doc.haipay.net/en/history/V20260628/api/version2/Subscription\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://doc.haipay.net/zh/history/V20260628/api/version2/Subscription\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://doc.haipay.net/zh/history/V20260628/api/version2/Subscription\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://doc.haipay.net/#organization\",\"name\":\"HaiPay\",\"url\":\"https://doc.haipay.net\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/haipay-3385f6e8/Fh2duvg55RQO2xS-/images/logo/light.png?fit=max\u0026auto=format\u0026n=Fh2duvg55RQO2xS-\u0026q=85\u0026s=573f6622ee2aed0dbd22a52f7f1f3a5c\"}},{\"@type\":\"WebSite\",\"@id\":\"https://doc.haipay.net#website\",\"name\":\"HaiPay\",\"url\":\"https://doc.haipay.net\",\"publisher\":{\"@id\":\"https://doc.haipay.net/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://doc.haipay.net/en/history/V20260628/api/version2/Subscription#webpage\",\"url\":\"https://doc.haipay.net/en/history/V20260628/api/version2/Subscription\",\"name\":\"Subscription (Legacy navigation V20260628)\",\"description\":\"Historical subscription guide comparing Checkout Mode (payUrl redirect) with the Front-End Component that shows Google Pay, Apple Pay, and cards in one container, plus launch requirements and dispute fees.\",\"dateModified\":\"2026-10-29T11:11:35.000Z\",\"isPartOf\":{\"@id\":\"https://doc.haipay.net#website\"},\"breadcrumb\":{\"@id\":\"https://doc.haipay.net/en/history/V20260628/api/version2/Subscription#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://doc.haipay.net/en/history/V20260628/api/version2/Subscription#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Global Payment\",\"item\":\"https://doc.haipay.net/en/history/V20260628/api/version2/GlobalCashier\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Subscription (Legacy navigation V20260628)\",\"item\":\"https://doc.haipay.net/en/history/V20260628/api/version2/Subscription\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://doc.haipay.net/en/history/V20260628/api/version2/Subscription#article\",\"headline\":\"Subscription (Legacy navigation V20260628)\",\"name\":\"Subscription (Legacy navigation V20260628)\",\"description\":\"Historical subscription guide comparing Checkout Mode (payUrl redirect) with the Front-End Component that shows Google Pay, Apple Pay, and cards in one container, plus launch requirements and dispute fees.\",\"url\":\"https://doc.haipay.net/en/history/V20260628/api/version2/Subscription\",\"mainEntityOfPage\":{\"@id\":\"https://doc.haipay.net/en/history/V20260628/api/version2/Subscription#webpage\"},\"image\":\"https://www.haipay.net/og-default.png\",\"dateModified\":\"2026-10-29T11:11:35.000Z\",\"keywords\":\"HaiPay, subscription, credit card subscription, Subscription, API\",\"publisher\":{\"@id\":\"https://doc.haipay.net/#organization\"},\"isPartOf\":{\"@id\":\"https://doc.haipay.net#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"HaiPay\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"HaiPay","nav":{"global":null,"languages":[{"language":"zh","pages":[{"title":"zh","href":"/zh/history/V20260628/api/version2/Subscription"}]},{"language":"en","versions":[{"version":"V20261001","default":true,"tag":"Latest","pages":[{"title":"V20261001","href":"/en/overview"}]},{"version":"V20260801","pages":[{"title":"V20260801","href":"/en/history/V20260801/payments/cashier"}]},{"version":"V20260701","pages":[{"title":"V20260701","href":"/en/history/V20260701/payments/cashier"}]},{"version":"V20260628","tabs":[{"tab":"Documentation Center","groups":[{"group":"Quick start","pages":[{"title":"Merchant Integration Overview","sidebarTitle":"Guide","href":"/en/history/V20260628/overview"}]},{"group":"Merchant Guide","pages":[{"title":"Merchant Integration Process","sidebarTitle":"Integration Process","href":"/en/history/V20260628/get-started/integration-process"},{"title":"Configuration and Signature Guide (Legacy navigation V20260628)","sidebarTitle":"Config \u0026 Signature","href":"/en/history/V20260628/guide/config_settings_and_signature_rules_guide"},{"title":"Payment Integration Steps","sidebarTitle":"Integration Steps","href":"/en/history/V20260628/get-started/integration-steps"},{"title":"API Conventions and Common Rules","sidebarTitle":"API Description","href":"/en/history/V20260628/get-started/api-conventions"},{"title":"Payment Documentation Index","sidebarTitle":"API Documentation","href":"/en/history/V20260628/get-started/documentation-map"},{"title":"End-to-End Testing Guide","sidebarTitle":"End-to-End Testing","href":"/en/history/V20260628/testing/end-to-end"},{"title":"Onboarding Checklist","sidebarTitle":"Onboarding Checklist","href":"/en/history/V20260628/testing/go-live-checklist"},{"title":"Connect AI via MCP","sidebarTitle":"Connect to HaiPay MCP","href":"/en/history/V20260628/resources/ai/connect-ai-via-mcp"},{"title":"AI Integration Skills","sidebarTitle":"AI Skills for HaiPay Integration","href":"/en/history/V20260628/resources/ai/haipay-skills"}]},{"group":"Common Payment","pages":[{"title":"Common API (Legacy navigation V20260628)","sidebarTitle":"Common API","href":"/en/history/V20260628/api/version2/CommonApi"},{"title":"Get Merchant Payment Config","href":"/en/history/V20260628/operations/merchant-payment-config"},{"title":"Payout Voucher PDF/ZIP API","href":"/en/history/V20260628/operations/voucher-pdf"}]},{"group":"Global Payment","pages":[{"group":"Global Cashier","pages":[{"title":"Global Cashier (Legacy navigation V20260628)","sidebarTitle":"Global Cashier","href":"/en/history/V20260628/api/version2/GlobalCashier"}]},{"group":"Credit Card","pages":[{"title":"Front-End Component","href":"/en/history/V20260628/payments/cards/payment-element"},{"title":"Checkout Mode (Legacy navigation V20260628)","sidebarTitle":"Checkout Mode","href":"/en/history/V20260628/api/version2/payment-link"},{"title":"International Credit Card (Legacy navigation V20260628)","sidebarTitle":"International Credit Card","href":"/en/history/V20260628/api/version2/creditcard"},{"title":"Google Pay (Legacy navigation V20260628)","sidebarTitle":"Google Pay","href":"/en/history/V20260628/api/version2/GooglePay"},{"title":"Apple Pay (Legacy navigation V20260628)","sidebarTitle":"Apple Pay","href":"/en/history/V20260628/api/version2/ApplePay"},{"title":"Merchant-Initiated Transactions (MIT)","description":"Understand MIT (Merchant Initiated Transaction) mode, including flowchart, collection API, query and refund endpoints.","sidebarTitle":"MIT","href":"/en/history/V20260628/payments/cards/merchant-initiated-transactions"}]},{"group":"Subscription","pages":[{"title":"Subscription (Legacy navigation V20260628)","sidebarTitle":"Subscription","href":"/en/history/V20260628/api/version2/Subscription"},{"title":"Subscription Payment Flowchart","sidebarTitle":"Subscription Flow","description":"Understand the full subscription lifecycle with clearer stage-based guidance for subscription creation, recurring deductions, cancellation, and retry logic.","href":"/en/history/V20260628/payments/subscriptions/workflow"}]},{"group":"North America","pages":[{"title":"United States","hidden":true,"href":"/en/history/V20260628/api/version2/USD"},{"title":"Mexico (Legacy navigation V20260628)","sidebarTitle":"Mexico","href":"/en/history/V20260628/api/version2/Mexico"}]},{"group":"South America","pages":[{"title":"Brazil (Legacy navigation V20260628)","sidebarTitle":"Brazil","href":"/en/history/V20260628/api/version2/Brazil"}]},{"group":"Europe","pages":[{"title":"Turkey (Legacy navigation V20260628)","sidebarTitle":"Turkey","href":"/en/history/V20260628/api/version2/Turkey"}]},{"group":"Asia","pages":[{"title":"Hong Kong (Legacy navigation V20260628)","sidebarTitle":"Hong Kong","href":"/en/history/V20260628/api/version2/HongKong"},{"title":"Singapore (Legacy navigation V20260628)","sidebarTitle":"Singapore","href":"/en/history/V20260628/api/version2/Singapore"},{"title":"Taiwan (Legacy navigation V20260628)","sidebarTitle":"Taiwan","href":"/en/history/V20260628/api/version2/Taiwan"},{"title":"Japan (Legacy navigation V20260628)","sidebarTitle":"Japan","href":"/en/history/V20260628/api/version2/Japan"},{"title":"South Korea (Legacy navigation V20260628)","sidebarTitle":"South Korea","href":"/en/history/V20260628/api/version2/SouthKorea"},{"title":"Philippines (Legacy navigation V20260628)","sidebarTitle":"Philippines","href":"/en/history/V20260628/api/version2/Philippines"},{"title":"Thailand (Legacy navigation V20260628)","sidebarTitle":"Thailand","href":"/en/history/V20260628/api/version2/Thailand"},{"title":"Vietnam (Legacy navigation V20260628)","sidebarTitle":"Vietnam","href":"/en/history/V20260628/api/version2/Vietnam"},{"title":"Indonesia (Legacy navigation V20260628)","sidebarTitle":"Indonesia","href":"/en/history/V20260628/api/version2/Indonesia"},{"title":"Malaysia (Legacy navigation V20260628)","sidebarTitle":"Malaysia","href":"/en/history/V20260628/api/version2/Malaysia"},{"title":"Pakistan (Legacy navigation V20260628)","sidebarTitle":"Pakistan","href":"/en/history/V20260628/api/version2/Pakistan"},{"title":"Bangladesh (Legacy navigation V20260628)","sidebarTitle":"Bangladesh","href":"/en/history/V20260628/api/version2/Bangladesh"},{"title":"India (Legacy navigation V20260628)","sidebarTitle":"India","href":"/en/history/V20260628/api/version2/India"}]},{"group":"Middle East","pages":[{"title":null,"href":"/en/history/V20260628/api/version2/Egypt"},{"title":"Saudi Arabia (Legacy navigation V20260628)","sidebarTitle":"Saudi Arabia","href":"/en/history/V20260628/api/version2/SaudiArabia"},{"title":"Kuwait (Legacy navigation V20260628)","sidebarTitle":"Kuwait","href":"/en/history/V20260628/api/version2/Kuwait"},{"title":"Bahrain (Legacy navigation V20260628)","sidebarTitle":"Bahrain","href":"/en/history/V20260628/api/version2/Bahrain"},{"title":"UAE (Legacy navigation V20260628)","sidebarTitle":"UAE","href":"/en/history/V20260628/api/version2/UAE"},{"title":"Oman (Legacy navigation V20260628)","sidebarTitle":"Oman","href":"/en/history/V20260628/api/version2/Oman"},{"title":"Qatar (Legacy navigation V20260628)","sidebarTitle":"Qatar","href":"/en/history/V20260628/api/version2/Qatar"}]},{"group":"Africa","pages":[{"title":"Nigeria Payment API","href":"/en/history/V20260628/payments/local/nigeria"}]},{"group":"Crypto","hidden":true,"pages":[{"title":"Stablecoin","href":"/en/history/V20260628/api/version2/coinpay"},{"title":"Stablecoin Payment (Fixed Address) API","href":"/en/history/V20260628/api/version2/coinpay-fixed_address"}]}]},{"group":"Unified API","pages":[{"title":"Payment API","href":"/en/history/V20260628/payments/unified-api"}]},{"group":"Appendix","pages":[{"title":"Unsupported Regions List (Legacy navigation V20260628)","sidebarTitle":"Unsupported Regions","href":"/en/history/V20260628/api/version2/restricted-regions"},{"title":"Test Card Numbers","sidebarTitle":"Test Cards","href":"/en/history/V20260628/testing/test-cards"},{"title":"Collection Payment Methods List","href":"/en/history/V20260628/resources/cashin-code-list"},{"title":"Disbursement Payment Methods List","href":"/en/history/V20260628/resources/cashout-code-list"},{"title":"Error Response Reference (Legacy navigation V20260628)","sidebarTitle":"Error Response","href":"/en/history/V20260628/guide/error_response_appendix"}]},{"group":"Merchant FAQ","pages":[{"title":"Frequently Asked Questions and Troubleshooting","sidebarTitle":"Frequently Asked Questions","href":"/en/history/V20260628/resources/faq"}]}]},{"tab":"API","pages":[{"title":"API","href":"/en/history/V20260628/api-reference/overview"}]},{"tab":"Update log","pages":[{"title":"Update log","href":"/en/history/V20260628/changelog"}]}]},{"version":"V20260623","pages":[{"title":"V20260623","href":"/en/history/V20260623/api/version2/Subscription"}]}]}]},"title":"Subscription (Legacy navigation V20260628) - HaiPay","buildId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","deploymentId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","dynamics":[],"chunks":[]}