> 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/tokenization-api-2.0/shang-ye-yong-li.md).

# 商业用例

在以下所有情况下，我们建议您存储 Coda 信息，并将其与您自己的客户标识符关联：**Shopper ID**、**Payment Method ID**、**Token ID** 和 **Subscription ID**。

## 注册新 Shopper&#x20;

在注册新 Shopper 并首次生成 Token 时，您需要执行以下操作：

1. 使用您的客户 ID 创建一个新的 [Shopper](/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/ji-cheng-zhi-nan/shopper.md)。
2. 根据客户的支付选择[创建支付方式](/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/ji-cheng-zhi-nan/payment-method.md)（Payment Method）。
3. 为该支付方式生成一个 [Token](/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/ji-cheng-zhi-nan/token.md)。
4. [监控 Coda 发送的通知以验证 Token](/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/webhooks-tong-zhi/token-shou-quan-shi-jian-token.status.authorized.md)，合作伙伴可以配置 Subscription Notification URL 以接收通知。
5. 使用生成的 Token 对客户进行扣款（[Charge](/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/ji-cheng-zhi-nan/charge.md)）。

## 回访 Shopper和重复使用相同的支付方式

如果您的客户已经有一个 **Token** 关联到他们的账户，则只需使用该 **已生成的 Token** 发起扣款：

* **使用已生成的 Token 对客户进行扣款（**[**Charge**](/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/ji-cheng-zhi-nan/charge.md)**）**。

## **回访 Shopper 且支付 Token 过期**

如果现有 Shopper 需要重新生成 Token，请按照以下步骤操作：

1. 为客户的支付方式生成一个新的 [Token](/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/ji-cheng-zhi-nan/token.md)。
2. 监控 [Coda 发送的通知以验证 Token](/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/webhooks-tong-zhi/token-shou-quan-shi-jian-token.status.authorized.md)。
3. 使用新生成的 Token 对客户进行扣款（[Charge](/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/ji-cheng-zhi-nan/charge.md)）。

## **为现有客户的新支付方式生成 Token**

如果现有 Shopper 需要为 **新的支付方式** 生成 Token，请按照以下步骤操作：

1. 根据 Shopper 的支付选择（如 Go-Pay），使用已关联的 Shopper ID 创建一个新的支付方式（[Payment Method](/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/ji-cheng-zhi-nan/payment-method.md)）。
2. 为所选支付方式生成 [Token](/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/ji-cheng-zhi-nan/token.md)。
3. 监控 [Coda 发送的通知以验证 Token](/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/webhooks-tong-zhi/token-shou-quan-shi-jian-token.status.authorized.md)。
4. 使用新生成的 Token 对客户进行扣款（[Charge](/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/ji-cheng-zhi-nan/charge.md)）

## **使用 Coda Scheduler 启动订阅**

要使用 **Coda Scheduler** 为您的 Shopper 设置 **周期性扣款**，请按照以下步骤操作：

1. 创建一个新的订阅计划（Subscription Plan）（每个计划仅需创建一次）。
2. 使用 Shopper ID 创建一个新的 [Shopper](/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/ji-cheng-zhi-nan/shopper.md)。
3. 根据 Shopper 的支付选择（如 Go-Pay），使用已关联的 Shopper ID 创建一个新的支付方式（[Payment Method](/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/ji-cheng-zhi-nan/payment-method.md)）。
4. 为所选支付方式生成 [Token](/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/ji-cheng-zhi-nan/token.md)。
5. 监控 [Coda 发送的通知以验证 Token](/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/webhooks-tong-zhi/token-shou-quan-shi-jian-token.status.authorized.md)。
6. 利用订阅计划和生成的 Token 启动订阅。

## **取消订阅**

要取消 Shopper 的订阅，请按照以下步骤操作：

1. 使用已生成的订阅 ID [取消现有订阅](/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/ding-yue-jing-qing-qi-dai/qu-xiao-ding-yue-cancel-subscription.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.coda.co/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/shang-ye-yong-li.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.
