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

# Quickstart

> Make your first integration in 5 minutes with a test key.

You will create a client and a debt, generate a PIX payment and simulate it being paid. Test mode sends no real messages and costs nothing.

**1. Create a test API key**

In the dashboard go to **Settings → API & Webhooks → Create key** and choose **Test** mode.

Copy the `esk_test_...` key now, it is shown only once.

**2. Create a client**

```bash theme={null}
curl -X POST "https://api.payable.run/api/v1/clients" \
  -H "Authorization: Bearer esk_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "João",
    "lastName": "Silva",
    "phone": "11999999999",
    "email": "joao@company.com"
  }'
```

Keep the `id` from the response.

**3. Create a debt**

```bash theme={null}
curl -X POST "https://api.payable.run/api/v1/debts" \
  -H "Authorization: Bearer esk_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "clientId": "CLIENT_ID",
    "productName": "March subscription",
    "amount": 150.00,
    "dueDate": "2026-03-15"
  }'
```

The debt is **enrolled in your collection flow automatically**. In test mode its messages are simulated.

**4. Generate the PIX payment**

```bash theme={null}
curl -X POST "https://api.payable.run/api/v1/pix/generate-for-debt/DEBT_ID"
```

This endpoint is public (it powers the customer's payment page), so it needs no key. Keep the payment `id`.

**5. Simulate the payment**

```bash theme={null}
curl -X POST "https://api.payable.run/api/v1/test/payments/PAYMENT_ID/simulate-paid" \
  -H "Authorization: Bearer esk_test_YOUR_KEY"
```

Only works with test keys. The debt becomes paid and your webhooks receive `payment.received` and `debt.paid` with `"live": false`.

## Next steps

> **[Register a webhook](https://docs.payable.run/webhooks.md)**

> **[Go live](https://docs.payable.run/sandbox.md#going-live)**

> **[Handle errors](https://docs.payable.run/errors.md)**

> **[API reference](https://docs.payable.run/api-reference/introduction.md)**


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