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

# Authentication

> How store API keys work, which permissions they carry and how to keep them safe.

Send a store API key as a bearer token on Store API, checkout, withdrawal, and customer balance requests. Each key belongs to one store. You do not need to put the store ID in these request URLs.

```http theme={null}
Authorization: Bearer sk_your_secret_key
```

For your own store, create a key under **Integrations** → **API keys**. If other sellers must connect their stores, use an [OAuth app](https://developers.paysum.io/oauth-apps.md) to obtain an approved store key.

## Permissions

Each key carries a list of permissions. Grant only what an integration needs. Store API scopes come in read and write pairs, and a write scope includes the matching read scope.

| Permission | Unlocks |
| - | - |
| `store:read` | [Store details](https://docs.paysum.io/api/store/get-store) |
| `products:read` | [Read products and categories](https://docs.paysum.io/api/products/list-products) |
| `products:write` | [Create, update and delete products](https://docs.paysum.io/api/products/create-product) |
| `orders:read` | [Orders and deliveries](https://docs.paysum.io/api/orders/list-orders) |
| `customers:read` | [Customers](https://docs.paysum.io/api/customers/list-customers) |
| `coupons:read` | [Read coupons](https://docs.paysum.io/api/coupons/list-coupons) |
| `coupons:write` | [Create, update and delete coupons](https://docs.paysum.io/api/coupons/create-coupon) |
| `themes:read` | [Read theme code and versions](https://docs.paysum.io/api/theme/list-files) |
| `themes:write` | [Edit, preview and publish the theme](https://docs.paysum.io/api/theme/write-files) |
| `checkout_api` | [Checkout sessions](https://docs.paysum.io/api/checkout/create-session) |
| `withdrawal_api` | [Withdrawals](https://docs.paysum.io/api/withdrawals/list-wallets) |
| `customer_balance_api` | [Customer balance](https://docs.paysum.io/api/customer-balance/list-customers) |
| `all` | Every API |

## Key lifecycle

Keys can be disabled or given an expiry date from the dashboard. Requests with a disabled or expired key fail with `401` and the codes `api_key_disabled` or `api_key_expired`. Each successful request updates the key’s last used time so you can spot unused keys.

> [!WARNING]
>
> Never embed API keys in browser code or mobile apps. Call the API from your backend and expose only what your frontend needs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.