API Reference
REST API for BEP-20 token deposits and withdrawals on Binance Smart Chain. All endpoints are prefixed with /api/v1/ and require an API key.
https://paynovax.online
Authentication
Pass your API key in the x-api-key request header on every call.
curl -X POST https://paynovax.online/api/v1/payment/create \
-H "x-api-key: cpk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"tokenId":1,"amount":"49.99"}'
Generate an ephemeral BSC wallet and QR code for your customer to send tokens to. The platform monitors the wallet and forwards received tokens to your merchant wallet automatically.
/api/v1/payment/create
Creates a new payment session. Returns a deposit wallet address and QR code for the customer.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
tokenId | integer | yes | ID of the BEP-20 token from your token list |
amount | string | yes | Expected token amount, e.g. "49.99" |
merchantWallet | string | no | BSC address to forward tokens to. Defaults to domain wallet. |
domainId | integer | no | Required for server-side calls (no Origin header). |
{
"tokenId": 1,
"amount": "49.99"
}
{
"success": true,
"data": {
"sessionId": "ps_abc123",
"depositAddress": "0xABC...",
"amount": "49.99",
"token": "USDT",
"qrCode": "data:image/png;base64,...",
"expiresAt": "2026-03-23T12:30:00Z",
"status": "pending"
}
}
/api/v1/payment/:sessionId/status
Poll this endpoint to track payment progress. Poll every 5–10 seconds until status is completed or expired.
{
"success": true,
"data": {
"sessionId": "ps_abc123",
"status": "pending" | "completed" | "expired" | "cancelled",
"amount": "49.99",
"receivedAmount": "49.99" | null,
"token": "USDT",
"depositAddress": "0xABC...",
"txHash": "0xDEF..." | null,
"expiresAt": "2026-03-23T12:30:00Z"
}
}
pending — waiting for payment ·
completed — tokens received & forwarded ·
expired — TTL elapsed ·
cancelled — manually cancelled
/api/v1/payment/:sessionId/cancel
Cancels a pending payment session. Has no effect on sessions that are already completed or expired.
{ "success": true, "data": { "message": "Payment session cancelled." } }
/api/v1/payment/history
Returns a paginated list of payment sessions for the API key.
Query Parameters
| Param | Default | Description |
|---|---|---|
page | 1 | Page number |
limit | 20 | Records per page (max 100) |
status | all | Filter: pending completed expired cancelled |
{
"success": true,
"data": {
"items": [ /* session objects */ ],
"meta": { "page": 1, "limit": 20, "total": 143, "pages": 8 }
}
}
Send BEP-20 tokens or native BNB out from a domain's withdrawal wallet to any BSC address. The withdrawal wallet is configured per domain in your dashboard.
/api/v1/withdrawal/send
Sends BEP-20 tokens from the domain withdrawal wallet to a recipient address on BSC.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
domainId | integer | yes | Domain whose withdrawal wallet will send the funds |
tokenId | integer | yes | ID of the BEP-20 token to send |
toAddress | string | yes | Recipient BSC wallet address (0x…) |
amount | string | yes | Token amount to send, e.g. "100.00" |
{
"domainId": 3,
"tokenId": 1,
"toAddress": "0xRecipient...",
"amount": "100.00"
}
{
"success": true,
"data": {
"withdrawalId": "wd_xyz789",
"txHash": "0xDEF...",
"amount": "100.00",
"token": "USDT",
"toAddress": "0xRecipient...",
"status": "submitted"
}
}
/api/v1/withdrawal/history
Returns a paginated list of withdrawal records for the API key. Same page / limit / status query params as the deposit history endpoint.
GET /api/v1/withdrawal/:withdrawalId — fetch a single withdrawal record by ID.
Error Codes
All errors follow the same envelope: {"success":false,"error":{"code":"...","message":"..."}}
| Code | HTTP | Description |
|---|---|---|
VALIDATION_ERROR | 400 | Invalid or missing request fields |
UNAUTHORIZED | 401 | Missing or invalid API key |
DOMAIN_NOT_WHITELISTED | 403 | Request origin not in whitelist |
NO_PACKAGE | 403 | No active subscription on account |
NOT_FOUND | 404 | Session or withdrawal record not found |
RATE_LIMIT_EXCEEDED | 429 | Too many requests |
SESSION_EXPIRED | 410 | Payment session TTL elapsed |
BLOCKCHAIN_ERROR | 502 | On-chain transaction failed |
INTERNAL_ERROR | 500 | Unexpected server error |
Ready to start accepting payments?
Create Free Account