> ## 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 endpoints and base URL.

## Base URL

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

## Public merchant endpoints

| Method | Path                                     | Description            |
| ------ | ---------------------------------------- | ---------------------- |
| GET    | `/health`                                | Service health check   |
| POST   | `/v1/invoices`                           | Create invoice         |
| GET    | `/v1/invoices/{id}`                      | Get invoice            |
| GET    | `/v1/invoices/{id}/status`               | Poll invoice status    |
| POST   | `/v1/integration/woocommerce/connect`    | Connect WooCommerce    |
| POST   | `/v1/integration/woocommerce/disconnect` | Disconnect WooCommerce |

## Not included in public API

The following are **internal** and not documented in this reference:

* `/v1/dashboard/*` — Merchant dashboard (JWT)
* `/v1/platform-admin/*` — Platform administration (JWT)
* `/v1/checkout/*` — Hosted checkout session (browser-facing)
* `/v1/public/payment-links/*` — Pay Link checkout (browser-facing)

## OpenAPI specification

Full schema: see generated reference from `openapi.yaml` in this documentation site.

## Examples

### Create invoice (cURL)

```bash theme={null}
curl -X POST https://api.meum.io/v1/invoices \
  -H "Authorization: Bearer sk_live_EXAMPLE_DO_NOT_USE" \
  -H "Content-Type: application/json" \
  -d '{
    "external_order_id": "order_demo_1048",
    "amount": "100.00",
    "currency": "USD",
    "return_url": "https://example.com/order/complete"
  }'
```

### Create invoice (JavaScript)

```javascript theme={null}
const response = await fetch("https://api.meum.io/v1/invoices", {
  method: "POST",
  headers: {
    Authorization: "Bearer sk_live_EXAMPLE_DO_NOT_USE",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    external_order_id: "order_demo_1048",
    amount: "100.00",
    currency: "USD",
    return_url: "https://example.com/order/complete",
  }),
});
const invoice = await response.json();
console.log(invoice.checkout_url);
```

### Create invoice (PHP — WooCommerce pattern)

```php theme={null}
$response = wp_remote_post('https://api.meum.io/v1/invoices', [
    'headers' => [
        'Authorization' => 'Bearer ' . $api_key,
        'Content-Type'  => 'application/json',
    ],
    'body' => wp_json_encode([
        'external_order_id' => (string) $order_id,
        'amount'            => $order->get_total(),
        'currency'          => $order->get_currency(),
        'return_url'        => $order->get_checkout_order_received_url(),
    ]),
    'timeout' => 30,
]);
$body = json_decode(wp_remote_retrieve_body($response), true);
$checkout_url = $body['checkout_url'] ?? $body['payment_url'] ?? '';
```

## Related pages

* [Authentication](/api-reference/authentication)
* [Errors](/api-reference/errors)
