API Reference
PonponPay API documentation.
Base Information
| Base URL | https://api.ponponpay.com/api/v1/pay/sdk |
| Authentication | API Key |
| Data Format | JSON |
Authentication
All API requests require an API Key in the header:
| Header | Description |
|---|
X-API-Key | Your API Key |
Create Order
POST /order/add
Request Parameters
| Parameter | Type | Required | Description |
|---|
currency | string | Yes | Currency (USDT/USDC) |
network | string | Yes | Blockchain network (tron/ethereum/bsc/solana etc.) |
amount | number | Yes | Order amount |
mch_order_id | string | No | Your merchant order ID, max 32 chars, auto-generated if not provided |
notify_url | string | No | Payment success callback URL |
redirect_url | string | No | Redirect URL after payment completion |
Response Parameters
| Parameter | Type | Description |
|---|
trade_id | string | PonponPay transaction ID |
currency | string | Currency |
network | string | Blockchain network |
amount | number | Order amount |
actual_amount | number | Actual payment amount (4 decimal places) |
address | string | Receiving wallet address |
expiration_time | number | Expiration timestamp (seconds) |
payment_url | string | Payment page URL |
cURL Example
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",
"redirect_url": "https://your-site.com/success"
}'
Response Example
{
"code": 0,
"message": "success",
"data": {
"trade_id": "PP202412110001",
"currency": "USDT",
"network": "tron",
"amount": 100.00,
"actual_amount": 100.0001,
"address": "TXxx...xxx",
"expiration_time": 1704067200,
"payment_url": "https://pay.ponponpay.com/checkout/PP202412110001"
}
}
Query Order
POST /order/detail
Request Parameters
| Parameter | Type | Required | Description |
|---|
trade_id | string | No* | PonponPay transaction ID |
mch_order_id | string | No* | Merchant order ID |
* Either trade_id or mch_order_id must be provided
cURL Example
curl -X POST 'https://api.ponponpay.com/api/v1/pay/sdk/order/detail' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: your_api_key' \
-d '{
"trade_id": "PP202412110001"
}'
Response Example
{
"code": 0,
"message": "success",
"data": {
"trade_id": "PP202412110001",
"mch_order_id": "ORDER_123456",
"currency": "USDT",
"network": "tron",
"amount": 100.00,
"actual_amount": 100.0001,
"status": "paid",
"address": "TXxx...xxx",
"tx_hash": "abc123...",
"created_at": 1704063600,
"paid_at": 1704064200
}
}
Error Codes
| Code | Description |
|---|
0 | Success |
10001 | Invalid parameters |
10002 | Invalid signature |
10003 | Order not found |