Quotes

Price a payout from your own balance

Changed on

Prices a conversion from your own stablecoin balance to local currency. Pass the returned id as quoteId on POST /v1/payouts/fiat before expiresAt.

Send fromAmount or toAmount, never both.

  • toAmount is the exact amount the recipient receives. Alfred calculates the USDC owed and returns it in fromAmount, rounded up. toAmount takes at most two decimals and applies to payouts only, from USDC to local currency.
  • fromAmount fixes the USDC you spend, and toAmount comes back as what the recipient receives.

A quote lasts about two minutes and can be used once.

post/v1/quotes

Request

  • Base URL
    https://api.sandbox.alfredpay.io
  • URL
    https://api.sandbox.alfredpay.io/v1/quotes
  • Auth
    • HTTP bearer
    • or API key in header api-key and API key in header api-secret

Headers

Idempotency-Keystring uuid required

Required on every state-changing POST, simulators included; the only exempt POST is …/verifications/preflight. Replay (same key, same body) returns the original response with Idempotent-Replayed: true; same key with a different body → 409 idempotency_conflict. Keys are UUIDs, scoped to the API key, retained for 24 hours.

Request body

fromCurrency'USD' | 'HKD' | 'CNY' | 'MXN' | 'DOP' | 'COP' | 'BRL' | 'ARS' | 'CLP' | 'PEN' | 'BOB' | 'PYG' | 'USDC' | 'USDT' required

Fourteen members, reconciled to the countries a customer can be onboarded in. USDC and USDT are stablecoins and require chain.

toCurrency'USD' | 'HKD' | 'CNY' | 'MXN' | 'DOP' | 'COP' | 'BRL' | 'ARS' | 'CLP' | 'PEN' | 'BOB' | 'PYG' | 'USDC' | 'USDT' required

Fourteen members, reconciled to the countries a customer can be onboarded in. USDC and USDT are stablecoins and require chain.

fromAmountstring

The stablecoin amount to spend.

toAmountstring

The exact amount the recipient receives. Payouts only, from USDC to local currency. A fiat amount takes at most two decimals; three to eight return 422 and more than eight return 400.

chain'SOL' | 'ETH' | 'MATIC' | 'BASE' | 'ARB' | 'OP' | 'AVAX' | 'BNB' | 'TRX' | 'XLM' | 'CELO'

Response

Created

idstring
customerIdstring
fromCurrency'USD' | 'HKD' | 'CNY' | 'MXN' | 'DOP' | 'COP' | 'BRL' | 'ARS' | 'CLP' | 'PEN' | 'BOB' | 'PYG' | 'USDC' | 'USDT'

Fourteen members, reconciled to the countries a customer can be onboarded in. USDC and USDT are stablecoins and require chain.

toCurrency'USD' | 'HKD' | 'CNY' | 'MXN' | 'DOP' | 'COP' | 'BRL' | 'ARS' | 'CLP' | 'PEN' | 'BOB' | 'PYG' | 'USDC' | 'USDT'

Fourteen members, reconciled to the countries a customer can be onboarded in. USDC and USDT are stablecoins and require chain.

fromAmountstring
toAmountstring
chainstring nullable
railstring nullable
ratestring
rateLockedAtstring date-time
expiresAtstring date-time

Typically ~2 minutes. Execute before this or re-quote.

status'active' | 'expired' | 'consumed'

Changes