# DePix App

> Non-custodial Pix payment gateway on the Liquid Network. Accept Pix payments
> (checkouts and products), on-ramp BRL to DePix and off-ramp DePix to Pix —
> all via a REST API with API-key auth. Sandbox keys (`sk_test_`) work out of
> the box; `simulate-payment` completes test checkouts without real money.

DePix App never holds user funds or private keys: the API returns Pix QR codes
and Liquid deposit addresses, and all signing happens client-side. Amounts are
integer BRL cents. The payer's CPF/CNPJ (`payer_tax_number` / `taxNumber`) is
required on money-moving endpoints. Naming: **DePix** is the BRL-pegged
stablecoin on the Liquid Network; **DePix App** is this gateway service, built
on top of it.

Key facts:
- API base URL: https://api.depixapp.com/api
- Auth header: `Authorization: Bearer sk_test_...` (or `sk_live_...`)
- API keys have scopes: `merchant_read` (read checkouts/products/account),
  `merchant_write` (create charges + product CRUD), `wallet_read` (deposit/withdrawal
  status) and `wallet_write` (on/off-ramp money movement; never granted by default)
- Idempotency: send an `Idempotency-Key` header on POST /api/deposit, /api/withdraw, /api/checkouts
- Errors: structured `error: { code, message, request_id, retry_after?, docs_url }`
  alongside the legacy `response.errorMessage` (Portuguese)
- Rate limits return 429 with `Retry-After`; every response carries `X-Request-Id`
- Webhooks are HMAC-signed (`X-DePix-Signature: t=<ts>,v1=<hmac-sha256>`):
  checkout.* events for all merchants, plus deposit.*/withdraw.* events for
  API-key operations; status can also be polled via `GET /api/deposits/:id`
  and `GET /api/withdrawals/:id` (terminal deposit status: `depix_sent`;
  full status enums in the docs and OpenAPI)

## Docs

- [API reference (Markdown)](https://depixapp.com/docs.md): full API documentation, agent-friendly
- [OpenAPI 3.1 specification](https://depixapp.com/openapi.json): machine-readable schema of every public endpoint
- [Agent manifest](https://depixapp.com/.well-known/agent.json): capabilities, auth and endpoints summary
- [API reference (HTML, English)](https://depixapp.com/docs/en/): human-readable, code examples in 8 languages
- [API reference (HTML, Portuguese)](https://depixapp.com/docs/): versão em português

## Agent wallet SDK

For autonomous agents that hold their own funds, there is a companion
non-custodial wallet SDK, **`@depixapp/sdk`** (TypeScript, ESM, AGPL-3.0). It is
wallet-first and intent-based: the agent creates/restores a wallet from a seed
it controls, then calls `convert()`, `quote()`, `send()`, `receive()`,
`deposit()` and `withdraw()`. Routing (SideSwap / Boltz / SideShift), settlement
and crash-recovery are built in — no provider streams to drive, no polling loops
to write. It also ships an MCP server, `depix-wallet-mcp`, exposing the wallet as
tools (`wallet_convert`, `wallet_quote`, `wallet_send`, …). This gateway API is
the Pix on/off-ramp and merchant side; the SDK is the agent-side wallet that
holds funds/keys and signs client-side. Install it with `npm install @depixapp/sdk`.

- [npm package](https://www.npmjs.com/package/@depixapp/sdk): `npm install @depixapp/sdk`
- [Agent SDK repository](https://github.com/depixapp/depix-sdk): source, README and usage
- [Agent SDK manifest (AGENTS.md)](https://raw.githubusercontent.com/depixapp/depix-sdk/main/AGENTS.md): start-here guide for agents — routing table, units, examples

## Optional

- [Full documentation in one file](https://depixapp.com/llms-full.txt): llms.txt plus the entire Markdown API reference inline
- [BTCPay Server plugin](https://depixapp.com/btcpay/en/): accept DePix in BTCPay
- [Blog](https://depixapp.com/blog): product updates (Portuguese)
