| 属性名 | 类型 | 描述 |
|---|---|---|
| trade_id | string | 交易单ID |
| access_no | string | 接入方编号 |
| merchant_id | string | 商户ID |
| amount | string | 支付金额,截取两位小数 |
| currency | string | 币种 |
| customer_id | string | 平台顾客 ID |
| callback_url | string | webhook 通知回调地址 |
| metadata | map[string]string | 一组可附加到对象上的键值对,允许您以结构化格式存储附加信息。 |
| last_payment_error | LastPaymentError | 最后一次支付错误信息,如果该字段有值,则表示支付失败。 |
| next_action | NextAction | 下一步操作 |
| order_id | string | 接入方订单号 |
| last_trans_id | string | 订单流水ID。 |
| paid_at | string | 支付成功时间 |
| payment_mode | string | 支付业务模式: subscription:首次订阅支付,需要收集顾客支付信息,传入 payment_method_data 字段,支付成功时会返回 payment_token 用于后续订阅续费 recurring_payment:订阅续订支付,需要传入 payment_token 完成支付,无需收集用户支付信息 |
| payment_token | string | 订阅支付时,返回的支付凭证,用于后续订阅续费 |
| payment_method | string | 支付方式 |
| payment_channel | string | 支付渠道 |
| return_url | string | 在类似 3DS 跳转支付场景时,支付渠道受理成功后重定向的页面 |
| trade_status | string | 支付单状态: requires_payment_method:初始状态 payment_failed:支付失败 processing:支付处理中 succeeded:支付成功 closed:已关闭 |
| txn_time | string | 交易发起时间,客户端发起接口的时间 |
| created_at | string | 创建时间 |
| refund_status | string | 退款状态: no_refund:无退款 partially_refunded:部分退款 refunded:退款完成 |
| total_refunded_amount | string | 退款金额,截取两位小数 |
| session_id | string | Session 唯一标识 |
| session_url | string | Session 的访问地址 |
| refer_info | ReferInfo | 顾客的来源信息 |
| order_type | string | 在不同采购或计费场景下生成的订单类型: onetime_payment: 一次性付款请求创建的交易订单 subscription: 发起订阅付款请求创建的交易订单 recurring_payment: Subotiz订阅续订服务创建的交易订单 token_payment: 商家使用现有订阅合同令牌向客户扣款时创建的交易订单 |
| line_items | LineItem[] | 客户购买的商品明细 |
| discounts | Discounts | 应用于交易的折扣,包括此交易的所有折扣信息 |
| closed_at | string | 交易关闭时间 |
| closed_reason | string | 关闭原因 timeout: 交易支付超时 renewal_failed: 订阅续订扣费失败(含重试) |
| first_source_channel | string | 交易关联的结账会话首次创建来源渠道 |
| last_source_channel | string | 交易关联的结账会话最后访问的来源渠道 |
| billing_address | BillingAddress | 顾客的账单地址信息 |
ReferInfo
| 属性名 | 类型 | 描述 |
|---|---|---|
| country_code | string | 客户下单时的国家 (ISO 2格式) |
| ip | string | 客户下单时的 IP |
| device | string | 客户设备的类型 pc:指个人电脑设备类型,包括台式机和笔记本电脑。 mobile:指移动端设备类型,包括智能手机和平板电脑。 |
| user_agent | string | 客户端的 user agent |
NextAction
| 属性名 | 类型 | 描述 |
|---|---|---|
| type | string | 客户端下一步需要操作的类型: redirect:重定向 |
| redirect | NextActionRedirect | 重定向信息 |
| client | NextActionClient | 客户端操作信息 |
NextActionRedirect
| 属性名 | 类型 | 描述 |
|---|---|---|
| url | string | 重定向 URL |
NextActionClient
| 属性名 | 类型 | 描述 |
|---|---|---|
| confirm_url | string | 确认支付 URL |
| apple_pay_session | string | ApplePay 创建使用的数据 |
LastPaymentError
| 属性名 | 类型 | 描述 |
|---|---|---|
| code | string | 系统返回交易返回码 |
| message | string | 系统返回交易返回说明 |
LineItem
| 属性名 | 类型 | 描述 |
|---|---|---|
| product_id | string | 所购买商品的商品 ID |
| price_id | string | 与所购买商品关联的定价方案 ID |
| price | string | 应用任何折扣之前的价格 |
| quantity | int | 购买的商品数量 |
Discounts
| 属性名 | 类型 | 描述 |
|---|---|---|
| current_period | CurrentPeriodDiscount[] | 当前时期的折扣详情 |
CurrentPeriodDiscount
| 属性名 | 类型 | 描述 |
|---|---|---|
| discount_id | string | 折扣的唯一标识符 |
| discount_amount | string | 折扣金额 |
| discount_code | string | 使用的折扣代码 |
BillingAddress
| 属性名 | 类型 | 描述 |
|---|---|---|
| name | string | 收件人全名 |
| address_line1 | string | 地址行1,主要街道地址 |
| address_line2 | string | 地址行2,附加地址信息 |
| country_code | string | 国家代码,ISO2格式(如:US、GB、CN) |
| province_code | string | 省/州代码(如:CA代表加利福尼亚州) |
| city | string | 城市名称 |
| area | string | 区域/区/县名称 |
| postal_code | string | 邮政编码 |
| phone | string | 不含国家代码的电话号码 |
| phone_area_code | string | 电话国家代码(如:+1、+44、+86) |
| string | 用于账单通知和联系的电子邮件地址 |