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

# API overview

> Public Meum Merchant API v1. Integrate without the Dashboard.

## Base URL

```
https://api.meum.io
```

## Authentication

Store-scoped API key: `Authorization: Bearer sk_live_...`

See [API keys and scopes](/api-reference/api-keys-and-scopes).

List endpoints use cursor pagination (`cursor`, `limit`). See OpenAPI per route.

## Public resource IDs

Merchant API responses use prefixed opaque IDs, never internal UUIDs:

| Prefix                  | Resource                               |
| ----------------------- | -------------------------------------- |
| `inv_`                  | Invoice                                |
| `txn_`                  | Payment transaction                    |
| `plink_`                | Payment link (merchant API)            |
| `plpub_`                | Payment link buyer URL / public routes |
| `wh_` / `whd_` / `evt_` | Webhook endpoint / delivery / event    |
| `int_`                  | Integration                            |

Tokens are **32 lowercase hex characters** after the prefix (128-bit). See [Payment Links API](/api-reference/payment-links) for `plink_` vs `plpub_`.

## Domains

| Domain        | Prefix                        | Description                             |
| ------------- | ----------------------------- | --------------------------------------- |
| Invoices      | `/v1/invoices`                | Create, list, read, cancel, poll status |
| Transactions  | `/v1/transactions`            | Read-only on-chain payment ledger       |
| Payment Links | `/v1/payment-links`           | Create and manage pay links (API key)   |
| Webhooks      | `/v1/webhook-endpoints`       | Developer webhook endpoint management   |
| Integrations  | `/v1/integration/woocommerce` | WooCommerce connect, disconnect, status |

## Public merchant endpoints (summary)

| Method                | Path                                     | Scope                    |
| --------------------- | ---------------------------------------- | ------------------------ |
| GET                   | `/health`                                | None                     |
| GET                   | `/v1/invoices`                           | `invoices:read`          |
| POST                  | `/v1/invoices`                           | `invoices:write`         |
| GET                   | `/v1/invoices/{id}`                      | `invoices:read`          |
| GET                   | `/v1/invoices/{id}/status`               | `invoices:read`          |
| POST                  | `/v1/invoices/{id}/cancel`               | `invoices:write`         |
| GET                   | `/v1/invoices/{id}/transactions`         | `transactions:read`      |
| GET                   | `/v1/transactions`                       | `transactions:read`      |
| GET                   | `/v1/transactions/{id}`                  | `transactions:read`      |
| GET                   | `/v1/transactions/by-hash/{hash}`        | `transactions:read`      |
| POST                  | `/v1/payment-links`                      | `payment_links:write`    |
| GET                   | `/v1/payment-links`                      | `payment_links:read`     |
| GET/PATCH             | `/v1/payment-links/{id}`                 | read/write               |
| POST                  | `/v1/payment-links/{id}/activate`        | `payment_links:write`    |
| POST                  | `/v1/payment-links/{id}/deactivate`      | `payment_links:write`    |
| POST                  | `/v1/integration/woocommerce/connect`    | `woocommerce:connect`    |
| POST                  | `/v1/integration/woocommerce/disconnect` | `woocommerce:disconnect` |
| GET                   | `/v1/integration/woocommerce/status`     | API key (store)          |
| POST/GET/PATCH/DELETE | `/v1/webhook-endpoints`                  | `webhooks:*`             |

Full schemas: OpenAPI reference generated from `openapi.yaml`.

## Browser-facing (not API key management)

These routes are for checkout UIs, not server integration:

* `/v1/checkout/*`: Hosted checkout session
* `/v1/public/payment-links/*`: Buyer pay-link page and checkout

## Not in public API

* Merchant Admin session APIs (JWT login at app.meum.io)
* `/v1/customers`: **Not available** (see [Customers](/api-reference/customers))

## Examples

### List invoices (cURL)

```bash theme={null}
curl "https://api.meum.io/v1/invoices?status=paid&limit=20" \
  -H "Authorization: Bearer sk_live_EXAMPLE_DO_NOT_USE"
```

### Create payment link with idempotency (Node.js)

```javascript theme={null}
const response = await fetch("https://api.meum.io/v1/payment-links", {
  method: "POST",
  headers: {
    Authorization: "Bearer sk_live_EXAMPLE_DO_NOT_USE",
    "Content-Type": "application/json",
    "Idempotency-Key": "plink-create-order-1048-v1",
  },
  body: JSON.stringify({
    title: "Consulting fee",
    amount_mode: "fixed_amount",
    amount: "250.00",
    allow_multiple_payments: false,
  }),
});
```

### WooCommerce status (PHP)

```php theme={null}
$response = wp_remote_get('https://api.meum.io/v1/integration/woocommerce/status', [
    'headers' => ['Authorization' => 'Bearer ' . $api_key],
    'timeout' => 15,
]);
$status = json_decode(wp_remote_retrieve_body($response), true);
```
