Skip to content

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 /payouts/address-validations 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

FieldDescription
Assetasset · string · requiredThe 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 · requiredThe network the transfer is made on, one GET /v1/payout-networks lists. An address approved on one network authorises nothing on another.
Addressaddress · string · requiredThe address to check, up to 200 characters.
Memomemo · stringThe text comment the transfer carries, where the destination needs one. Part of the destination's identity.
Code for What you send
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

FieldDescription
Validvalid · boolean · requiredWhether the address is well formed for this asset and network. It says nothing about who owns it.
Addressaddress · string or null · requiredThe address as the network's rules normalise it, or null when it is not valid.
Memo rulememo_rule · string · requiredThe network's rule for a memo.
Destination IDdestination_id · string or null · requiredThe approved, usable destination this address is, or null. A payout pays only an approved destination.
Problemsproblems · array · requiredWhat is wrong: format, checksum, wrong_network, testnet_address, reserved_address, memo_required or memo_not_allowed.

Each of the problems it can find:

ProblemWhat it means
FormatformatIt is not written the way this network writes an address.
ChecksumchecksumIts checksum does not match: a character is probably mistyped.
Wrong networkwrong_networkIt is an address of another network.
Testnet addresstestnet_addressIt is a test network's address.
Reserved addressreserved_addressIt is an address no one can receive at, such as a burn address or a token contract.
Memo requiredmemo_requiredThe network needs a memo and none was sent.
Memo not allowedmemo_not_allowedThe 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.

Code for What it returns
{  "valid": true,  "address": "your-approved-destination-address",  "memo_rule": "forbidden",  "destination_id": "dst_01JD0DEST1NAT10N0000000000",  "problems": []}