Documentation

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.

Base URL https://paynovax.online

Authentication

Pass your API key in the x-api-key request header on every call.

Example
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"}'
Deposit

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.

POST /api/v1/payment/create

Creates a new payment session. Returns a deposit wallet address and QR code for the customer.

Request Body

FieldTypeRequiredDescription
tokenIdintegeryesID of the BEP-20 token from your token list
amountstringyesExpected token amount, e.g. "49.99"
merchantWalletstringnoBSC address to forward tokens to. Defaults to domain wallet.
domainIdintegernoRequired for server-side calls (no Origin header).
Request
{
  "tokenId": 1,
  "amount": "49.99"
}
201 Created
{
  "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"
  }
}
GET /api/v1/payment/:sessionId/status

Poll this endpoint to track payment progress. Poll every 5–10 seconds until status is completed or expired.

200 OK
{
  "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"
  }
}
Status values: pending — waiting for payment  ·  completed — tokens received & forwarded  ·  expired — TTL elapsed  ·  cancelled — manually cancelled
POST /api/v1/payment/:sessionId/cancel

Cancels a pending payment session. Has no effect on sessions that are already completed or expired.

200 OK
{ "success": true, "data": { "message": "Payment session cancelled." } }
GET /api/v1/payment/history

Returns a paginated list of payment sessions for the API key.

Query Parameters

ParamDefaultDescription
page1Page number
limit20Records per page (max 100)
statusallFilter: pending completed expired cancelled
200 OK
{
  "success": true,
  "data": {
    "items": [ /* session objects */ ],
    "meta": { "page": 1, "limit": 20, "total": 143, "pages": 8 }
  }
}
Withdrawal

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.

POST /api/v1/withdrawal/send

Sends BEP-20 tokens from the domain withdrawal wallet to a recipient address on BSC.

Request Body

FieldTypeRequiredDescription
domainIdintegeryesDomain whose withdrawal wallet will send the funds
tokenIdintegeryesID of the BEP-20 token to send
toAddressstringyesRecipient BSC wallet address (0x…)
amountstringyesToken amount to send, e.g. "100.00"
Request
{
  "domainId":  3,
  "tokenId":   1,
  "toAddress": "0xRecipient...",
  "amount":    "100.00"
}
201 Created
{
  "success": true,
  "data": {
    "withdrawalId": "wd_xyz789",
    "txHash":       "0xDEF...",
    "amount":       "100.00",
    "token":        "USDT",
    "toAddress":    "0xRecipient...",
    "status":       "submitted"
  }
}
GET /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.

Also available: 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_ERROR400Invalid or missing request fields
UNAUTHORIZED401Missing or invalid API key
DOMAIN_NOT_WHITELISTED403Request origin not in whitelist
NO_PACKAGE403No active subscription on account
NOT_FOUND404Session or withdrawal record not found
RATE_LIMIT_EXCEEDED429Too many requests
SESSION_EXPIRED410Payment session TTL elapsed
BLOCKCHAIN_ERROR502On-chain transaction failed
INTERNAL_ERROR500Unexpected server error

Ready to start accepting payments?

Create Free Account