> For the complete documentation index, see [llms.txt](https://docs.coda.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coda.co/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/zhi-fu-ye-mian-api-ji-cheng/shang-jia-jie-ru-zhi-fu-liu-cheng.md).

# 商家接入支付流程

### 步骤1. 商家向 Coda 发起 init 请求

{% hint style="warning" %}
**📘具体支付页面 API 请求体参数和响应体参数，请以**[**英文版为准**](https://coda-payments.gitbook.io/coda-private-technical-documentation/codapay/hosted-payment-page-integration/initiate-a-payment-request)
{% endhint %}

{% hint style="danger" %}
❗️**需特别注意的参数**

* `item > names` (物品名称)：必填且需为英文字符。
* `profile > user_id` (用户 ID)：必填。
  {% endhint %}

{% hint style="info" %}
📘 **resultCode=0**

Coda返回此参数代表订单发起成功，其他返回值参看 REFERENCES -> [Error codes](/codapay/error-codes.md).
{% endhint %}

## 请求时，常见错误代码

<table data-full-width="false"><thead><tr><th width="129.5">错误代码</th><th>说明</th></tr></thead><tbody><tr><td>103</td><td>请求参数错误，请联系Coda技术</td></tr><tr><td>205</td><td>这个是后台账号没有启动， 需要Coda 技术来帮你激动。<br><br>通常这个错误会在测试环境完成后，转换成正式时拿到。</td></tr><tr><td>225</td><td>这个是具体渠道在后台还没激活。<br><br>a.通知Coda技术来协助你开，<br>b.或则是法务批注了但是商家还没去Coda后台激活渠道。<br>c.如果是新商家，请确保合同走完了</td></tr><tr><td>227</td><td>价位不支持， 需要确保请求价格符合渠道限制。<br><br>References -> Price Point</td></tr><tr><td>233</td><td>当你请求paytype=0 时，拿到这个错误是因为账号配置问题。<br><br>请通知Coda技术做后台配置。</td></tr><tr><td>237</td><td>请求参数缺少UserID</td></tr><tr><td>238</td><td>这个常见原因以下：<br><br>a.正式环境请求时里没加 user_id<br>b. 沙盒环境请求美金参数已包含user_id。<br>c. 请通知Coda技术， 沙盒环境问题，需要重新启动</td></tr></tbody></table>

***

## 步骤2. 使用 txnId 拉起 Coda 收银台

{% hint style="info" %}
**📘如何拉起Coda收银台，请以**[**英文版为准**](https://coda-payments.gitbook.io/coda-private-technical-documentation/codapay/hosted-payment-page-integration/display-the-hosted-payment-page)
{% endhint %}

***

## 步骤3. 用户在支付页面付款

用户通过 Coda 支付页面完成付款。更多细节请参考 Coda [测试文档](https://coda-payments.gitbook.io/coda-private-technical-documentation/codapay/integration-guides/testing-guide/payment-channel-testing-instructions)，或联系 Coda 技术支持。

***

## 步骤4. ⽤户⽀付成功后，Coda发送回调通知。

Coda 在用户支付成功后向商户发送回调，格式参照接⼊[文档 ](https://coda-payments.gitbook.io/coda-private-technical-documentation/codapay/hosted-payment-page-integration/get-notified-of-a-transaction-status-change)

{% hint style="warning" %}
🚧 <mark style="color:orange;">**Coda回调IP地址如下，商家需加入服务器白名单:**</mark>

54.251.135.133\
3.111.59.175\
3.110.250.201\
65.1.187.239\
54.193.247.199\
18.198.204.13\
3.121.251.156\
3.67.31.16\
52.76.150.186\
18.140.224.133 \
13.213.84.158 \
13.228.141.160 \
54.151.121.97 \
54.219.48.129
{% endhint %}

## ❗️**商家回调响应要求**

{% hint style="danger" %}
❗️<mark style="color:red;">**商户回复Coda回调参数仅限于“ResultCode=0”，不接受其他的字符。**</mark>

商家仅需回复 `"ResultCode=0"`，其他字符无效。如果回调失败，Coda 系统会每 5 分钟重试一次，总计 3 次。三次失败后将通过邮件通知商户。
{% endhint %}

***

## 步骤5. 商家收到回调后发货

商家在收到 Coda 回调后为用户发货，并在用户关闭支付页面后跳转至商家配置的重定向页面。在重定向页面显示充值成功信息并完成发货操作，情参考[文档 ](https://coda-payments.gitbook.io/coda-private-technical-documentation/codapay/hosted-payment-page-integration/redirect-urls-for-transaction-status)。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.coda.co/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/zhi-fu-ye-mian-api-ji-cheng/shang-jia-jie-ru-zhi-fu-liu-cheng.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
