收银台创建
请求地址
| method | url |
|---|---|
| POST | /api/checkout/payment/create |
头部信息(header)
| header 参数 | 入参参数描述 |
|---|---|
| timestamp | 请求时间戳 |
| nonce | 随机值 |
| country | PK |
| app_code | app编号 |
请求参数
| 字段 | 类型 | 必需 | 长度 | 描述 |
|---|---|---|---|---|
| merchantOrderNo | String | 是 | 32 | 商户订单号 |
| paymentType | Int | 否 | 支付方式 (303:easypaisa, 304:JazzCash) | |
| paymentTypeList | String | 否 | 可以传输多个支付方式以逗号隔开:303,304 | |
| idCardNumber | String | 否 | 13 | 客户身份证ID (非必填,如若填写,需要保证13位纯数字) |
| amount | String | 是 | 20 | 金额 正整数 |
| phone | String | 否 | 10/11 | 手机号(3开头10位/03开头11位) |
| String | 否 | 50 | 用户邮箱 | |
| callbackUrl | String | 否 | 200 | 代收回调地址 (若不传递,取商户后台配置的回调地址) |
| sign | String | 是 | 签名 |
{ "merchantOrderNo": "ceshi-test", "paymentType" : 303, "amount": 100, "phone": "3111111111", "email" : "213@123.com", "callbackUrl": "https://www.callbackexample.com", "sign" : "YOUR_SIGN"}返回参数
| 参数 | 类型 | 必需 | 长度 | 描述 |
|---|---|---|---|---|
| merchantOrderNo | String | 是 | 32 | 商户订单号 |
| tradeNo | String | 是 | 平台订单号 | |
| amount | String | 是 | 订单交易金额 | |
| status | Int | 是 | 代收状态,0:受理中 3-失败 | |
| checkoutLink | String | 是 | 收银台地址 | |
| expirationTime | String | 是 | 收银台地址过期时间 | |
| errorMsg | String | no | 错误信息,失败时返回 |
{ "code": 200, "data": { "merchantOrderNo": "ceshi-test", "tradeNo": "TS2509080002PKexample754", "amount": "100", "status": 0, "checkoutLink": "https://test-pk-payin.teemopay.com/#/?tradeNo=TS2509080002PKexample754", "expirationTime": "2025-09-17 13:53:45.959", "errorMsg": null }, "msg": "success", "traceId": "1e7142b1c2cf47479ccfdbb1ecba5242.94.17579264259380029"}错误码
| 异常码 | 异常信息 | 处理方案 |
|---|---|---|
| 412 | Please try again later | 请稍后重试 |
| 414 | * | 更改对应参数 |
| 416 | Application not found | app_code异常,请更改 |
| 424 | This payment method is not configured | 代收方式未配置,请联系我们配置对应代收方式 |
| 426 | merchant order duplicate | 请更换商户订单号 |
| 427 | The callback notification address for collection must not be empty. | 未配置代收回调地址,请配置代收回调地址 |
| 438 | Phone number is error | 请检查并更改手机号 |
| 441 | ID number must be exactly 13 digits long | 身份证号必须是 13 位数字 |
| 445 | Amount must be an integer | pk的金额必须为整数 |
| 460 | The current payment method is unavailable. | 当前代收方式不可用,请更换 |
| 473 | Merchant joint verification error: * | 配置异常,请联系我们 |
| 500 | Business Error | 请联系我们 |
{ "code": 426, "data": null, "msg": "merchant order duplicate", "traceId": "747bbf80261844ed85b809212aab0d81.85.17422898158610298"}