# Introduction (/docs)

> Pre-release: the public API is not live yet and has no base URL. Routes and fields are in the OpenAPI contract, at /openapi.yaml.

What the API does, the conventions it follows, and how to read these docs.

Xase is a payments platform for people who sell online. The first version accepts PIX only: you create a charge, the payer pays the QR code, and the platform tells your server when the money arrives. When you need to give the money back, you refund the charge. To sell without building a payment page, you create an offer and share the address of its checkout.

## What the first version covers [#what-the-first-version-covers]

| Resource | What it does | Page |
|---|---|---|
| Charges | Create, read and list PIX charges | [Charges](/docs/charges) |
| Refunds | Send the amount of a paid charge back to the payer | [Refunds](/docs/refunds) |
| Disputes | Follow a payment that the payer disputed at their bank | [Disputes](/docs/disputes) |
| Offers | Put something on sale at a fixed price, with a checkout page that creates the charges | [Offers](/docs/offers) |
| Balance | Read what the sales left: available, pending, held by a dispute and on its way out | [Balance](/docs/balance) |
| Webhooks | Notify your server of every state change | [Webhooks](/docs/webhooks) |
| Test mode | Run the whole integration without real money | [Test mode](/docs/test-mode) |

The statement and the payouts are in the dashboard, under **Saldo**. They are not part of the API, and have no page here.

## The contract [#the-contract]

The API is described by an OpenAPI 3.1 document, served at [`/openapi.yaml`](/openapi.yaml). It is the source of truth for routes, fields and limits. These pages explain behavior and point to it.

- A request with a field, a query parameter or a route that is not in the contract is refused.
- A response may gain fields over time. Ignore the ones you do not know.

## Conventions [#conventions]

- **HTTP and JSON**, under the `/v1` prefix. No SDK is required.
- **Money is an integer number of cents.** BRL 10.00 is `1000`. Never a floating-point number.
- **Time is UTC**, in the RFC 3339 format.
- **Identifiers carry a type prefix**, such as `chg_…` for a charge. See [Identifiers](/docs/charges#identifiers).
- **Every response carries the request id** in the `X-Request-Id` header. Quote it when asking for support.
- **Errors use `application/problem+json`** (RFC 9457), and your code reads the `code` member. See [Errors](/docs/errors).
- **Creating a charge and asking for a refund are idempotent**: both require the `Idempotency-Key` header. See [Idempotency](/docs/charges#idempotency).

## For AI agents [#for-ai-agents]

Everything in the HTML pages is also served as plain text:

| File | Content |
|---|---|
| [`/llms.txt`](/llms.txt) | Index with a link to the Markdown of every page |
| [`/llms-full.txt`](/llms-full.txt) | Every page in a single file |
| `<page>.md` | The Markdown of one page, such as [`/docs/charges.md`](/docs/charges.md) |
| [`/openapi.yaml`](/openapi.yaml) | The OpenAPI contract |

A request to any page with the header `Accept: text/markdown` gets the Markdown instead of the HTML.

An agent can also call the API itself, through the [MCP server](/docs/mcp): every operation of the contract is a tool.