# 1 结帐下单接口

# 简要描述
  • 商户代付-支付下单接口
# 请求URL
  • /api/v1/checkout
# 请求方式
  • POST
# 请求头
参数名 必选 类型 说明
Content-Type mandatory string application/json
# 请求体参数
参数名 必选 类型 长度限制 示例 说明
appId string - - 应用APPID
appName string - - 应用名称
param string - - 参数体
sign string - 45eebd745dcf0b5f6d6f9fcde28cd9fe8116a892 签名
# param 参数
参数名 必选 类型 长度限制 示例 说明
mchOrderId string 10-32 CCP20220428011068111 商户订单id,格式:字母+数字, 1-32位
currency string 10 默认:"PHP"
amount long - 50000 收款金额:单位 分 事例:50比索,需传递5000
customer object(customer) - - 用户信息
items Array[item] - - 商品信息
callbackUrl string 1-256 - 支付回调地址
redirectUrl string 1-512 - 支付重定向地址
metadata string 1-2000 - 附加数据
remark string 1-256 - 下单备注
availableChannelCodes string - - 可用渠道:默认全部渠道
expireTime string - 过期时间:"YYYY-mm-dd H:i:s" 最长1天
timestamp long - 1678356680000 毫秒时间戳
# customer 参数
参数名 必选 类型 长度限制 示例 说明
firstName string 1-500 jack 格式:字母+数字, 1-500位,支持特殊字符 #(),.'":;@&ñÑ+
lastName string 1-500 格式:字母+数字, 1-500位,支持特殊字符 #(),.'":;@&ñÑ+
email string 1-128 abc@gmail.com 付款人邮箱
mobile string 11-14 092737734772 付款人手机号
address object - - 用户地址
# item 参数
参数名 必选 类型 长度限制 示例 说明
name string 1-500 CCP20220428011068111 商品名称,格式:字母+数字, 1-500位,支持特殊字符 #(),.'":;@&ñÑ+
amount long - 50000 商品单价(单位:分) 事例:50比索,需传递5000
quantity int - 10 商品数量
description String 1-1000 - 商品描述
url string 1-500 - 商品url地址
# 请求事例
{
  "appId": "{{appId}}",
  "appName": "{{appName}}",
  "param": "{\"appName\":\"paycools test\",\"mchOrderId\":\"{{mchOrderId}}\",\"idempotencyId\":\"{{mchOrderId}}\",\"appName\":\"paycools APP\",\"amount\":4000,\"accountNo\":\"09957734428\",\"accountName\":\"Sam Wu\",\"payMethodCode\":\"EWALLET\",\"transferCode\":\"GCASH\",\"timestamp\":{{$timestamp}}}",
  "sign": "{{sign}}"
}
# 返回示例
{
    "code": 1000,
    "message": "success",
    "data": {
        "redirectUrl": "https://a.api-uat.paycools.com/1L9zPnp",
        "transactionStatus": "PENDING",
        "checkoutId": "CH1175676368800878371"
    }
}
# 说明: redirectUrl字段对应的链接有效期为1小时,超过此时间,此链接将失效
# 返回失败案例 code参考列表 参考列表
{
    "code":1002,
    "message":"merchant white ip forbidden"
}