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

# Use the API reference

> Read the public contract generated from the SimplePay gateway.

The reference includes every merchant-key operation. It also includes the protected key lifecycle that requires a Customer session.

## Select a server

| Environment | Base URL                        |
| ----------- | ------------------------------- |
| Sandbox     | `https://api.test.simplepay.mx` |
| Live        | `https://api.simplepay.mx`      |

The host, key, and merchant must belong to the same environment.

## Authenticate the request

Merchant operations use:

```http theme={"theme":{"light":"github-light","dark":"github-dark"}}
Authorization: Bearer your_simplepay_api_key_here
```

`/v1/api-keys` operations use a Customer session and step-up for credential mutations. An API key cannot manage itself.

## Download the contract

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -sS "https://docs.simplepay.mx/en/openapi.json" \
  --output simplepay-openapi.json
```

The bundle excludes auth, onboarding, backoffice, Customer routes, and Zuplo routing metadata.

Each operation declares a unique `operationId`, scopes, request schemas, responses, security, and owner tag.

<Info>
  Repository checks fail when the bundle, manifest, and gateway contract
  diverge.
</Info>
