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

> ## Agent Instructions
> Money is always a decimal string at the currency's precision (for example "29.00"), paired with an ISO 4217 currency field. Never use minor units.
> Build against the sandbox first: base URL https://sandbox-api.bachs.io with sk_sandbox_ keys. Production is https://api.bachs.io with sk_live_ keys; going live is a key swap.
> Treat webhooks (for example collection.succeeded) as the source of truth for fulfilment, never client-side events or redirects.
> Subscriptions are created by completing a checkout for a recurring product. There is no direct create-subscription endpoint.
> IDs carry resource prefixes (cust_, prod_, sub_, chk_, inv_, ref_) and timestamps are ISO 8601 UTC.

# Permissions for apps

> What an app can ask for, the reason it gives for each permission, and which events need which permission.

An app asks for the same permissions as an API key. The full list, with what
each covers, is on [Permissions](https://docs.bachs.io/api-reference/permissions.md). This page covers
what is different for apps.

## Ask only for what you need

The business sees every permission on the approval page, grouped as **It can
see** (`:read`) and **It can change** (`:write`). A `:write` permission includes
`:read`. Ask for the narrowest set that does the job: a short list gets approved
more often.

The access token can only do what the business approved. A call that needs
anything else gets `403 Forbidden`.

## Give a reason for each permission

Each permission needs a reason, shown under it on the approval page. Write it
for the business, in one sentence, about what your app does with it.

| Permission | Good reason | Refused reason |
| - | - | - |
| `payments:read` | So you can see each customer's orders in your helpdesk | payments:read |
| `refunds:write` | So you can refund a customer from a support ticket | We need this |

A reason is 10 to 200 characters, no two permissions share a reason, and a
reason is not just the permission's name. Publishing [checks](https://docs.bachs.io/apps/publish.md) this.

## Permissions that move money

`payouts:write`, `refunds:write`, `transfers:write` and `balance:write` let an
app move a business's money. An unlisted or public app can only have them once
its owner took its first live payment at least 90 days ago. A private app can
use them at any time.

## Events need their read permission

Your webhook can only receive events your app can read. Each event family needs
one permission:

| Events | Needs |
| - | - |
| `collection.*`, `checkout.*` | `payments:read` |
| `refund.*` | `refunds:read` |
| `payout.*`, `payout_destination.*` | `payouts:read` |
| `conversion.*` | `balance:read` |
| `customer.subscription.*` | `subscriptions:read` |
| `customer.*` | `customers:read` |
| `dispute.*`, `resolution_case.*` | `disputes:read` |
| `invoice.*` | `invoices:read` |
| `payment_method.*` | `payment_methods:read` |
| `account.*`, `capability.*` | `account:read` |
| `split_*` | `splits:read` |

The `*` names a family; it is not a wildcard. Subscribe to exact event names from
the [event catalogue](https://docs.bachs.io/developer-portal/events.md). When a business approves fewer
permissions than your app has, its webhook only gets the events those
permissions allow.

[`app.deauthorized`](https://docs.bachs.io/guides/webhooks/events/app-deauthorized) needs no
permission. Every app gets it.


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