Skip to main content
This guide covers how to create a prefunded quote and settle it using your internal wallet balance. A prefunded quote is identical to a standard quote — the only difference is the sourceWallet field, which tells Mavapay to deduct the source amount directly from your internal wallet instead of expecting an external bank transfer or Lightning payment.

Prefunded Quote Flow

Performing a prefunded payout is a two-step process: Requesting a Quote and Accepting the Quote from your Wallet.

Step 1: Create a Prefunded Quote

The quote endpoint calculates the exchange rate and fees. The request is the same as a standard quote, with one addition: the sourceWallet field.
The sourceWallet field is the only difference between a prefunded quote and a regular quote. It specifies which internal wallet to debit for the source amount. The value must correspond to the sourceCurrency in the quote body (e.g. USDTCENTUSDT, BTCSATBTC, NGNKOBONGN).

Step 2: The Quote Response

Mavapay returns a quote object. Key field to note:
  • id — Use this when accepting the quote from your wallet.
Note: Quotes are typically valid for 5–10 minutes. You must accept before the expiry timestamp.

Step 3: Accept and Settle from Wallet

To finalize the payout, call the accept endpoint. This will immediately deduct the totalAmountInSourceCurrency from your internal wallet and process the payout to the beneficiary.
  • Endpoint: POST .../wallet/payout/{quoteId}/accept
  • Payload: The sourceWallet value must match the one used in the original quote.
200 Response:
400 Response (Insufficient Balance):

Key Considerations

  • Sufficient Balance: Ensure your internal wallet has enough funds to cover the totalAmountInSourceCurrency (which includes fees).
  • Rate Volatility: Because exchange rates change rapidly, the quote id is short-lived. If it expires, you must generate a new quote.
  • Denominations: All amounts are in the lowest denomination (cents for USDTCENT, kobo for NGNKOBO, satoshis for BTCSAT).