> 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.md).

# Direct Card API 集成

## 概述

本节提供关于 Coda Direct API 支付卡功能的全面指南，帮助您将支付卡处理能力无缝集成到应用程序中。

实现此 API 需要进行纯后端集成以处理卡片支付——客户不会被重定向到 Coda 的支付页面。

此选项适用于任何环境（网页或应用）的实施，允许合作伙伴在整个支付流程中保持自有品牌形象。

与采用 Coda 支付页面相比，后端集成方式在开发和维护上需要投入更多时间。

> 🚧 注意：如您的网站需收集持卡人卡号信息，必须通过 PCI-DSS 认证，方可使用 Direct Card API。

## API 密钥

请联系 Codapay 支持团队获取 API 密钥，以使用 Coda Direct API 的卡片功能。

## 接口 URL

商户集成 Coda Direct Card API 的唯一方式，是将请求发送到以下基础地址：

参考我们的示例以获取范例。

<table><thead><tr><th width="144.017333984375">环境</th><th>接口 URL</th></tr></thead><tbody><tr><td>沙盒环境</td><td><a href="https://tc-api-card-sandbox.codapayments.com/v1/">https://tc-api-card-sandbox.codapayments.com/v1/</a></td></tr><tr><td>正式环境</td><td><a href="https://api-tc.codapayments.com/v1/">https://api-tc.codapayments.com/v1/</a></td></tr></tbody></table>

{% hint style="warning" %}
🚧 请确保向 Codapay API 发送的所有请求均满足以下要求：

* 使用 HTTPS 协议
* TLS 1.2 或更高版本
* 请求头需包含 Authorization、API Key 和 Partner ID
  {% 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/direct-card-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.
