1. 收款(代收)
Merchant API Documentation
  • 引言
  • 签名&加密算法
  • 信用测试卡
  • 开启正式模式
  • 本地付测试
  • 客户
    • 创建客户
      POST
    • 更新客户
      PUT
    • 查询客户
      GET
    • 查询客户列表
      GET
    • 查询客户列表【完整地址】
      GET
    • 删除客户
      DELETE
  • 收款(代收)
    • 创建收款订单(收银台)
      POST
    • 创建收款订单(本地支付直连)
      POST
    • 查询收款订单
      GET
  • 退款
    • 发起退款
      POST
    • 查询退款订单
      GET
  • 代付
    • 创建代付订单
      POST
    • 查询代付订单
      GET
    • 取消代付订单
      POST
  • 账户
    • 查询账户余额
      GET
  • 异步通知
    • 交易结果通知(V2,加密)
    • 收款结果通知(V1)
    • 代付结果通知(V1)
  • 订阅
    • 创建订阅(待发布)
    • 检索订阅(待发布)
    • 取消订阅(待发布)
  • 重复性支付
    • 首次重复性支付(直连)(待发布)
    • 首次重复性支付【收银台】(待发布)
    • 首次重复性支付【SDK】(待发布)
    • 后续重复性支付(待发布)
  • 数据模型
    • 代收模型
      • 信用卡信息
        • CARD
      • 代收请求体
      • 设备信息
      • 代收响应体
      • option配置项
      • option配置项
    • 资金模型
      • 资金响应体
    • 客户模型
      • 客户请求体
      • 客户响应体
      • 收货地址 shipping
      • 产品/服务信息 product
    • 退款模型
      • 退款请求体
      • 退款响应体
    • 代付模型
      • 代付请求体
      • 代付响应体
      • 代付取消请求体
    • 订阅模型
      • 订阅请求体
      • 订阅响应体
      • 订阅计划请求体
      • 订阅计划响应体
      • 其他订阅请求体
    • 响应体基本模型
    • 请求头
  1. 收款(代收)

创建收款订单(本地支付直连)

POST
/pay-api/trade/payment

请求参数

Authorization
Body 参数application/json

示例
{
  "payType": 1,
  "paymentMethod": "CASHAPP",
  "orderNo": "TPAY_20260819103434916300674",
  "currency": "USD",
  "amount": "49.93",
  "clientIp": "45.63.54.131",
  "website": "https://manage.forgottenthrone.com/",
  "notifyUrl": "https://m1.apifoxmock.com/m2/8616256-8395705-default/492915485",
  "returnUrl": "http://192.168.2.19:5001/returnUrl.php",
  "deviceId": "9f8e7d6c-5b4a-4a32-9f87-1a2b3c4d5e6f",
  "clientId": "test-client-payin",
  "customer": {
    "firstname": "John",
    "lastname": "Smith",
    "email": "john.smith@example.com",
    "phone": "13800138052",
    "country": "US",
    "state": "CA",
    "city": "Los Angeles",
    "address": "123 Main St, Apt 4B",
    "zipcode": "90001"
  },
  "product": [
    {
      "name": "1,000 Gold Coins",
      "description": "In-game virtual currency pack for Fantasy Arena",
      "sku": "FA-GOLD-1000",
      "quantity": 2,
      "price": 9.99,
      "url": "https://example-game.com/store/gold-1000"
    },
    {
      "name": "Epic Hero Skin",
      "description": "Cosmetic skin for the Shadow Ranger character",
      "sku": "FA-SKIN-SR-EPIC",
      "quantity": 1,
      "price": 19.99,
      "url": "https://example-game.com/store/epic-hero-skin"
    },
    {
      "name": "Energy Refill Pack",
      "description": "Restores 100 energy for in-game battles",
      "sku": "FA-ENERGY-100",
      "quantity": 2,
      "price": 4.98,
      "url": "https://example-game.com/store/energy-refill-100"
    }
  ],
  "metadata": ""
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
cURL
curl --location '/pay-api/trade/payment' \
--header 'Content-Type: application/json' \
--data-raw '{
  "payType": 1,
  "paymentMethod": "CASHAPP",
  "orderNo": "TPAY_20260819103434916300674",
  "currency": "USD",
  "amount": "49.93",
  "clientIp": "45.63.54.131",
  "website": "https://manage.forgottenthrone.com/",
  "notifyUrl": "https://m1.apifoxmock.com/m2/8616256-8395705-default/492915485",
  "returnUrl": "http://192.168.2.19:5001/returnUrl.php",
  "deviceId": "9f8e7d6c-5b4a-4a32-9f87-1a2b3c4d5e6f",
  "clientId": "test-client-payin",
  "customer": {
    "firstname": "John",
    "lastname": "Smith",
    "email": "john.smith@example.com",
    "phone": "13800138052",
    "country": "US",
    "state": "CA",
    "city": "Los Angeles",
    "address": "123 Main St, Apt 4B",
    "zipcode": "90001"
  },
  "product": [
    {
      "name": "1,000 Gold Coins",
      "description": "In-game virtual currency pack for Fantasy Arena",
      "sku": "FA-GOLD-1000",
      "quantity": 2,
      "price": 9.99,
      "url": "https://example-game.com/store/gold-1000"
    },
    {
      "name": "Epic Hero Skin",
      "description": "Cosmetic skin for the Shadow Ranger character",
      "sku": "FA-SKIN-SR-EPIC",
      "quantity": 1,
      "price": 19.99,
      "url": "https://example-game.com/store/epic-hero-skin"
    },
    {
      "name": "Energy Refill Pack",
      "description": "Restores 100 energy for in-game battles",
      "sku": "FA-ENERGY-100",
      "quantity": 2,
      "price": 4.98,
      "url": "https://example-game.com/store/energy-refill-100"
    }
  ],
  "metadata": ""
}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{
    "code": 0,
    "data": {
        "tradeNo": "pay_202506251213283708537",
        "orderNo": "asd60102",
        "currency": "USD",
        "amount": 12.34,
        "tradeDate": null,
        "status": 0,
        "code": "requires_action",
        "message": "Please redirect to 'redirectUrl'",
        "redirectUrl": "https://xxx",
        "expireTime": 1728638520977
    },
    "msg": "",
    "livemode": true
}
🔴500失败
修改于 2026-09-18 07:16:06
上一页
创建收款订单(收银台)
下一页
查询收款订单
Built with