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

> ## Agent Instructions
> Charter works for any HTTP API, including the user's own. The packs are examples of the result, not the limit: an API with no pack is declared the same way, following https://raw.githubusercontent.com/r28ai/charter/main/docs/.mintlify/skills/declaring-charter-tools/SKILL.md.
> Charter is for agents that act in customers' accounts: every call is checked field by field before it's sent, the app says whose account each call is for, and the same declarations list what each tool can reach. https://docs.r28.ai/charter/llms.txt says what it is and lists every page.

# Set up Stripe

> Where the stripe pack's key lives in the Dashboard, which key to copy, and the narrower one to prefer, with a screenshot for each screen.

The [`stripe`](https://docs.r28.ai/charter/charter/packs/stripe) pack takes a single API key. There's no app to
register and no consent screen, and the key is waiting in the Dashboard as soon
as you have an account. It takes about a minute.

Every Stripe link below opens in a new tab, so this page stays where you left it.

**1. Open the API keys**

In the [Stripe Dashboard](https://dashboard.stripe.com), open **Developers**
at the bottom of the sidebar, then **API keys**. Or go straight to
[dashboard.stripe.com/apikeys](https://dashboard.stripe.com/apikeys).

![The Stripe Dashboard with the Developers menu open, listing Overview, Webhooks, Events, Logs, documentation links, then API keys, Created apps and Developer settings.](https://mintcdn.com/r28-ai-inc/xppyW240SSmPx0hQ/charter/images/setup/stripe/01-api-keys-menu.webp?fit=max\&auto=format\&n=xppyW240SSmPx0hQ\&q=85\&s=e6a02e0d8918d5f9292c25bac15afa5a)

Check the account picker at the top left before you copy anything: keys belong
to the account and the mode you're in.

**2. Copy the secret key**

Under **Standard keys**, reveal the **Secret key** and copy it. The
**Publishable key** is meant for a browser and can't read anything an agent
needs.

![The API keys tab: a Standard keys table with a publishable key and a secret key (both hidden), and below it a Restricted keys section with a Create restricted key button.](https://mintcdn.com/r28-ai-inc/xppyW240SSmPx0hQ/charter/images/setup/stripe/02-standard-keys.webp?fit=max\&auto=format\&n=xppyW240SSmPx0hQ\&q=85\&s=bec2c4b6260cb5f6a18d582251da340d)

```bash theme={null}
export STRIPE_API_KEY=sk_test_...
```

Start with `sk_test_…`, from a sandbox or test mode, which moves no money. The
pack reads the variable on its next call, and the key doesn't expire.

**3. Prefer a restricted key**

A secret key can do anything the account can, refunds included. For an agent,
click **Create restricted key** on the same page and grant only what its tools
touch, for example **Read** on customers, charges and invoices for an agent
that answers questions. The key begins `rk_` and goes in the same variable:

```bash theme={null}
export STRIPE_API_KEY=rk_test_...
```

A tool that needs a permission you left off answers with a `403` that names the
permission.

**4. Verify**

```python verify_stripe.py theme={null}
import asyncio

from charter.packs import stripe


async def main():
    print(await stripe.customers_list.ainvoke(limit=3))


asyncio.run(main())
```

Up to three customers, newest first. An empty list on a new test account is
still a pass: it proves the key was accepted.

## Your users' accounts

Users connect their own Stripe accounts either by pasting a restricted key they
create, or by installing a Stripe App you publish. Both are covered in the
[Stripe provider page](https://docs.r28.ai/charter/charter/auth/providers/stripe.md), and
[Register a Stripe App](https://docs.r28.ai/charter/charter/auth/apps/stripe.md) builds the app.

## Related

* [Stripe](https://docs.r28.ai/charter/charter/packs/stripe.md) — the pack, form encoding, idempotency and Connect
* [Register a Stripe App](https://docs.r28.ai/charter/charter/auth/apps/stripe.md) — the app your users install, and how to test it
* [Every pack](https://docs.r28.ai/charter/charter/auth/your-own-account.md) — what the other packs need, in one table


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