Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

API Keys & Permissions

Two kinds of credentials can authenticate against the API, both as a bearer token:

Authorization: Bearer <token>
  • A session token (a UUID) — issued on login, carries the full permissions of the signed-in user’s role on a store.
  • An API key (ak_...) — scoped to exactly the permissions you grant it when creating it, regardless of the owning user’s own role.

Store permissions

PermissionGrants
canviewinvoicesRead invoices and their status
cancreateinvoiceCreate invoices
canmodifyinvoicesCancel invoices
canviewpaymentsRead payments, payouts, and refund history
canmanagewebhooksList and replay webhook deliveries
canmodifystoresettingsOwner-level store settings — delete/unarchive the store, rotate or configure the wallet

(Shown without the ethpay.store. prefix the server stores them with internally.)

Scoping a key narrowly

Grant only what the integration actually needs. A webhook-replay cron job, for instance, needs canmanagewebhooks and nothing else — not canmodifyinvoices, not wallet access. If the key ever leaks, the blast radius is whatever it was scoped to, not whatever the account that created it could do.

A key scoped to cancreateinvoice + canviewinvoices is the minimum needed to run the create → check-status flow in Creating an Invoice, and nothing more.

Rotation

API keys can be rotated without downtime — create the replacement key, update the integration, then revoke the old one once you’ve confirmed the new one is in use. See the API key endpoints in the API Reference.