> ## Documentation Index
> Fetch the complete documentation index at: https://sdk.qfapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 儲存付款方式概覽

> 建立並管理可供後續付款使用的顧客與付款 Token。

「儲存付款方式」讓商戶可將顧客與 QFPay 付款 Token 安全地關聯，以支援後續的卡片付款流程。產生的 `customer_id` 與 `token_id` 可供定期付款及其他已支援的未來付款場景使用。

## 適用情境

當您需要先收集一次持卡人的付款資料、儲存 QFPay 發出的 Token，並於獲授權的後續付款流程中使用該 Token 時，請使用本功能。

<Info>
  付款 Token 目前僅支援透過 [Element SDK](/zh-hant/integration/online-shop/checkout-integration/payment-element) 進行的卡片付款。錢包付款方式不會產生付款 Token。
</Info>

## 流程說明

1. 建立顧客資料並保存回傳的 `customer_id`。
2. 使用 Element SDK 收集卡片資料，並在發起卡片付款時帶入 `customer_id`。
3. 付款及驗證成功後，QFPay 建立 `token_id`。
4. 透過付款 Token 通知確認並保存 Token。
5. 在支援的後續付款流程中使用 `customer_id` 與 `token_id`。

## 建議保存的資料

| 資料                | 用途                          |
| ----------------- | --------------------------- |
| `customer_id`     | 識別 QFPay 中的顧客資料。            |
| `token_id`        | 識別已儲存的付款方式。                 |
| `token_expiry`    | QFPay 回傳時，表示付款 Token 的到期時間。 |
| `token_reference` | 商戶提供的對賬或內部追蹤編號。             |

<Tip>
  請只保存 QFPay 發出的識別碼及遮罩卡號。請勿在您的系統中保存原始卡片資料。
</Tip>

## 下一步

* [顧客與 Token 設定](/zh-hant/integration/online-shop/integration-by-use-case/saved-payment-methods/customer-token-setup)
* [付款 Token 通知](/zh-hant/integration/online-shop/integration-by-use-case/saved-payment-methods/token-notification)
* [Element SDK](/zh-hant/integration/online-shop/checkout-integration/payment-element)
