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

# Quickstart

> Create a customer, take a deposit, and move money — in four calls

This walks through the smallest real integration: one customer, one
deposit address, one transaction. Every example uses a **test** key
(`kp_test_…`) against KeyPair's testnet — nothing here touches mainnet
funds.

> [!NOTE]
>
> Every mutating call below takes an `idempotencyKey`. Derive it from your
> own domain object — an order id, a signup id — never generate it
> randomly. See [Idempotency](https://docs.tetlith.com/concepts/idempotency.md) for why that matters
> the first time a request times out.

**1. Create a customer**

```bash cURL theme={null}
curl https://api.keypair.io/v1/entities \
  -H "Authorization: Bearer $KEYPAIR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "externalId": "user_8213",
    "displayName": "Amaka Obi",
    "idempotencyKey": "onboard-user_8213"
  }'
```

```json Response theme={null}
{
  "id": "5b6f8e2a-…",
  "externalId": "user_8213",
  "displayName": "Amaka Obi",
  "status": "active"
}
```

**2. Open an account and issue a deposit address**

```bash cURL theme={null}
curl https://api.keypair.io/v1/entities/5b6f8e2a-…/accounts \
  -H "Authorization: Bearer $KEYPAIR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "asset": "USDC_TRON" }'
```

```bash cURL (deposit address) theme={null}
curl https://api.keypair.io/v1/entities/5b6f8e2a-…/address \
  -H "Authorization: Bearer $KEYPAIR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "asset": "USDC_TRON" }'
```

```json Response theme={null}
{ "address": "TXYZ…", "chain": "tron", "asset": "USDC_TRON" }
```

Send this address to your customer, or render it as a QR code. Once
the chain confirms a deposit, you'll get a `deposit.confirmed`
[webhook](https://docs.tetlith.com/webhooks/overview.md) and the balance lands in their account —
no polling required.

**3. Move money**

Balances move out with a single signed request, to another customer
of yours (`toEntityId`) or to a blockchain address (`toAddress`) — see
[Authentication](https://docs.tetlith.com/authentication.md) for why moving money is signed
rather than bearer-only.

```bash cURL theme={null}
curl https://api.keypair.io/v1/transactions \
  -H "x-keypair-key-id: $KEYPAIR_KEY_ID" \
  -H "x-keypair-timestamp: $TIMESTAMP" \
  -H "x-keypair-nonce: $NONCE" \
  -H "x-keypair-signature: $SIGNATURE" \
  -H "Content-Type: application/json" \
  -d '{
    "fromEntityId": "5b6f8e2a-…",
    "asset": "USDC_TRON",
    "amount": "500000",
    "toAddress": "TDestinationAddress00000000000000",
    "idempotencyKey": "payout-order_9821"
  }'
```

**4. Check the balance**

```bash cURL theme={null}
curl https://api.keypair.io/v1/accounts/balance?accountId=… \
  -H "Authorization: Bearer $KEYPAIR_KEY"
```

Amounts are always **signed integer strings in minor units** — see
why in [Idempotency & amounts](https://docs.tetlith.com/concepts/idempotency.md).

## Next

> [card] [Every event you can receive](https://docs.tetlith.com/webhooks/overview.md)
>
> `deposit.confirmed`, `withdrawal.finalised`, and four others — with the
> exact payload for each.

The full set of endpoints, grouped the same way as this guide, is in the
**API Reference** tab above.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.