Validate an address
Check an address's form for its network, and whether it is an approved destination. A valid address is not a safe one.
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.
POST / reads an address under its network's rules, and says whether it is one of your workspace's approved, usable destinations. It needs payouts:read, moves nothing, and never screens the wallet: a valid address says nothing about who owns it.
What you send
| Field | Description |
|---|---|
| Assetasset · string · required | The asset the recipient receives, one GET /v1/payout-networks lists. Its issuer's own token on the named network, never a bridged one. |
| Networknetwork · string · required | The network the transfer is made on, one GET /v1/payout-networks lists. An address approved on one network authorises nothing on another. |
| Addressaddress · string · required | The address to check, up to 200 characters. |
| Memomemo · string | The text comment the transfer carries, where the destination needs one. Part of the destination's identity. |
curl -X POST "https:// sandbox-api. nasfampay. com/ v1/ payouts/ address-validations" \ -H "Authorization: Bearer $NASFAM_ SANDBOX_ KEY" \ -H "Content-Type: application/ json" \ -d '{ "asset": "ASSET", "network": "network_ id", "address": "your-approved-destination-address" }'What it returns
| Field | Description |
|---|---|
| Validvalid · boolean · required | Whether the address is well formed for this asset and network. It says nothing about who owns it. |
| Addressaddress · string or null · required | The address as the network's rules normalise it, or null when it is not valid. |
| Memo rulememo_ | The network's rule for a memo. |
| Destination IDdestination_ | The approved, usable destination this address is, or null. A payout pays only an approved destination. |
| Problemsproblems · array · required | What is wrong: format, checksum, wrong_network, testnet_address, reserved_address, memo_required or memo_not_allowed. |
Each of the problems it can find:
| Problem | What it means |
|---|---|
| Formatformat | It is not written the way this network writes an address. |
| Checksumchecksum | Its checksum does not match: a character is probably mistyped. |
| Wrong networkwrong_ | It is an address of another network. |
| Testnet addresstestnet_ | It is a test network's address. |
| Reserved addressreserved_ | It is an address no one can receive at, such as a burn address or a token contract. |
| Memo requiredmemo_ | The network needs a memo and none was sent. |
| Memo not allowedmemo_ | The network carries no memo and one was sent. |
A destination_id of null means the address is not approved: a quote or a payout to it is refused with destination_not_approved. A pair the server does not list is refused with network_not_supported.
{ "valid": true, "address": "your-approved-destination-address", "memo_ rule": "forbidden", "destination_ id": "dst_ 01JD0DEST1NAT10N0000000000", "problems": []}Related guides
- Supported pairs: the
memo_ruleof each pair. - Screening and approved destinations: who may be paid.
- Estimate a payout: the next step.
