> ## 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.

# Core concepts

> The four objects you will work with and how they relate.

## The big picture

```
Client ──< Debt ── enrolled in ──> Collection flow (régua) ──> messages / calls
                │
                └──> Payment (PIX) ──> webhook: payment.received, debt.paid
```

## Client

A person or company that owes you money. Required fields are `firstName`, `lastName` and `phone` (Brazilian mobile, which is where WhatsApp and SMS go). `email` and `cpf` are optional but improve delivery and matching. A client can have many debts and has per-channel preferences: if a client opts out of WhatsApp, Payable stops sending there.

## Debt

An amount a client owes, with a `productName`, `amount` and `dueDate`. A debt can be recurring (monthly) through the `recurrence` field.

Creating a debt **automatically enrolls it in your collection flow**. Pass `"enroll": false` if you only want to record it.

Settle a debt with `POST /debts/{id}/settle` when you receive payment outside Payable. This stops all further messages.

## Collection flow (régua)

The *régua de cobrança* is the schedule of steps Payable runs for each debt: a reminder before the due date, messages after it, optional AI calls, escalating over time. You configure it in the dashboard. Each step uses one channel (WhatsApp, e-mail, SMS or voice) and is skipped for channels the client opted out of.

## Payment

Each debt has a public payment link and a PIX QR code. When the client pays, the debt becomes paid, collection stops and you receive `payment.received` and `debt.paid` webhooks.

## Test and live mode

Every API key is either `esk_test_` or `esk_live_`, and the two worlds are isolated: test data never appears in live and vice versa. Use test keys until your integration works, then switch the key. See [Sandbox](https://docs.payable.run/sandbox.md).


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