πŸ’΅ Merchant Payments

QR Code Generation & Payment Management

POST /api/agent-merchant/payment/qr-calculate POST /api/agent-merchant/payment/qr-generate

πŸ” Authentication Required (Bearer Token)

πŸ“‹ Request Body Parameters:

amount number Required Payment amount in the merchant’s account currency (country / fiat code from profile, e.g. MYR, THB)β€”not the crypto token.
currency string Optional On-chain settlement token symbol (USDT, USDC, DAI, …) for the selected network. Not your MYR/THB code. Use asset_id when two contracts share a symbol.
type string Optional QR type: "custom" or "fixed"
network string Optional "bsc", "polygon", or "tron". Default: bsc. On-chain token comes from asset_id or the settlement-token currency field.
asset_id string Optional Stable id from GET /api/agent-merchant/payment/supported-assets

Generate Payment QR Code

Chain for the deposit QR. Polygon/Tron options are disabled if those rails are off in server config. Pick the settlement token below (or Settlement asset for an exact contract / rail gas).
Optional. Populated from your enabled payment assets for the selected network. Use when multiple tokens are enabled on the same chain.
Loading your account currency (MYR, THB, …) from the server…
Token the payer sends on the selected chain (USDT, USDC, DAI, …). This is what the API currency field represents. Your amount above is always in your account / country currency, not in this token.
Leave empty to use merchant default markup.
GET /api/agent-merchant/payment/history

πŸ” Authentication Required (Bearer Token)

πŸ“‹ Query Parameters:

status string Optional Filter by status (pending, completed, failed)
start_date string Optional Start date (YYYY-MM-DD)
end_date string Optional End date (YYYY-MM-DD)

Payment History

GET /api/agent-merchant/payment/statistics

πŸ” Authentication Required (Bearer Token)

No parameters - Returns payment statistics (total received, fees, net income, counts)

Payment Statistics

POST /api/agent-merchant/payment/transfer

πŸ” Authentication Required (Bearer Token)

πŸ“‹ Request Body Parameters:

amount number Required Transfer amount
currency string Optional Currency (default: USDT)
to_address string Required Recipient wallet address
description string Optional Transfer description

Transfer Funds