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

# Sessions

> Declare checkout, payout, transfer, or refund intent before executing funds movement.

A **session** records intent to move money. Create the right session type, then [execute](/api/executions) before it expires.

**Try in API Reference:** [Checkout](/api-reference/sessions/create-checkout-session) · [Payout](/api-reference/sessions/create-payout-session) · [Transfer](/api-reference/sessions/create-transfer-session) · [Refund](/api-reference/sessions/create-refund-session)

## Session types

| Type     | Endpoint                     | Use with execution               |
| -------- | ---------------------------- | -------------------------------- |
| Checkout | `POST /v1/sessions/checkout` | `POST /v1/executions/collection` |
| Payout   | `POST /v1/sessions/payout`   | `POST /v1/executions/payout`     |
| Transfer | `POST /v1/sessions/transfer` | `POST /v1/executions/transfer`   |
| Refund   | `POST /v1/sessions/refund`   | `POST /v1/executions/refund`     |

Checkout sessions require `source_id` + `source_type` (`INVOICE` or `ORDER`).

## Session lifetime

Sessions are short-lived. Create a session immediately before execute — do not cache session IDs across user sessions.

| Session type      | Typical use                                                            |
| ----------------- | ---------------------------------------------------------------------- |
| Checkout          | Created when customer starts payment; execute collection before expiry |
| Payout            | Response includes `expires_at` — execute payout before that timestamp  |
| Transfer / Refund | You provide `expires_at` on create                                     |

If execute returns session errors, see [Session expired](/knowledge-base/session-expired-or-invalid).

## Minimal example (checkout)

```bash theme={null}
curl -X POST "https://api.heydollr.app/v1/sessions/checkout" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"source_id": 101, "source_type": "INVOICE"}'
```

## Related

* [Sessions & executions (concept)](/concepts/sessions-and-executions)
* [Integration guide](/guides/integration)
