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

# Introduction

> Integrate Demat Escrow with the secret key API: customers, checkout, holds, release, and payouts.

Welcome to the Demat Escrow developer docs. Use the **secret key API** your backend calls with `sk_test_` / `sk_live_`. Create customers, take checkout payments, lock money in a hold, release or refund that hold, and send payouts to a bank.

> [!NOTE]
>
> Create a merchant account in [Demat](https://merchant.demat.shop), complete onboarding, and copy your **test secret key** (`sk_test_...`). Use test keys until your account is verified and you are ready to go live.

## Quick start

> **[How it works](/guides/how-it-works)**
>
> Full lifecycle: customers, hold, fund, release or refund, then payout.

> **[Authentication](/guides/authentication)**
>
> Secret keys, test vs live, and Bearer auth.

> **[Webhooks](/guides/webhooks)**
>
> Verify signatures and handle escrow, payment, and payout events.

> **[API Reference](/api-reference)**
>
> Interactive endpoints from the live OpenAPI spec.

## What you can build

| Goal | Start here |
| - | - |
| Hold money between a payer and a payee | [How it works](/guides/how-it-works) |
| Fund a hold via hosted checkout | [Callback URL](/guides/callback-url) + `POST /checkout/sessions` |
| Get notified when money moves | [Webhooks](/guides/webhooks) |
| Quote fees before you charge | [Fees](/guides/fees) |
| Understand request format and envelopes | [API basics](/guides/api-basics) |

## Before you call the API

1. Read [How it works](/guides/how-it-works) for statuses, who the money belongs to, and which webhook to wait for.
2. Authenticate with your secret key. See [Authentication](/guides/authentication).
3. Use [Idempotency](/guides/idempotency) on `POST`s that move money.
4. Prefer webhooks over polling. See [Webhooks](/guides/webhooks) and [Rate limits](/guides/rate-limits).

All requests must be made over **HTTPS**. For base URLs, response envelopes, and money units, see [API basics](/guides/api-basics).


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