Ask the recipient for their wallet address and network. Both wallets must use the same network. To pay 5 QUARTZ, your wallet must already hold at least 5 QUARTZ.
Send the payment
Section titled “Send the payment”Send this transfer to your network’s API host. Put your address in the path and the recipient’s address in to. Use your transfer token. Generate a fresh UUIDv4 or UUIDv7 for this payment and keep it with the request.
POST /wallets/{address}/transfersAuthorization: Bearer <transfer-token>Idempotency-Key: <payment-key>Content-Type: application/json
{ "to": "<recipient-address>", "asset": { "id": "QUARTZ", "units": "5" }}Verify the payment
Section titled “Verify the payment”On 201 Created, give the recipient the data.public.transaction reference. They can look it up with GET /transactions/{transaction} on the same network. In data.public, check that operation is transfer, from is the payer, to is the recipient, and the asset is 5 units of QUARTZ. Count each transaction reference as one payment.
If the response is lost
Section titled “If the response is lost”Retry promptly with the same request and idempotency key. The key expires three hours after acceptance. If the outcome is still unconfirmed or the key has expired, check your ledger for an entry with the recipient’s address in to, QUARTZ in asset.id, and "-5" in asset.units. Follow meta.pagination.next if you need older entries. Look up its transaction reference. Sending another payment while the first is unresolved could pay the recipient twice.