For the complete documentation index, see llms.txt. This page is also available as Markdown.

Charge

这代表向Shopper收取Token费用。Charge ID是Coda生成的唯一标识符,用于识别各个费用交易。

Charge 对象

参数名称
类型
描述

id

String

Coda生成的token ID

created_at

String

合作伙伴将用于识别其客户并链接token ID 的 ID

status_code

String

Token的状态码

token_id

String

连结的token ID

partner_reference

String

合作伙伴参考 ID 长度必须介于 4 到 64 之间,并且必须遵循模式 ^[a-zA-Z0-9-_]+$

item_code

String

被扣款商品的代码

item_name

String

被扣款商品的名称

amount_value

String

商品的扣款金额

amount_currency

String

收取金额的货币

subscription_id

String

订阅 ID(如果选择加入订阅)

shopper_action

String

Shopper 扣款流程操作

shopper_action.id

String

Shopper 扣款操作 ID

shopper_action.type

String

Shopper 扣款操作类型(例如:重定向)

shopper_action.redirection

String

Shopper 扣款重定向实体

shopper_action.redirection.id

String

Shopper 扣款重定向 ID

shopper_action.redirection.method

String

Shopper 扣款重定向 URL 方法类型(例如:GET/POST)

shopper_action.redirection.url

String

Shopper 扣款重定向 URL

接口

创建带有 Shopper 操作的扣款

POST /charges

带有 Shopper 操作的扣款响应对象

创建无需 Shopper 操作的扣款

POST /charges

响应Charge对象

取消Charge

GET /charges/{id}

响应收费对象

请求参数

参数名称
类型
必填?
描述
验证

token_id

String

Coda生成的token ID

Token ID 长度必须介于 20 到 32 之间 并且必须遵循模式“[A-Za-z]+_[A-Za-z0-9]+”

item_code

String

收费项目代码

不能为空

item_name

String

收费项目名称

不能为空

amount_value

String

商品的收费数值

不不能为空

必须匹配“^\d+(.\d{1,2})?$”

amount_currency

String

收取金额的货币

不能为空

大小必须为 3

partner_reference

String

合作伙伴参考 ID

合作伙伴参考号不能为空,长度必须介于 4 到 64 之间,并且必须遵循模式 ^[a-zA-Z0-9-_]+$

token.payment_method.card.security_code

String

卡安全代码 (CSC/CVV) 是卡付款方式成功创建费用的必填字段。其他付款方式(例如 GoPay)可选填

安全码长度必须为 3

最后更新于

这有帮助吗?