> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shakesco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Transfer Tokens

> Move tokens from one customer to another

<span style={{display:"none"}}>For the complete documentation index, see [llms.txt](/llms.txt).</span>

Moves tokens between two of your customers. Both are identified by your own `customer_ref` strings.

<Info>
  Treat this as a transaction. If you don't get a `200 OK`, check both balances before retrying. A successful retry after a successful original transfer doubles the movement.
</Info>

### Request Body

<ParamField body="from_customer_ref" type="string" required>
  Your unique identifier for the sender
</ParamField>

<ParamField body="to_customer_ref" type="string" required>
  Your unique identifier for the receiver
</ParamField>

<ParamField body="amount" type="number" required>
  Number of tokens to transfer. Decimals allowed.
</ParamField>

### Response

<ResponseField name="tx_hash" type="string">
  Reference identifier for the transfer
</ResponseField>

```javascript theme={null}
await fetch("https://tokens.shakesco.com/transfer-tokens", {
  method: "POST",
  headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    from_customer_ref: "customer-123",
    to_customer_ref: "customer-456",
    amount: 5,
  }),
});
```

<ResponseExample>
  ```json 200 OK theme={null}
  { "tx_hash": "0xabc123..." }
  ```

  ```json 400 Insufficient Balance theme={null}
  { "error": "Insufficient token balance" }
  ```
</ResponseExample>
