{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/zh-Hans/payments/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition","tabs","tab"]},"type":"markdown"},"seo":{"title":"AlipayHK","description":"Learn how to Integration with PayKKa APIs","siteUrl":"https://docs.paykka.com","image":"/assets/logo.df495cc5e94d9633069f202c90e3a52a9aaff809e494405ba215cb8339e0714e.db81178d.png","keywords":"paykka, docs, doc, documentation, apis, api, portal","lang":"en-US"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"alipayhk","__idx":0},"children":["AlipayHK"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"介绍","__idx":1},"children":["介绍"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["AlipayHK 是蚂蚁集团面向香港市场运营的移动支付平台。用户通过 AlipayHK App 扫描二维码或在 AlipayHK App 内确认订单即可完成支付，为香港用户提供熟悉、可信的支付体验。"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"40%","data-label":"属性"},"children":["属性"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"支持情况"},"children":["支持情况"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["支付模式"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["钱包"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["接入产品"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["API-Only，收银台，PaymentLink，Billing"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["支持币种"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["HKD, EUR, CZK, HUF"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["支付流程"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["重定向/二维码"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["自动扣款"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["授权"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["请款"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["部分请款"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["撤销"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["部分撤销"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["退款"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["部分退款"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["拒付争议"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["循环订阅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3DS"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["它具备以下优势："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["在香港广泛采用，覆盖习惯使用 AlipayHK 的用户"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["支付体验快速，用户只需扫码或在 AlipayHK App 内确认订单"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["安全可靠，交易由 Alipay 风控体系保障"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["支持线上与线下支付"]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["微信内置浏览器不支持 AlipayHK 支付。如果您的收银台页面可能在微信内打开，请引导用户使用其他浏览器。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"接入方式","__idx":2},"children":["接入方式"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["PayKKa 提供多种接入 AlipayHK 的方式，您可以根据需求选择合适的方式。"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"接入方式"},"children":["接入方式"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"接口"},"children":["接口"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"适用场景"},"children":["适用场景"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Web 收银台"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/apis/payments/openapi/收银台/session-opl_1"},"children":["Create Session"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["使用 PayKKa 托管收银台完成支付"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["组件集成"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/apis/payments/openapi/收银台/session-opl_1"},"children":["Create Session"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["在商户页面加载原有支付组件"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"开始前准备","__idx":3},"children":["开始前准备"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["获取您的交易密钥。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["确认商户已开通 AlipayHK，支付币种使用能力表中列出的 HKD, EUR, CZK, HUF。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["配置支付结果 Webhook，准备服务端交易查询，并在需要浏览器返回时配置返回地址。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["为每笔交易准备唯一的 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["trans_id"]},"，并保存接口返回的订单标识。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["浏览器返回或取得支付凭证不代表交易成功；最终结果通过交易查询或 Webhook 确认。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"web-收银台","__idx":4},"children":["Web 收银台"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"创建收银台","__idx":5},"children":["创建收银台"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["如果您使用 PayKKa 的托管收银台页面接入 AlipayHK，您只需在商户入驻过程中接受 AlipayHK 作为支付方式，PayKKa 将在后台处理所有与 AlipayHK 的交易。这种集成方案最为便捷。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["调用接口 ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/apis/payments/openapi/收银台/session-opl_1"},"children":["Create Session"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"merchant_id\": \"YOUR_MERCHANT_ID\",\n  \"payment_type\": \"PURCHASE\",\n  \"trans_id\": \"t202311081113\",\n  \"currency\": \"HKD\",\n  \"amount\": 1000,\n  \"session_mode\": \"HOSTED\",\n  \"display_merchant_name\": \"PayKKa Merchant\",\n  \"display_locale\": \"zh-HK\",\n  \"allowed_payment_methods\": [\n    \"ALIPAY_HK\"\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["响应示例："]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"ret_code\": \"000000\",\n  \"ret_msg\": \"Success\",\n  \"data\": {\n    \"merchant_id\": \"YOUR_MERCHANT_ID\",\n    \"trans_id\": \"t202311081113\",\n    \"session_id\": \"CS_order_id\",\n    \"session_mode\": \"HOSTED\",\n    \"status\": \"PROCESSING\",\n    \"currency\": \"HKD\",\n    \"amount\": \"1000\",\n    \"session_url\": \"https://checkout.aq.paykka.com/hp/pay/CS_order_id\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["其中 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session_mode"]}," 字段值指定为 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HOSTED"]},"，",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowed_payment_methods"]}," 允许 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ALIPAY_HK"]},"。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["创建收银台后："]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["保存 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session_id"]},"，将付款人引导至响应中的 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session_url"]},"。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["由付款人在收银台按照 AlipayHK 的页面指引完成支付。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["付款人返回后，通过交易查询或 Webhook 确认订单结果。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["收银台使用 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowed_payment_methods"]}," 选择支付方式；直接交易请求使用 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment.payment_method"]},"，两类接口的字段分别按各自文档上送。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"组件集成","__idx":6},"children":["组件集成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["组件是一种模块化支付集成方式，开发者可以根据需要自由灵活地选择组合不同的支付组件。您可以通过这种方式在支付页面中添加 AlipayHK 支付元素。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["引入 PayKKa Checkout UI Component 库"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["具体使用步骤，请参考 ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/docs/developer-resources/checkout-ui-component"},"children":["PayKKa Checkout UI Component 使用文档 - PayKKa 支付文档"]},"，AlipayHK 组件请参考 ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/docs/developer-resources/alipay-hk-component"},"children":["AlipayHK 组件"]},"。"]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["调用接口 ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/apis/payments/openapi/收银台/session-opl_1"},"children":["Create Session"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"merchant_id\": \"YOUR_MERCHANT_ID\",\n  \"payment_type\": \"PURCHASE\",\n  \"trans_id\": \"t202311081113\",\n  \"currency\": \"HKD\",\n  \"amount\": 1000,\n  \"session_mode\": \"HOSTED\",\n  \"display_merchant_name\": \"PayKKa Merchant\",\n  \"display_locale\": \"zh-HK\",\n  \"allowed_payment_methods\": [\n    \"ALIPAY_HK\"\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["创建会话后，使用返回的 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session_id"]}," 按 ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/docs/developer-resources/alipay-hk-component"},"children":["AlipayHK 组件"]}," 和 ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/docs/developer-resources/checkout-ui-component"},"children":["Checkout UI 组件"]}," 文档初始化并挂载组件。处理组件提交、成功和失败回调后，仍应由服务端查询或 Webhook 确认最终订单状态。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"收银台查询","__idx":7},"children":["收银台查询"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["查询收银台状态，通过收银台ID(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session_id"]},")查询"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求示例："]}," ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/apis/payments/openapi/收银台/session-query-opl_2"},"children":["Query Session"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"merchant_id\": \"YOUR_MERCHANT_ID\",\n  \"trans_id\": \"m3246749195217\",  # trans_id/session_id二选一\n  \"session_id\": \"CS_order_id\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["响应示例："]}]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"处理中","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"ret_code\": \"000000\",\n  \"ret_msg\": \"Success\",\n  \"data\": {\n    \"merchant_id\": \"YOUR_MERCHANT_ID\",\n    \"trans_id\": \"m3246749195217\",\n    \"session_id\": \"CS_order_id\",\n    \"session_mode\": \"HOSTED\",\n    \"status\": \"PROCESSING\",\n    \"amount\": \"1000\",\n    \"currency\": \"HKD\",\n    \"expire_time\": \"2025-05-05T17:17:24+08:00\",\n    \"session_url\": \"https://checkout.aq.paykka.com/hp/pay/CS_order_id\"\n  }\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"成功","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"ret_code\": \"000000\",\n  \"ret_msg\": \"Success\",\n  \"data\": {\n    \"merchant_id\": \"YOUR_MERCHANT_ID\",\n    \"trans_id\": \"m3246749195217\",\n    \"session_id\": \"CS_order_id\",\n    \"session_mode\": \"HOSTED\",\n    \"status\": \"SUCCESS\",  # 收银台状态\n    \"order_status\": \"SUCCESS\",  # 交易状态\n    \"error_code\": \"0000\", # 交易错误码\n    \"error_description\": \"request success\",\n    \"order_id\": \"GW_order_id\", # 交易订单号\n    \"amount\": \"1000\",\n    \"currency\": \"HKD\",\n    \"expire_time\": \"2025-05-05T17:17:24+08:00\",\n    \"session_url\": \"https://checkout.aq.paykka.com/hp/pay/CS_order_id\"\n  }\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"过期","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"用户未在过期前发起支付\n{\n  \"ret_code\": \"000000\",\n  \"ret_msg\": \"Success\",\n  \"data\": {\n    \"merchant_id\": \"YOUR_MERCHANT_ID\",\n    \"trans_id\": \"m3246749195217\",\n    \"session_id\": \"CS_order_id\",\n    \"session_mode\": \"HOSTED\",\n    \"status\": \"EXPIRED\",  # 收银台状态\n    \"amount\": \"1000\",\n    \"currency\": \"HKD\",\n    \"expire_time\": \"2025-05-05T17:17:24+08:00\"\n  }\n}\n\n支付失败\n{\n  \"ret_code\": \"000000\",\n  \"ret_msg\": \"Success\",\n  \"data\": {\n    \"merchant_id\": \"YOUR_MERCHANT_ID\",\n    \"trans_id\": \"m3246749195217\",\n    \"session_id\": \"CS_order_id\",\n    \"session_mode\": \"HOSTED\",\n    \"status\": \"EXPIRED\",  # 收银台状态\n    \"amount\": \"1000\",\n    \"currency\": \"HKD\",\n    \"order_status\": \"FAILURE\",  # 交易状态\n    \"error_code\": \"0000\", # 交易错误码\n    \"error_description\": \"request success\",\n    \"order_id\": \"GW_order_id\", # 交易订单号\n    \"expire_time\": \"2025-05-05T17:17:24+08:00\"\n  }\n}\n","lang":"json"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["收银台过期时，应先查询已经创建的交易；会话过期不能单独作为交易失败的依据。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"查询交易","__idx":8},"children":["查询交易"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["通过交易 ID(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_id"]},") 查询交易状态"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求示例："]}," ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/apis/payments/openapi/交易/payments-query-opl_1"},"children":["Query Transaction"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"merchant_id\": \"YOUR_MERCHANT_ID\",\n  \"trans_id\": \"m3246749195217\",    # session_id/order_id/trans_id 三选一\n  \"session_id\": \"CS_order_id\",\n  \"order_id\": \"GW_order_id\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["响应示例："]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"ret_code\": \"000000\",\n  \"ret_msg\": \"Success\",\n  \"data\": {\n    \"merchant_id\": \"YOUR_MERCHANT_ID\",\n    \"trans_id\": \"m3246749195217\",\n    \"order_id\": \"GW_order_id\",\n    \"status\": \"SUCCESS\",\n    \"error_code\": \"0000\",\n    \"error_description\": \"request success\",\n    \"amount\": \"1000\",\n    \"currency\": \"HKD\",\n    \"pay_finish_time\": \"2025-05-05T17:17:24+08:00\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["商户处理查询结果时："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SUCCESS"]},"：确认订单支付成功，避免重复履约。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PROCESSING"]},"：保留处理中状态，不要仅因付款人退出页面就判定失败或重复发起支付。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FAILURE"]},"：按返回的 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error_code"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error_description"]}," 排查；需要再次支付时使用新的交易编号。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["接口调用成功与支付成功是两个层面的结果，应检查交易 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]},"。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"结果通知","__idx":9},"children":["结果通知"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["参考 ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/docs/developer-resources/webhook"},"children":["Webhook"]}," 接入异步通知，通知字段和事件类型以公共文档为准。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["按公共接入规范校验通知，并通过 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["trans_id"]}," 和 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_id"]}," 关联商户订单。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["根据 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["event_type"]}," 和 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}," 更新订单，对重复通知保持幂等，避免重复发货或记账。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["通知延迟、未收到或与本地状态不一致时，调用 ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/apis/payments/openapi/交易/payments-query-opl_1"},"children":["Query Transaction"]}," 复核。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["浏览器返回地址面向付款人展示结果，Webhook 面向商户服务端更新订单；前端跳转本身不能确认支付成功。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"退款限制","__idx":10},"children":["退款限制"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["本支付方式支持退款和部分退款。通过 ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/apis/payments/openapi/退款/refund-opl_1"},"children":["Create Refund"]}," 提交退款，并参考 ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/docs/payment-processing/refund"},"children":["退款"]}," 完成退款查询与结果处理。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["提交退款申请不等于退款成功，应确认退款订单的最终状态。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"错误码","__idx":11},"children":["错误码"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["参考 ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/docs/developer-resources/transaction-error-code"},"children":["交易错误码"]},"。排查问题时保留 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["trans_id"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_id"]},"（如已返回）、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error_code"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error_description"]},"、请求时间和环境，便于关联订单。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["请求超时或返回 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PROCESSING"]}," 时，先查询原交易的实际结果，再决定是否重试。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"相关文档","__idx":12},"children":["相关文档"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/apis/payments/openapi/收银台/session-opl_1"},"children":["Create Session"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/apis/payments/openapi/收银台/session-query-opl_2"},"children":["Query Session"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/apis/payments/openapi/交易/payments-opl_1"},"children":["Initiate Transaction"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/apis/payments/openapi/交易/payments-query-opl_1"},"children":["Query Transaction"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/docs/developer-resources/webhook"},"children":["Webhook"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/docs/developer-resources/transaction-error-code"},"children":["交易错误码"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/docs/transaction/web/api-only"},"children":["API Only"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/docs/developer-resources/alipay-component"},"children":["Alipay+ 组件"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/docs/developer-resources/checkout-ui-component"},"children":["Checkout UI 组件"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/docs/developer-resources/native-sdks/ios-sdk/introduction"},"children":["iOS SDK 介绍"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/docs/developer-resources/native-sdks/android-sdk/introduction"},"children":["Android SDK 介绍"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/docs/developer-resources/alipay-hk-component"},"children":["AlipayHK 组件"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh-hans/payments/docs/payment-processing/refund"},"children":["退款"]}]}]}]},"headings":[{"value":"AlipayHK","id":"alipayhk","depth":1},{"value":"介绍","id":"介绍","depth":2},{"value":"接入方式","id":"接入方式","depth":2},{"value":"开始前准备","id":"开始前准备","depth":3},{"value":"Web 收银台","id":"web-收银台","depth":2},{"value":"创建收银台","id":"创建收银台","depth":3},{"value":"组件集成","id":"组件集成","depth":3},{"value":"收银台查询","id":"收银台查询","depth":3},{"value":"查询交易","id":"查询交易","depth":3},{"value":"结果通知","id":"结果通知","depth":2},{"value":"退款限制","id":"退款限制","depth":2},{"value":"错误码","id":"错误码","depth":2},{"value":"相关文档","id":"相关文档","depth":2}],"frontmatter":{"seo":{"title":"AlipayHK"}},"lastModified":"2026-11-26T05:50:38.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/zh-hans/payments/docs/payment-method/alipay/alipay-hk","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}