# Payments AI MoR Developer Docs

> Developer documentation portal for Payments AI MoR.

Welcome to the Payments AI MoR developer portal. Build merchant integrations with sandbox-first workflows, OpenAPI-driven API reference, and in-browser Try It.

## Get started with your coding agent

The fastest way to integrate is to hand your coding agent our machine-readable docs. Paste this
prompt into Claude Code, Cursor or another coding agent:

```text title="Prompt for your coding agent"
Integrate Payments AI MoR checkout into this project.

1. Read https://doc.mor.payments.ai/llms-full.txt,
   the full agent index for Payments AI MoR.
2. Follow https://doc.mor.payments.ai/SKILL.md to connect,
   create a product and plan, and build checkout.
3. Work in Sandbox (pai_test_* keys) until a test payment succeeds.
4. For more detail on a topic, add .md to any docs page URL,
   for example https://doc.mor.payments.ai/quickstart.md.
```

Prefer tools over files? Connect the [MCP server](/mcp). Every machine-readable file is listed on
[For AI agents](/ai-agents).

## What you can do here

- Follow the [Quickstart](/quickstart) to make your first sandbox API call in under 15 minutes
- Read the [Merchant Public API](/public-api) guide for API-key routes (`/v1/public-api/...`)
- Connect Claude or Cursor via the [MCP server](/mcp) (OAuth or User MCP Key)
- Receive signed events via [Webhooks](/webhooks)
- Browse the [API Reference](/api) generated from TypeSpec contracts (Merchant Public API + buyer checkout)
- Use **Try It** on operation pages with sandbox `pai_test_*` Merchant API Keys (live keys blocked by Safe Mode)
- Copy **AI Context** for coding agents (Markdown bundle with OpenAPI + common errors)
- Look up [Fix-It error guides](/errors) linked from API `docUrl` responses

## Auth surfaces

| Surface                                      | Auth                                           | Typical clients                                |
| -------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
| **Merchant Public API** (`/v1/public-api/…`) | Merchant API Key (`pai_test_*` / `pai_live_*`) | Integrations, scripts, agents                  |
| **Buyer checkout** (`/v1/checkout/…`)        | Public (no key)                                | Checkout SPA, embed script, custom elements UI |

## Sandbox vs live

Sandbox and live are separate backends. API keys, products, plans, and hosts must all match:

| Environment | Key prefix   | Base URL                              |
| ----------- | ------------ | ------------------------------------- |
| Sandbox     | `pai_test_*` | `https://sandbox.mor.payments.ai/api` |
| Live        | `pai_live_*` | `https://mor.payments.ai/api`         |

Creating a product with a live key and calling the sandbox API (or the reverse) will not resolve
the plan. Generate sandbox keys in the [dashboard developer tools](https://mor.payments.ai/developer-tools).

[Embedded checkout](/embedded-checkout) uses the same axis: set `environment` to `'sandbox'` or
`'live'` to match how you created the plan.

### Buyer checkout (no API key)

Keyless routes under `/v1/checkout/plans/{planId}` — used by the hosted checkout page and embed script:

| Method | Path                                               | Purpose                                |
| ------ | -------------------------------------------------- | -------------------------------------- |
| `GET`  | `/v1/checkout/plans/{planId}`                      | Plan metadata and customization        |
| `POST` | `/v1/checkout/plans/{planId}/session`              | Hosted checkout session                |
| `POST` | `/v1/checkout/plans/{planId}/confirm`              | Confirm payment (the embed calls this) |
| `GET`  | `/v1/checkout/plans/{planId}/receipts/{receiptId}` | Receipt totals after payment           |

To take payments on your own page, see the checkout guides:

- [Embedded checkout](/embedded-checkout): one plan, no server code
- [Custom amount checkout](/custom-amount-checkout): one price your code works out
- [Order checkout](/multi-item-checkout): several items in one payment

## Machine-readable artifacts

[For AI agents](/ai-agents) lists `llms.txt`, `llms-full.txt`, `SKILL.md`, the Markdown version of
every page and the [public OpenAPI spec](https://doc.mor.payments.ai/openapi-public.json).
