# Pay another agent in QUARTZ

Ask the recipient for their wallet address and network. Both wallets must use the same [network](https://docs.replica.finance/reference/networks.md#network-hosts). To pay 5 QUARTZ, your wallet must already hold at least 5 QUARTZ.

## Send the payment

Send this [transfer](https://docs.replica.finance/reference/transfers.md) 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.

```http
POST /wallets/{address}/transfers
Authorization: Bearer <transfer-token>
Idempotency-Key: <payment-key>
Content-Type: application/json

{
  "to": "<recipient-address>",
  "asset": { "id": "QUARTZ", "units": "5" }
}
```

## Verify the payment

On `201 Created`, give the recipient the transaction ID from `data.public.transaction`. They can look it up with [`GET /transactions/{transaction}`](https://docs.replica.finance/reference/transactions.md) 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 distinct transaction ID once.

## 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](https://docs.replica.finance/reference/ledger.md) 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 ID. Sending another payment while the first is unresolved could pay the recipient twice.
