跳转至

创建美国代收订单

创建美国混合收银台代收订单,并返回收银台地址。

接口信息

业务参数

以下 JSON 编码后放入签名请求的 data 字段。

字段 类型 必填 说明
mch_order_no string 商户订单号,不能为空
amount string 订单金额,使用十进制字符串,币种为 USD
user_id string 商户侧用户 ID,不能为空
client_ip string 付款人的真实公网 IP 地址
notify_url string 有效的异步通知 URL,推荐传入;如未传则不会发起回调请求
return_url string 有效的支付完成返回 URL
data object 支付方式及付款人信息
data.type string 固定为 us_mixed
data.first_name string 付款人名字,不能为空
data.last_name string 付款人姓氏,不能为空
data.email string 有效的付款人邮箱
data.phone string 付款人电话,不能为空
data.street_address string 付款人街道地址,不能为空
data.city string 付款人所在城市,不能为空
data.postcode string 付款人邮政编码,不能为空

美国代收当前仅支持收银台模式,mode 字段可省略。

{
  "mch_order_no": "PI202607150001",
  "amount": "100.50",
  "user_id": "USER10003",
  "client_ip": "203.0.113.10",
  "notify_url": "https://merchant.example.com/notify/pay-in",
  "return_url": "https://merchant.example.com/payment/result",
  "data": {
    "type": "us_mixed",
    "first_name": "John",
    "last_name": "Doe",
    "email": "payer@example.com",
    "phone": "+12025550123",
    "street_address": "123 Main Street",
    "city": "New York",
    "postcode": "10001"
  }
}

成功响应

兼容性说明:后续可能新增其他响应字段。接入方应忽略未识别字段,不要因出现文档外字段而解析失败。

{
  "code": 0,
  "message": "ok",
  "data": {
    "order_no": "MPI123456791",
    "amount": "100.50",
    "type": "cashier",
    "url": "https://cashier.example.com/pay_in/cashier/MPI123456791"
  }
}

非生产环境的响应还可能包含 test_callback_url,可根据该地址回调;生产环境不会返回该字段。