跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://waffo.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

POST /api/v1/tokenization/generate

请求参数

参数类型必填说明
tokenRequestIdString绑卡请求的幂等键
merchantUserIdString商户侧用户 ID
tokenTypeString令牌类型,固定为 "CARD"
merchantInfoObject商户信息(包含 merchantId
notifyUrlString绑卡结果的 Webhook 回调 URL
tokenDataObject卡数据(仅 PCI-DSS 商户)

tokenData(仅 PCI-DSS 商户)

参数类型说明
panString卡号
nameString持卡人姓名
expiryString有效期(MM/YYYY)
cvvStringCVV

响应参数

参数类型说明
tokenSessionIdString会话 ID,传给前端 SDK 的 tokenizationSubmit
tokenIdString令牌 ID(仅当 PCI-DSS 商户直接提交时返回)

请求示例

标准流程(通过前端 SDK 提交)

{
  "tokenRequestId": "treq_a1b2c3d4e5f6",
  "merchantUserId": "user_123",
  "tokenType": "CARD",
  "merchantInfo": { "merchantId": "M000001" },
  "notifyUrl": "https://your-site.com/webhook/tokenization"
}

响应示例

{
  "code": "0",
  "msg": "Success",
  "data": {
    "tokenSessionId": "tsess_xxxxxxxxxxxx"
  }
}
获取 tokenSessionId 后,将其传给前端 SDK 方法 tokenizationSubmit 以完成卡信息提交。

绑卡结果通知

绑卡完成后,Waffo 会向 notifyUrl 发送包含 tokenId 的 Webhook 通知。商户必须保存该 tokenId 以用于后续支付。