> 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/hou-duan-api-ji-cheng/hou-duan-fei-ka-pian-api-ji-cheng.md).

# 后端非卡片API集成

通过此集成，您可以直接连接到 Codapay 的 API，以支持本地和其他支付方式（例如，电子钱包、银行转账）。通过直接调用 API，您可以将支付流程保留在您自己的应用程序或网站内，而 Codapay 则会在后台处理所有支付事宜。

首先，您需要：

* 使用您的 Codapay **API 密钥**，该密钥可唯一标识您的应用程序或平台。
* 向沙盒（测试）环境或生产（实际）环境的正确**端点 URL发送请求。**

以下各节提供了 API 密钥和端点 URL 所需的详细信息。

### API密钥 <a href="#api-keys" id="api-keys"></a>

**每个与合作伙伴集成的游戏或平台都会被分配一组唯一的 API 密钥。所有 Codapay API 密钥均可通过发行商门户**访问，路径为：**集成 → Codapay → API 密钥选项卡**

如果合作伙伴需要其他国家/地区的 API 密钥，则必须：

* 创建一个新的 Codapay 标题。 ***或者***
* 将新国家/地区添加到现有的 Codapay 标题中。

🔗**直接访问：** <https://portal.coda.co/#/integration/codapay/publisher-settings>

### 端点 URL <a href="#endpoint-urls" id="endpoint-urls"></a>

发布商与 Coda 集成的唯一方法是向以下 URL 发送 JSON 请求：

请参考我们的示例消息以获取示例。

#### 沙盒

| 版本                                                                                                                                                                                                   | 基本 URLText                                                   |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| v2.0                                                                                                                                                                                                 | <https://sandbox.codapayments.com/airtime/offline/charge/v3> |
| v1.0                                                                                                                                                                                                 | <p>\<a href="                                                |
| [https://sandbox.codapayments.com/airtime/offline/charge/v2">](https://sandbox.codapayments.com/airtime/offline/charge/v2">)<br><https://sandbox.codapayments.com/airtime/offline/charge/v2></a></p> |                                                              |

#### 生产 <a href="#production" id="production"></a>

| 版本   | 基本 URLText                                                                                                                                     |
| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| v2.0 | [https://airtime.codapayments.com/airtime/offline/charge/v3&#xD;](<https://airtime.codapayments.com/airtime/offline/charge/v3&#xD;&#xA;&#xA;>) |
| v1.0 | [https://airtime.codapayments.com/airtime/offline/charge/v2](<&#xA;https://airtime.codapayments.com/airtime/offline/charge/v2>)                |

<br>

{% hint style="info" %}
**请确保向 Codapay API 发送的请求必须通过以下方式发送：**

1. HTTPS
2. TLS 1.2 或更高版本
   {% endhint %}


---

# 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/hou-duan-api-ji-cheng/hou-duan-fei-ka-pian-api-ji-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.
