> Solana Developer Platform docs, served as Markdown. The [docs index](https://platform-beta.solana.com/docs.md) lists every page and [llms.txt](https://platform-beta.solana.com/docs/ai/llms.txt) the key ones; [SKILL.md](https://platform-beta.solana.com/SKILL.md) has the rules for building on SDP.

# Payment with memo

Attach an order id, invoice number or customer reference to an SDP transfer with the memo field.

Set `memo` on `POST /v1/payments/transfers` to store a note of up to 256 characters with the transfer. SDP returns it whenever you read or list that transfer, so your reconciliation can map each transfer back to a row in your own database.

## When to use a memo

Use a memo for a correlation value your backend already has when it sends the payment:

- **Order or invoice ids**: `order_2026-05-14_4837`, so the transfer ties to a checkout row.
- **Customer references**: your customer or account id, for support and reconciliation.
- **Run ids**: one payout run's id across many outbound transfers.

SDP stores the memo on its own record. It does **not** add a Solana memo instruction to the transaction, so block explorers don't show it. See [Memos and Solana Pay references](#memos-and-solana-pay-references) for on-chain correlation.

## API usage

**curl**

```bash title="Terminal"
curl -X POST https://api.solana.com/v1/payments/transfers \
  -H "Authorization: Bearer sf_..." \
  -H "Idempotency-Key: order-2026-05-14-4837" \
  -H "Content-Type: application/json" \
  -d '{
    "sourceCustodyWalletId": "cwlt_123",
    "destination": "7xKXz...9fGh",
    "token": "9aBCd...4eEf",
    "amount": "100.00",
    "memo": "order_2026-05-14_4837"
  }'
```

**TypeScript**

```typescript title="send-payment-with-memo.ts"
const response = await fetch(
  "https://api.solana.com/v1/payments/transfers",
  {
    method: "POST",
    headers: {
      "Authorization": "Bearer sf_...",
      "Idempotency-Key": "order-2026-05-14-4837",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      sourceCustodyWalletId: "cwlt_123",
      destination: "7xKXz...9fGh",
      token: "9aBCd...4eEf",
      amount: "100.00",
      memo: "order_2026-05-14_4837",
    }),
  }
);
const { data } = await response.json();
```

**Java**

```java title="SendPaymentWithMemo.java"
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.solana.com/v1/payments/transfers"))
    .header("Authorization", "Bearer sf_...")
    .header("Idempotency-Key", "order-2026-05-14-4837")
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString("""
        {
          "sourceCustodyWalletId": "cwlt_123",
          "destination": "7xKXz...9fGh",
          "token": "9aBCd...4eEf",
          "amount": "100.00",
          "memo": "order_2026-05-14_4837"
        }"""))
    .build();
```

The memo comes back on the transfer:

```json title="response.json"
{
  "data": {
    "transfer": {
      "id": "xfr_...",
      "memo": "order_2026-05-14_4837",
      "status": "finalized",
      "signature": "5xR1...",
      ...
    }
  }
}
```

`memo` takes up to 256 characters of UTF-8 text. Sanitize it on the way in if your downstream systems are stricter.

## Memos and Solana Pay references

A **Solana Pay reference** is the other way to correlate a payment: a unique public key per order, added to the transfer instruction. Anyone can then find and verify the payment on chain without SDP's database, and the payer can build the transfer from a Solana Pay URL.

SDP uses references for dashboard [payment requests](/docs/payments/accept-overview#payment-requests): each request gets its own, and SDP watches it to see when the request is paid. A transfer you send through the API carries no reference, and transfer records don't expose one. To read a reference from any transaction, fetch it from Solana RPC by its `signature`.

Rule of thumb: use a memo when **you** send the transfer (payouts, internal moves), and a reference when **someone else** does (customer checkout, donations).

## Finding transfers by memo

`GET /v1/payments/transfers` and `GET /v1/payments/transfers/{transferId}` return `memo`. To find transfers by memo, pass `search` with 3 or more characters: it matches part of the memo, as well as ids, signatures, addresses and counterparty names. See [Indexing and reconciliation](/docs/payments/accept-indexing) for query patterns.

## Related

- [Basic payment](/docs/payments/send-basic-payment): the transfer endpoint.
- [Payouts and disbursements](/docs/payments/send-payouts): tag every transfer in a run with one memo.
- [Accept overview](/docs/payments/accept-overview): payment requests and references for inbound payments.
