Skip to content
Docs

Creating a Stripe API key

This guide is part of the Publicus connection catalog. Once you have the credentials, connect the service and Publicus stores them for you.

Distilled from Stripe’s own documentation: API keys, Restricted API keys, and Authentication. Retrieved 2026-07-03.

Stripe recommends a restricted API key (RAK, rk_…) over an unrestricted secret key (sk_…) for almost every integration — a RAK can only do what you explicitly permit. Keys are mode-specific: *_test_ keys run against a sandbox, *_live_ keys against real data.

  1. Open the API keys tab of the Developers Dashboard (toggle into a sandbox first if you want a rk_test_ key).
  2. Click Create restricted key (or clone an existing key via the overflow menu (⋯) → Duplicate key).
  3. Choose a preconfigured permission set or start from zero permissions, and enter a descriptive name in the Key name field.
  4. For each resource the integration needs, set the permission to None, Read, or Write (write implies read). If you use Connect, also set the connected-accounts permission. Include at least Read on Balance if you want the catalog’s verification probe (GET /v1/balance) to pass.
  5. Click Create key and complete the two-factor verification dialog.
  6. Click the key value to copy it, and save it immediately in a secrets vault — you can’t retrieve a self-created key later.
  7. In the Add a note field, record where you saved the key, then click Done.

Secret key (only when unrestricted access is genuinely required)

Section titled “Secret key (only when unrestricted access is genuinely required)”
  1. On the API keys tab, click Create secret key.
  2. Copy the value when it is displayed — live-mode keys you create yourself are shown only once.
  • Requests authenticate via HTTP Basic with the key as username and no password (curl -u sk_test_…:), or equivalently Authorization: Bearer <key>. HTTPS is mandatory; plain-HTTP calls fail (Authentication).
  • Rotate keys from the API keys tab (overflow menu (⋯) → Rotate key); you can keep the old key valid for up to 7 days while rolling out the new one (API keys).
  • Never embed secret or restricted keys in source code or client-side apps; publishable keys (pk_…) are the only key type safe to expose (Best practices).

Open Connections under Credentials, choose Stripe, and pick Stripe API key (secret or restricted). Publicus asks for exactly the fields listed above and keeps them in your workspace’s secret storage.

See also: Stripe in the catalog.

This guide is maintained by Publicus and published under CC BY 4.0.