PayOwl Wallet · Merchant API

Accept USDT, USDC, TRX, BNB, POL and SOL with permanent (static) addresses on Tron, BNB Smart Chain, Polygon and Solana. Payments are credited to your PayOwl Wallet balance, and your server is told by webhook. Send money out with the payout API.

OxaPay-compatible. Paths, the merchant_api_key header, response envelopes and webhooks follow OxaPay's API v1. An OxaPay static-address integration moves over by changing the base URL and the key. Differences from OxaPay are marked Differs from OxaPay.

For AI assistants and tools: docs.md (this page as Markdown) · llms.txt ·

Basics

Response envelope (every endpoint)

{ "data": { }, "message": "Operation completed successfully!", "error": {}, "status": 200, "version": "1.0.0" }

Networks and coins

network value (name) Also accepted Coins Addresses
Tron Network TRON, TRC20, TRX USDT, TRX T… (34 chars)
Binance Smart Chain BSC, BEP20, BNB USDT, USDC, BNB 0x… (40 hex)
Polygon Network POLYGON, POL, MATIC USDT, USDC, POL 0x… (40 hex)
Solana Network SOLANA, SOL, SPL USDT, USDC, SOL base58, 32–44 chars, case-sensitive

Fees

Build it with AI

An AI assistant can write most of the integration for you, as long as it has these docs. They're available as plain Markdown for exactly that:

With Claude (claude.ai or the Claude app)

  1. On https://docs.payowl.io press Copy for AI.
  2. Start a chat, paste, and then ask for what you need. Say which language and framework you use, for example:
Above is the PayOwl Wallet merchant API reference. I run a Node.js (Express) shop.
Write:
1. a function that gets a permanent USDT address on Tron for a customer (order_id = the customer's id),
2. a POST /payowl/callback route that verifies the HMAC header with my API key from the
   PAYOWL_MERCHANT_KEY environment variable, answers "ok", and credits the customer's
   order only when status is "Paid" (ignoring repeats of the same tx_hash + status).

With Claude Code (in your project)

Claude Code works in your codebase and can read the docs itself. In your project folder, run claude and ask:

Read https://docs.payowl.io/llms-full.txt (the PayOwl Wallet merchant API).
Add PayOwl payments to this app: a static TRON USDT address per customer, shown on
their billing page, and a webhook endpoint that verifies the HMAC signature and marks
payments paid on "Paid". Keep the API key in PAYOWL_MERCHANT_KEY. Add tests.

To keep the reference in your repository (so every later session has it), ask Claude Code to save it, e.g. to docs/payowl-api.md, and mention that file in your project's CLAUDE.md.

With ChatGPT, Cursor and others

The same works anywhere: paste the Markdown (Copy for AI) into ChatGPT, or in Cursor add https://docs.payowl.io/docs.md as a doc (@Docs → Add new doc) and refer to it in your prompt.

Good prompts to start from

Keep your keys safe

Static addresses

POST/payment/static-address

Creates a permanent address. Every payment to it, above the minimum, at any time, is credited to you.

Field Type
network string Required. A network name or alias from the table above
callback_url string Where webhooks go (https). Left out: the key's default callback URL (set in the app), if any. Sent again with the same order_id, a new callback_url replaces the address's old one (its undelivered webhooks follow); left out, the old one stays.
order_id string Your reference (e.g. your customer's id). Idempotent: the same order_id on the same network with the same API key always returns the same address (another of your keys gets its own). Differs from OxaPay (it would create a new one).
email string Payer's email, for your reports
description string Up to 1000 characters
auto_withdrawal integer 1: each payment to this address is sent on to your withdrawal address for its coin once confirmed, instead of staying in your balance (as OxaPay's Address List). Set the addresses in the app: Settings → Merchant → Auto-withdrawal. Needs an address for at least one coin on the network. 0 or left out: payments stay in your balance. Sent again with the same order_id, it changes the address's setting. See Auto-withdrawal.
to_currency Not supported (no auto-convert): leave it out.
curl -X POST https://api.payowl.io/v1/payment/static-address \
  -H "merchant_api_key: YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"network":"TRON","order_id":"customer-42","callback_url":"https://example.com/callback"}'
{
  "data": {
    "track_id": "184035117",
    "network": "Tron Network",
    "address": "TQ9w…",
    "memo": "",
    "qr_code": "https://api.payowl.io/qr/TQ9w….png",
    "date": 1790421988
  },
  "message": "Operation completed successfully!", "error": {}, "status": 200, "version": "1.0.0"
}

Errors: creating an address on a network where you accept no coin is refused (error.key = "network"). Up to 10,000 addresses without payments per merchant.

Accepted coins

Choose them in the app (Settings → Merchant → Accepted coins). GET /payment/accepted-currencies lists them. A payment in a coin you don't accept is still credited to your balance (nothing can refuse it on chain), but no webhook is sent for it.

GET/payment/static-address

Your static addresses, newest first. Query filters: track_id, network, currency, address, have_tx (1/0), order_id, email, page, size (max 200).

{ "data": { "list": [ { "track_id": "184035117", "address": "TQ9w…", "network": "Tron Network", "callback_url": "https://…",
  "email": "", "order_id": "customer-42", "description": "", "date": 1790421988 } ],
  "meta": { "page": 1, "last_page": 1, "total": 1 } }, "message": "…", "error": {}, "status": 200, "version": "1.0.0" }

POST/payment/static-address/revoke

Body: {"address": "T…"}. Stops webhooks for that address. Differs from OxaPay: a payment that still arrives there is credited to your balance anyway (it just isn't reported by webhook).

Auto-withdrawal

With auto_withdrawal: 1, each payment to the address is sent on automatically once it's confirmed and credited, to the withdrawal address you saved for that coin (e.g. USDT on Tron → your USDT TRC-20 address).

Payment information

GET/payment/{track_id}

A static address and all its payments, in OxaPay's payment-information format. The track_id is the address's; each payment to it is an entry in txs.

{ "data": { "track_id": "184035117", "type": "static_address", "amount": 105, "currency": "USDT", "status": "paid",
  "mixed_payment": false, "callback_url": "https://…", "description": "", "email": "", "fee_paid_by_payer": 0, "lifetime": 0,
  "order_id": "customer-42", "under_paid_coverage": 0, "return_url": "", "thanks_message": "", "expired_at": 0, "date": 1790421988,
  "txs": [ { "tx_hash": "aa23…11b", "amount": 100, "currency": "USDT", "network": "Tron Network", "address": "TQ9w…",
    "status": "confirmed", "confirmations": 19, "auto_convert": { "processed": false, "amount": 0, "currency": "" },
    "auto_withdrawal": { "processed": false }, "date": 1790422100 } ],
  "ignored_payments": [] }, "message": "…", "error": {}, "status": 200, "version": "1.0.0" }

GET/payment

Your static addresses that received payments, one entry per track_id in the format above. Filters: track_id, status (paying/paid), currency, address, from_date, to_date (UNIX), from_amount, to_amount, sort_by (create_date, pay_date, amount), sort_type (asc/desc), page, size.

Balance

GET/general/account/balance

{ "data": { "USDT": 1284.5, "TRX": 310.2, "USDC": 50, "BNB": 0.4, "POL": 0, "SOL": 1.5 }, "message": "…", "error": {}, "status": 200, "version": "1.0.0" }

By coin, networks added up (as OxaPay reports). In the wallet each network is its own balance.

Payouts

Send from your wallet balance to any address, in OxaPay's payout format, with the payout key (payout_api_key header). The merchant key can't send money.

POST/payout

Field Type
address string Required. Recipient: T… on Tron, 0x… on BSC/Polygon, base58 on Solana
currency string Required. USDT, USDC, TRX, BNB, POL or SOL
amount number Required. What the recipient gets; the fee comes on top, from your balance
network string Required for a coin on several networks (USDT, USDC): a network name or alias
callback_url string Where payout webhooks go. Left out: the payout key's default callback URL (set in the app), if any.
description string For your reports
memo string Accepted and stored (no network here needs one)

Header Idempotency-Key (optional, recommended): a unique value per payout, e.g. your withdrawal id. A retried request with the same key returns the same payout instead of paying twice. Differs from OxaPay (it has no such protection).

curl -X POST https://api.payowl.io/v1/payout \
  -H "payout_api_key: YOUR_PAYOUT_KEY" -H "Idempotency-Key: withdrawal-5813" -H "Content-Type: application/json" \
  -d '{"address":"TJRabPrwbZy45sbavfcjinPJC18kjpRTv8","currency":"USDT","network":"TRON","amount":20,"callback_url":"https://example.com/payout-callback"}'
{ "data": { "track_id": "257810344", "status": "pending" }, "message": "Operation completed successfully!", "error": {}, "status": 200, "version": "1.0.0" }

GET/payout/{track_id} and GET/payout

A payout, or your payouts. List filters: status, type (internal/external), currency, network, from_amount, to_amount, from_date, to_date, sort_by, sort_type, page, size.

{ "track_id": "257810344", "address": "TJRab…", "currency": "USDT", "network": "Tron Network", "amount": 20, "fee": 1,
  "status": "confirmed", "tx_hash": "4f1c…", "description": "", "internal": false, "memo": "", "date": 1790430000 }
status Meaning
processing Waiting for a manual check
pending Queued to be sent
confirming Sent, waiting for the network
confirmed Paid
rejected Not sent; amount and fee are back in your balance

When a payout is refused

The payout's amount plus its fee (withdraw_fee in /common/currencies) must be in your balance on that network: with 4.95 USDT on BSC and a 0.25 fee, the most you can pay out is 4.70.

Refusals are about your account (your balance, your limits), so don't show the message to your customers: show them your own text (e.g. "Your withdrawal is being processed") and deal with it on your side. The message itself stays neutral, and the numbers are in error.details for your code:

error.key error.message error.details
insufficient_funds Insufficient balance for this payout. amount, fee, required, balance, max_payout
limit This payout is above the allowed limit. limit (per_payout or daily), max_usd or daily_usd, used_usd, payout_usd

error.details is not in OxaPay's API (OxaPay integrations ignore it).

Payout webhooks

To the payout's callback_url, signed like payment webhooks but with the payout key: Confirming (sent), then Confirmed, or Failed (rejected and refunded).

{ "track_id": "257810344", "status": "Confirmed", "type": "payout", "tx_hash": "4f1c…", "address": "TJRab…",
  "amount": 20, "value": 20, "currency": "USDT", "network": "Tron Network", "description": "", "date": 1790430000 }

More endpoints

Mainly for OxaPay SDKs and plugins.

Endpoint Key Returns
GET /payment/accepted-currencies merchant {"list": ["USDT", "TRX", "USDC", "BNB", "POL", "SOL"]}
GET /payment/stats merchant Per coin: pay_currency, total (number of payments), received_amount (after the fee, string). Filters: type, network, pay_currency, from_date, to_date
GET /common/currencies none Each coin with its networks (keyed Tron, BSC, Polygon, Solana): required_confirmations, deposit_min, withdraw_fee, withdraw_min, static_fixed_fee
GET /common/prices none USD prices, e.g. {"USDT": 1, "TRX": 0.34, "USDC": 1, "BNB": 778, "POL": 0.12, "SOL": 124}
GET /common/fiats none Fiat currencies with the USD value of one unit: {"EUR": {"symbol": "EUR", "name": "Euro", "price": 1.087, "display_precision": 0.001}, …}
GET /common/networks none The networks switched on: {"list": ["Tron Network", "Binance Smart Chain", "Polygon Network", "Solana Network"]}
GET /common/monitor none {"status": true} when the service is up

Payment webhooks

For each payment to an address with a callback_url, we POST JSON to it:

  1. "status": "Paying": seen on chain and confirming, within seconds. Don't deliver yet.
  2. "status": "Paid": final and credited to your balance. Safe to deliver. Seconds on BSC, a few seconds to a minute on Polygon, ~15 seconds on Solana, 19 blocks (~1 minute) on Tron (TRX on Tron is only seen once final, so its two webhooks arrive together).
  3. "status": "Failed" (not in OxaPay's API): only if a payment you were sent Paying for is reversed by the network before it's final (txs[0].status: "failed", received_amount: 0). Nothing was credited.

Only deliver goods on Paid.

{
  "track_id": "184035117", "status": "Paid", "type": "static_address", "module_name": "PayOwl Wallet",
  "amount": 100, "value": 100, "sent_value": 100, "currency": "USDT",
  "order_id": "customer-42", "email": "", "note": "", "fee_paid_by_payer": 0, "under_paid_coverage": 0, "description": "",
  "date": 1790422100,
  "txs": [{
    "status": "confirmed", "tx_hash": "aa23…11b", "sent_amount": 100, "received_amount": 99, "value": 100, "sent_value": 100,
    "currency": "USDT", "network": "Tron Network", "sender_address": "TJRa…", "address": "TQ9w…", "rate": 1,
    "confirmations": 19, "auto_convert_amount": 0, "auto_convert_currency": "", "date": 1790422100
  }]
}

Verify the signature

The HMAC header is the hex HMAC-SHA512 of the raw request body, keyed with the API key that made the address (payout webhooks: the payout key that made the payout), exactly as OxaPay. Reject anything that doesn't match.

const crypto = require("crypto");
const expected = crypto.createHmac("sha512", MERCHANT_API_KEY).update(rawBody).digest("hex");
if (!crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(String(req.headers["hmac"] || "")))) return res.status(400).end();
import hmac, hashlib
expected = hmac.new(MERCHANT_API_KEY.encode(), raw_body, hashlib.sha512).hexdigest()
if not hmac.compare_digest(expected, request.headers.get("HMAC", "")):
    abort(400)

Answer "ok"

Reply HTTP 200 with the body ok. Otherwise we retry after about 1 minute, 3 minutes, 30 minutes and 3 hours (5 attempts in all). The same payment can reach you more than once: use tx_hash + status to ignore repeats. In the app (Settings → Merchant or Payouts → Webhooks) you can send a signed test webhook, see what your server answered, and resend any webhook.

Tip: set the callback URL on the key, not in each request. In the app (Settings → Merchant → your key → Default callback URL), save your callback URL once and create addresses without callback_url. They use the key's URL, whatever it is at the time: if your server moves, change it there and every address follows at once, old ones included, along with webhooks not delivered yet. An address created with its own callback_url keeps it (move those as below). The same works for payouts, with the payout key's default callback URL.

Address created… After you change the key's callback URL
without callback_url Follows automatically: new payments (and undelivered webhooks) go to the new URL
with its own callback_url Keeps its own URL: move it with Change below, or send the same order_id again with the new callback_url

Your callback URL moved? In the app (Settings → Merchant → Webhooks → Callback URLs), tap Change next to the old URL and enter the new one: every address, payout and key default using it switches, including webhooks not delivered yet (then resend the failed ones in one tap). We send a signed test webhook to the new URL first, so it must answer 200 ok. The addresses themselves don't change. Webhooks already delivered to the old URL aren't sent again.

Errors

{ "data": {}, "message": "network must be one of: …", "error": { "type": "validation_error", "key": "network", "message": "network must be one of: …" }, "status": 400, "version": "1.0.0" }
HTTP status error.type
400 validation_error: error.key names the field
401 authentication_error: missing or wrong key
404 not_found
429 too many requests (120 a minute)
500 server_error