# API Reference

> The full MutoPay API reference. Interactive Scalar viewer plus the raw OpenAPI 3.1 spec for generating clients or piping into tooling.

Source: https://mutopay.com/docs/api-reference/
Language: en

---

MutoPay publishes an OpenAPI 3.1 specification. Use it interactively, or pipe it into your codegen tool of choice.

## Interactive reference

[**mutopay.com/api/docs**](https://mutopay.com/api/docs): Scalar-powered browser UI. Try endpoints live with your own API key, inspect request/response schemas, and copy cURL snippets.

## Raw OpenAPI spec

[**mutopay.com/api/openapi.json**](https://mutopay.com/api/openapi.json): OpenAPI 3.1 JSON. Point any client generator at this URL.

```bash
# Example: generate a TypeScript client
npx @hey-api/openapi-ts -i https://mutopay.com/api/openapi.json -o ./src/mutopay-client

# Example: generate a Python client
openapi-python-client generate --url https://mutopay.com/api/openapi.json
```

## Authentication in the spec

Two security schemes are declared:

| Scheme | Use |
|---|---|
| `X-API-Key` (channel keys, prefix `ep_`) | Payment creation |
| `Bearer` (master keys, prefix `msk_`) | Account management under `/api/merchant/*` |

Most codegen tools will surface these as typed parameters on the generated client. See [Authentication](/docs/authentication/) for the plain-English explanation of when to use which.

## Base URL

```
https://mutopay.com
```

There is no separate sandbox host. Use a **Test channel** (API key prefix `ep_test_`) against the same base URL. Test channels skip all chain interaction and let you simulate payment outcomes from the hosted page. See [Getting Started → Test before you go live](/docs/getting-started/#test-before-you-go-live).

## Prefer plain docs?

- [Getting Started](/docs/getting-started/): end-to-end walkthrough.
- [Create a Payment](/docs/create-payment/): the most common endpoint, with full examples.
- [Webhooks](/docs/webhooks/): event reference.
- [llms-full.txt](/llms-full.txt): every doc on this site, concatenated and LLM-ready.
