> For the complete documentation index, see [llms.txt](https://docs.jgopay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jgopay.com/jian-ti-zhong-wen/zh-cn.md).

# 概览

> **版本：** 1.6.0\
> **最后更新：** 2026 年 7 月

> 🇬🇧 [English Version](/english/readme.md)

| 环境   | 基础 URL                               |
| ---- | ------------------------------------ |
| 生产环境 | `https://api.pays3bucket.com/api/v1` |

> 测试环境的凭据和接入地址请向您的客户经理索取。

## 支持的货币

| 货币      | 地区   | 充值（代收）                 | 提现（代付） | 网关行为         |
| ------- | ---- | ---------------------- | ------ | ------------ |
| **MYR** | 马来西亚 | DuitNow QR / FPX / TNG | 银行转账   | 跳转（Redirect） |

## 对接流程

### 充值（代收）

```
1. 身份认证     →  POST /auth/token
2. 创建支付     →  POST /payment/request
3. 处理响应     →  引导客户跳转
4. 接收回调     →  支付状态通知
```

### 提现（代付）

```
1. 身份认证     →  POST /auth/token
2. 创建提现     →  POST /payment/withdraw
3. 接收回调     →  提现结果通知
```

## 快速开始

1. **获取凭据** — 您的客户经理会提供 `merchant_id` 和 `api_key`
2. **身份认证** — 用凭据换取访问令牌（[身份认证](/jian-ti-zhong-wen/authentication.md)）
3. **创建支付** — 调用支付接口（[创建支付](/jian-ti-zhong-wen/create-payment.md)）
4. **处理响应** — 引导客户跳转到网关页面（[支付方式](/jian-ti-zhong-wen/payment-methods.md)）
5. **创建提现** — 调用提现接口（[创建提现](/jian-ti-zhong-wen/create-withdrawal.md)）
6. **接收回调** — 支付或提现完成时收到通知（[回调通知](/jian-ti-zhong-wen/webhooks.md)）

## 对接模式

在请求中传入 `payment_method`，您将收到网关数据并自行处理跳转。

```
商户   → POST /payment/request（携带 payment_method）
       ↓
JGoPay → 返回网关数据
       ↓
商户   → 引导客户跳转到网关页面
       ↓
JGoPay → 完成后发送回调通知
```

## 请求频率限制

API 接口按商户维度限制请求频率。超出限制将返回 HTTP `429 Too Many Requests`。

| 接口                       | 限制       |
| ------------------------ | -------- |
| `POST /payment/request`  | 100 次/分钟 |
| `POST /payment/withdraw` | 50 次/分钟  |
| 其他接口                     | 100 次/分钟 |

## 安全要求

* 所有 API 请求**必须使用 HTTPS**（`https://`）。HTTP 请求会被拒绝。
* 生产环境中 `callback_url` 和 `redirect_url` **必须使用 HTTPS**，HTTP 地址会被拒绝。
* 切勿通过未加密的连接传输 API 密钥、访问令牌或任何凭据。
* 凭据的存储与轮换指引见[身份认证](/jian-ti-zhong-wen/authentication.md)。


---

# 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.jgopay.com/jian-ti-zhong-wen/zh-cn.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.
