API 文档
PonponPay API 接口说明。
基础信息
| 项目 | 值 |
|---|---|
| Base URL | https://api.ponponpay.com/api/v1/pay/sdk |
| 认证方式 | API Key |
| 数据格式 | JSON |
认证
所有 API 请求需要在 Header 中携带 API Key 进行身份验证:
X-API-Key: your_api_key创建订单
POST /order/add
请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
currency | string | 是 | 币种(USDT/USDC) |
network | string | 是 | 区块链网络(tron/ethereum/bsc/solana 等) |
amount | number | 是 | 订单金额 |
mch_order_id | string | 否 | 商户订单号,最大32位 |
notify_url | string | 否 | 支付成功回调地址 |
redirect_url | string | 否 | 支付完成后重定向地址 |
响应参数
| 参数 | 类型 | 说明 |
|---|---|---|
trade_id | string | PonponPay 交易号 |
currency | string | 币种 |
network | string | 区块链网络 |
amount | number | 订单金额 |
actual_amount | number | 实际需支付金额 |
address | string | 收款钱包地址 |
expiration_time | number | 过期时间戳(秒) |
payment_url | string | 支付页面 URL |
cURL 示例
curl -X POST 'https://api.ponponpay.com/api/v1/pay/sdk/order/add' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: your_api_key' \
-d '{
"mch_order_id": "ORDER_123456",
"currency": "USDT",
"network": "tron",
"amount": 100.00,
"notify_url": "https://your-site.com/callback"
}'查询订单
POST /order/detail
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
trade_id | string | 否* | PonponPay 交易号 |
mch_order_id | string | 否* | 商户订单号 |
* trade_id 和 mch_order_id 至少传一个
错误码
| 错误码 | 说明 |
|---|---|
0 | 成功 |
10001 | 参数错误 |
10002 | 签名错误 |
10003 | 订单不存在 |
Last updated on