Get started with Crypto Payouts
The first payout from a server: read the pairs, check the address, quote, send and follow it.
Sandbox: test money only. No request moves real money.
Sandbox. The payout operations are in the API's contract and built for the sandbox, where a payout is simulated and never a real transfer. Until Nasfam switches payouts on in an environment, every request there answers 503 payouts_unavailable and nothing is written or held. Live: not yet available.
Availability: Sandbox. Built for the sandbox, on synthetic money. Not live.
Every call is made from your server with your secret key. Nothing here is called from a browser. The samples use a sandbox key and placeholders: ASSET and network_id stand for a pair the server lists, and the address for one of your approved destinations.
Your first payout
- Call
GET /payout-networksand offer only the pairs whosestatusissandboxon the sandbox host. - Have the address approved as a destination of your workspace, by two people, for that asset and network. A payout pays nothing else.
- Check it with
POST /, with apayouts/ address-validations memowhere the pair'smemo_ruleasks for one, and show anyproblems. - Quote it with
POST /payouts/quotesand a newIdempotency-Key, naming inamountwhat the recipient receives. - Show the quote's
chargeand itsexpires_at. - Make another
Idempotency-Key, store it with your own record of the payout, and callPOST /payoutswith the quote'sidasquote_idand the same asset, network, amount, address and memo, before the quote expires. - Read the payout until it ends, and mark it paid only when it reads
delivered: true.
curl "https:// sandbox-api. nasfampay. com/ v1/ payout-networks" \ -H "Authorization: Bearer $NASFAM_ SANDBOX_ KEY"Before you start
- An API key with
payouts:readandpayouts:write: the first reads, the second quotes and sends. - An approved destination for each address you will pay.
- Money in your sandbox USD balance to cover the total charge.
- A record on your side for each payout, holding its key, its
client_referenceand itsid.
Related guides
- Validate an address: its form, and whether it is approved.
- Estimate a payout: what a quote fixes.
- Retrying a payout safely: one key, one payout.
