Swap Pay
Accept crypto payments from your customers with hosted checkout pages, signed webhooks, and a clean REST API. Settlement lands directly on your merchant balance — withdraw on demand.
Quick start
- Sign up at
swapss.loland open the merchant cabinet. - Request merchant access. An operator approves you in minutes.
- Create an API key with the scopes you need.
- Create your first invoice — your customer pays the hosted checkout URL.
Create your first invoice
bash
curl -X POST https://api.swapss.lol/api/v1/merchant/invoices \
-H "Authorization: Bearer sk_live_..." \
-H "Idempotency-Key: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d" \
-H "Content-Type: application/json" \
-d '{
"amount": "5.00",
"currency": "USDT",
"chain": "tron",
"description": "Order #1042",
"order_id": "1042",
"success_url": "https://example.com/thanks",
"fail_url": "https://example.com/oops",
"webhook_url": "https://example.com/swap-pay-webhook"
}'json
{
"id": "INV-0123456789",
"status": "awaiting_deposit",
"pay_in": {
"asset": "USDT",
"chain": "tron",
"address": "TH...example",
"amount_decimal": "5.00",
"amount_raw": "5000000",
"cent_tail": 73
},
"expires_at": "2026-05-16T12:34:56Z",
"payment_url": "https://swapss.lol/pay/INV-0123456789.7c4f...",
"created_at": "2026-05-16T11:34:56Z",
"service_fee_bps": 80
}How the flow works
- Your server creates an invoice via API. We allocate a fresh deposit address on the chosen network and embed a precise amount that identifies this invoice on-chain.
- Send your customer to the
payment_url. They see a branded page with the address, amount, and a live countdown. - Their wallet sends the exact amount. We detect the deposit, count confirmations, and credit your balance net of the service fee.
- You receive a signed webhook on every status change. The hosted
page also redirects to
success_urlafter a paid confirmation. - Withdraw your balance any time via
POST /payouts.
Supported pay-in currencies
| Asset | Network | Memo |
|---|---|---|
| USDT | tron (TRC-20) | — |
| USDT | ethereum (ERC-20) | — |
| USDC | base | — |
| BTC | bitcoin | — |
| ETH | ethereum | — |
| BNB | bsc | — |
Important notes
- Amounts are raw minor units (e.g. USDT decimals = 6,
so 5.00 USDT =
5000000). Use theamountstring with decimal input; we convert at the boundary. Never use floats in your code. - Every write call requires an
Idempotency-Keyheader. Replays return the same response. - Invoices expire 30–60 min after creation (configurable per merchant).
- Wrong-amount / wrong-token / late deposits go to manual review.