Skip to main content
Swap BTC into your USDT wallet, or USDT into your BTC wallet. USDT from a swap is always credited to the internal wallet.
Autopayout to an external USDT address is not supported. Swap into your internal USDT wallet first, then withdraw USDT to an external address.
Swap quotes expire in 60 seconds. Pay the Lightning invoice or accept the quote before expiry, or create a new one.

How a swap works

USDT always lands in your internal USDT wallet. There are two ways to pay for a BTC → USDT swap: paymentCurrency controls what amount means. If paymentCurrency is USDTCENT, amount is in USDT cents (1000 = 10 USDT).

BTC → USDT

USDT is credited to your internal wallet. Autopayout to an external address is not supported. amount is in USDT cents because paymentCurrency is USDTCENT.

Pay a Lightning invoice

Omit sourceWallet. The response includes a Lightning invoice. Pay that invoice within 60 seconds. Mavapay credits your internal USDT wallet when the payment is received.
Do not call the accept endpoint for this path. Paying the invoice completes the swap.

Debit your BTC wallet

Pass sourceWallet: "BTC". The response invoice is an internal reference (MAVAPAY_INTERNAL:...). Do not pay it. Accept the quote to debit your BTC wallet.

USDT → BTC

Debits your USDT wallet and credits your internal BTC wallet.
onchainAddress and memo are internal placeholders (MAVAPAY_INTERNAL). Do not send funds to them. Accept the quote to complete the swap.

Accept the swap

Use this only when the quote includes sourceWallet. If you requested a Lightning invoice (no sourceWallet), pay invoice instead. Call Accept Quote with the quote id and the wallet to debit. This must match sourceWallet on the quote. BTC → USDT — debit BTC:
USDT → BTC — debit USDT:
The wallet must cover totalAmountInSourceCurrency (includes fees). If the quote has expired, create a new one.

After a BTC → USDT swap

USDT lands in your internal wallet. To send it on-chain:
  1. Confirm the USDT balance with Get wallets (currency=USDT)
  2. Withdraw to an external address

USDT wallet

Deposit and withdraw USDT

Buy USDT with NGN

Buy USDT using Naira

Accept quote

Debit a wallet and complete a quote

Prefunded payouts

Pay fiat payouts from your USDT wallet