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

# Sandbox

> Test the whole loan flow end to end without moving real money.

The sandbox runs the same Lending API and rules as production, with simulated partners in place of the credit line and the credit bureau. No real money moves: your platform performs and confirms each instruction against its own test accounts.

## What is simulated

| Area | In the sandbox |
| - | - |
| Base URL and credentials | Sent to you with your sandbox client id and secret |
| Accounts | Only invited accounts can apply; others are declined with `PRG_NOT_INVITED`. We invite the test `partner_account_id` values you send us. |
| Income | A deposit counts as income only when its payer is recognised. Use `payer_name: "ACME PAYROLL SAS"` on income deposits, or send us your test payer names to add. |
| Credit line | Each draw is approved and settles within seconds, so `pay_out` follows `hold.placed` without a manual step. |
| Credit bureau | A clean report, unless the `national_id` contains `bureaufail`, which reports one debt 45 days late and declines the loan. |
| Platform income | The verification step is simulated. |
| Pricing | Interest and limits are test values, not your program's terms. |
| Event signatures | `POST /v1/events` takes the bearer token only; partner signatures are not checked yet. |

## A first end-to-end run

**1. Get a token**

`POST /v1/oauth/token` with your sandbox client id and secret.

**2. Apply**

Apply for an invited account with six months of `ACME PAYROLL SAS` income deposits. Expect 201 with an offer.

**3. Accept**

Accept the offer with a fresh copy of the data. Expect `step: funding` and a loan in `pending_disbursement`.

**4. Place the hold**

Read `GET /v1/loans/{loan_id}` every 30 seconds until `place_hold` is listed, then confirm it with `hold.placed`.

**5. Pay out**

Read again until `pay_out` is listed, then confirm it with `payout.confirmed`. The loan becomes `current` and carries `deduction` version 1.

**6. Repay and release**

Report a `deposit.settled` that deducts the full amount due. A minute later the loan is `repaid` and lists `release_hold`; confirm it with `hold.released`.


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