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

  1. Sign up at swapss.lol and open the merchant cabinet.
  2. Request merchant access. An operator approves you in minutes.
  3. Create an API key with the scopes you need.
  4. 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

  1. 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.
  2. Send your customer to the payment_url. They see a branded page with the address, amount, and a live countdown.
  3. Their wallet sends the exact amount. We detect the deposit, count confirmations, and credit your balance net of the service fee.
  4. You receive a signed webhook on every status change. The hosted page also redirects to success_url after a paid confirmation.
  5. Withdraw your balance any time via POST /payouts.

Supported pay-in currencies

AssetNetworkMemo
USDTtron (TRC-20)
USDTethereum (ERC-20)
USDCbase
BTCbitcoin
ETHethereum
BNBbsc

Important notes

  • Amounts are raw minor units (e.g. USDT decimals = 6, so 5.00 USDT = 5000000). Use the amount string with decimal input; we convert at the boundary. Never use floats in your code.
  • Every write call requires an Idempotency-Key header. 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.