# 托管支付

## 本模式适用于：

&#x20;               **\*需要开箱即用，以及快速上线的商户；提供了托管支付页面，简化商家对接流程**

## 概述:

&#x20;      托管支付是无缝集成 AsiaBill 最快的方式。通过一次集成，可以在收银台页面提供AsiaBill所有支持的支付方式。收银台支持12种国际主流语言版本，可根据消费者浏览器语言自动切换。

&#x20;      商户可以通过 <mark style="color:red;">整页重定向</mark> 展示托管的支付页面；

<div align="center"><img src="/files/EEfFxw93kIAIMQRuAV4c" alt="checkout 页面"></div>

### 流程图

<div align="left"><img src="/files/PS3JWmtcEG2CmIqZB72Y" alt=""></div>

## 对接流程:&#x20;

### 1.获取跳转支付页面URL

&#x20;     商户服务端调用 [Checkout payment](https://asiabill.gitbook.io/api-explorer/api-reference/jiao-yi/checkout-payment) 接口，获取跳转支付页面的URL

{% hint style="info" %}
建议商户通过服务端调用 **Checkout payment** 接口获取<mark style="background-color:blue;">跳转支付页面的URL</mark>，避免 **signkey** 等信息暴露在浏览器客户端，或者币种、金额在客户端被修改。
{% endhint %}

### 2.验证签名

接口响应head中会携带签名信息，商家需要判断签名正确性。根据 [数据签名过程](https://asiabill.gitbook.io/api-explorer/fu-lu/shu-ju-qian-ming-guo-cheng) 验证返回信息的正确性

### 3.前端页面跳转支付页面

获取返回信息中 <mark style="color:red;">redirectUrl</mark> 跳转到支付页面，持卡人选择支付方式，并填写卡信息完成支付

### 4.处理支付结果跳转

交易完成后，支付结果将跳转到 returnUrl ，对跳转结果进行签名验证，请参阅 [支付结果跳转](https://asiabill.gitbook.io/api-explorer/webhook/zhi-fu-jie-guo-tiao-zhuan)&#x20;

### 5.webhook 通知处理

在订单完成后，AsiaBill系统会触发webhook，调用商户交易时给定的callbackUrl，来通知商户交易结果状态，详情请参阅 [webhook](https://asiabill.gitbook.io/api-explorer/webhook/gai-shu)

## 支持的国际语言

| 国家       | 语言代码   |
| -------- | ------ |
| 德语       | de\_DE |
| 英语（美国）   | en\_US |
| 西班牙语     | es\_ES |
| 法语       | fr\_FR |
| 意⼤利语     | it\_IT |
| ⽇语       | ja\_JP |
| 韩语       | ko\_KR |
| 葡萄牙语（巴西） | pt\_BR |
| 葡萄牙语     | pt\_PT |
| 俄语       | ru\_RU |
| 中文（简体）   | zh\_CN |
| 中文（繁体）   | zh\_TW |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://asiabill.gitbook.io/docs/zhi-fu/zai-xian-zhi-fu/tuo-guan-zhi-fu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
