交易
Action 前缀:order/… · 认证:Brand API 认证
order/new — 创建交易
| Key | 说明 | Required | Type |
|---|---|---|---|
order_number | 你的唯一订单号 | Yes | string |
pbtid | PartnerBoost 点击追踪码 | No | string |
is_new_customer | 是否为品牌新客 | No | bool |
uid | 品牌侧用户标识 | No | string |
currency | 订单币种 | Yes | string |
trans_time | 订单交易时间 | Yes | string |
amount | 实际订单金额 | No | double |
quantity | 商品数量 | No | int |
remark | 任意备注 | No | string |
couponcode | couponcode 参数接收订单中使用的优惠券、促销和/或折扣码的逗号分隔列表 | No | string |
skus | SKU 列表(订单有 SKU 时必填,否则请传 amount) | No | array |
skus 子字段
| Key | 说明 | Required | Type |
|---|---|---|---|
id | 商品 SKU ID | Yes | string |
name | 商品名称 | No | string |
amount | 实际 SKU 金额 | Yes | double |
quantity | 商品数量 | No | int |
remark | 任意备注 | No | string |
请求:
{
"order_number": "RMD17ea9a09be7c4bd4101aa3d21df80b47",
"currency": "USD",
"trans_time": "Thu, 20 Jan 2022 05:27:30 GMT",
"pbtid": "ldc_xdw3",
"amount": 111.55,
"skus": [
{
"id": "B07K1WWBJK",
"name": "Apple Pencil (2nd Generation)",
"amount": 11.15,
"quantity": 1
}
]
}
响应:
{
"code": 0,
"data": "210120052732256X22",
"msg": "success"
}
order/void — 作废交易
| Key | 说明 | Required | Type |
|---|---|---|---|
order_number | 你的唯一订单号 | Yes | string |
order/effective — 确认交易
| Key | 说明 | Required | Type |
|---|---|---|---|
order_number | 你的唯一订单号 | Yes | string |
order/bonus — 发放奖金
| Key | 说明 | Required | Type |
|---|---|---|---|
medium_id | 媒体渠道标识 | Yes | string |
currency | 订单币种 | Yes | string |
trans_time | 订单交易时间 | Yes | string |
commission | 发给媒体的佣金 | Yes | double |
remark | 任意备注 | No | string |
生命周期
order/new → order/effective(确认)或 order/void(取消)
order/bonus(独立奖金路径)
幂等
请使用稳定的 order_number。重复提交可能因订单状态返回错误。