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

# Get started in 5 minutes

> From API key to your first call.

## 1. Generate an API key

In the Lojou dashboard: **Settings → API → New API Key**. Pick the scopes you need (e.g. `orders.read`, `products.write`) and copy the key — it's only shown once.

<Tip>
  Building an app for OTHER sellers to install (not just your own store)? Use [OAuth](/en/oauth) instead of a fixed API key.
</Tip>

## 2. Test the connection

```bash theme={null}
curl https://api.lojou.app/v1/ping
```

```json theme={null}
{ "status": "success", "message": "pong" }
```

This endpoint doesn't require authentication — it's just to confirm the API is up.

## 3. Confirm who you are

```bash theme={null}
curl https://api.lojou.app/v1/user \
  -H "Authorization: Bearer YOUR_API_KEY"
```

A `401` means the key is wrong or expired. A `403` means the key exists but doesn't have the `user.read` scope — see [Authentication](/en/authentication#scopes).

## 4. List your products

```bash theme={null}
curl https://api.lojou.app/v1/products \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json theme={null}
{
  "status": "success",
  "page": 1,
  "per_page": 20,
  "last_page": 1,
  "total": 3,
  "data": [ ]
}
```

## 5. Create an order

Every order needs `amount`, `product_pid`, and `customer`:

```bash theme={null}
curl -X POST https://api.lojou.app/v1/orders \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 500,
    "product_pid": "PROD-ABC123",
    "customer": {
      "name": "Jane Doe",
      "email": "jane@example.com",
      "mobile_number": "+258840000000"
    }
  }'
```

The response includes a `checkout_url` — send that link to your customer to complete payment.

## Next steps

* [Receive events in real time](/api-reference) by setting up a webhook (`POST /v1/webhooks`) instead of polling the order.
* Building an app for other sellers? See the [OAuth guide](/en/oauth).
