> 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/direct-card-api-ji-cheng/ru-men-zhi-nan/shen-fen-yan-zheng-he-shou-quan.md).

# 身份验证和授权

### 身份验证指南 <a href="#authentication-guide" id="authentication-guide"></a>

Direct Card API 支持 JWT 和 x-signature 作为主要身份验证机制。要向我们的系统发送请求，您需要进行身份验证。为此，您需要在 API 请求的标头中包含以下字段：

* 内容类型
* X-API密钥
* 授权

X签名用于通知端点。有关更多详细信息，请[参阅“获取交易状态更改通知” 。](https://docs.coda.co/codapay/hosted-payment-page-integration/get-notified-of-a-transaction-status-change)

这些参数的描述如下表所示：

| 参数名称    | 描述                             | 必需的 | 验证/示例                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------- | ------------------------------ | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 内容类型    | 指示资源的原始媒体类型                    | 是   | 该值必须为“application/json”。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| X-API密钥 | 您的 API 密钥                      | 是   | X-API密钥：9ezEvY3UZv72ouqeLnzeL45ylrbPdZ5C6Y3e2c1H                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| 授权      | 根据标头、有效负载和签名生成 JSON Web Token。 | 是   | <p>授权：</p><p>持有人</p><p>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9。</p><p>eyJhcGlLZXkiOiIzOWFhNmI5ZDhjNGZmYjFhOT</p><p>QwM2I1MTQ2OWVmZDQ3ZSIsIm9yZGVySWQi</p><p>OiIyMDIwMDMzMDE0MjYwMCIsImxhbmciOiJlb</p><p>iIsIm1lcmNoYW50TmFtZSI6Iktva28gZUJvb2tzIiwi</p><p>cGF5VHlwZSI6NSwicGF5Q2hhbm5lbCI6MzMyLC</p><p>JwYXlQcm92aWRlciI6NTA2LCJpdGVtcyI6W3siY2</p><p>9kZSI6IjEiLCJuYW1lIjoiT25lIERheSIsInByaWNlIjoxM</p><p>H1dLCJpYXQiOjE1ODU3MDE3MzMsImNoZWNrc</p><p>3VtIjoiZjQwZmM5ZTc0ZDY2MmRhZmY1MDc0MD</p><p>NiZmM3YmEyOGUifQ.1vnmI6ayPNMHV9FNyx1</p> |
| x签名     | 要执行完整性检查，需要校验和的签名值。            | 是   | pOsnb4LGor0/iOPsc/7ufSiQHslKkV6/iJ6c6tEpP3k=                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

<br>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.coda.co/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/hou-duan-api-ji-cheng/direct-card-api-ji-cheng/ru-men-zhi-nan/shen-fen-yan-zheng-he-shou-quan.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
