> 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/xun-huan-fu-kuan-ji-jiang-tui-chu/guan-jian-gai-nian.md).

# 关键概念

在集成循环支付产品之前，必须了解支付流程中涉及的核心实体。这些概念构成了我们 API 的基础，并在本文档中反复提及。\
付款方式：

* **顾客发起的交易**（CIT）：购物者在场并主动授权收费（例如，手动充值）。
* **商户发起的交易**(MIT)：商户自动处理收费（例如，每月订阅费）。

#### 购物者 （Shoppers） <a href="#shoppers" id="shoppers"></a>

购物者指的是使用已存储的支付方式进行交易的最终用户。在定期付款的场景下，购物者充当一个或多个已关联支付方式的根容器。

**购物者身份识别**

每个购物者都通过多个属性进行唯一识别，包括标识符、状态和已验证的账单信息。

```json
{
  "id": "shp_mcbis34tnsy8la6m19",
  "created_at": "2024-02-17T10:00:00Z",
  "finalized_at": "2024-02-17T10:30:00Z",
  "status_code": "enabled",
  "partner_shopper_id": "user001",
  "email": "user001@example.com",
  "phone_number": "+1234567890",
  "zip_code": "10001",
  "billing_first_name": "John",
  "billing_last_name": "Doe",
  "billing_document_type": "passport",
  "billing_document_id": "A12345678",
  "billing_country": "US",
  "billing_address": "123 Payment St.",
  "billing_region": "New York",
  "billing_city": "New York"
}
```

**重要性：**

* 数据检索：需要购物者 ID 来获取已存储的用于定期交易的支付方式。
* 灵活性：单个购物者可以在不同的服务提供商处保存多种支付方式。
* 资格：`status_code`确定购物者当前是否符合支付处理资格。
* 合规性：可能需要详细的账单信息以进行文件核实或满足地区监管要求。

#### 支付方式 （Payment Methods） <a href="#payment-methods" id="payment-methods"></a>

支付方式是指用于交易的特定金融工具（例如信用卡）。请注意，虽然我们的系统支持多种支付方式，但目前定期付款功能仅限于信用卡。

**支付方式识别**

每种方法都根据其类型及其对不同交易流程的具体支持进行识别。

```json
{
  "id": "pmt_mcbis34tnsy8la6m19",
  "created_at": "2024-02-17T10:00:00Z",
  "shopper_id": "shp_mcbis34tnsy8la6m19",
  "type": "card",
  "save_payment_method": true,
  "card": {
        "id": "crd_mcbis34tnsy8la6m19",
        "created_at": "2024-02-17T10:00:00Z",
        "country_code": "MX",
        "payment_method_id": "pmt_mcbis34tnsy8la6m19",
        "last_four": "1234",
        "first_six": "123456",
        "holder_name": "John Doe",
        "expiration_month": "12",
        "expiration_year": "2040"
    }
}
```

**重要性：**

* 支持多种支付方式：购物者可以将各种银行卡和电子钱包保存到个人资料中。每种支付方式都属于唯一的支付方式类型，例如`card`，`wallet`等等。
* 存储：该`save_payment_method`字段表示已安全存储以备将来使用的方法。


---

# 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/xun-huan-fu-kuan-ji-jiang-tui-chu/guan-jian-gai-nian.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.
