Scopes
A scope names one kind of resource and whether the key may read or write it. This page is generated from the server's own rules.
How scopes work
- A key with no scopes has full access. So does a key with the scope
*. - A
:writescope includes the matching:read. A key that can create a customer can read it back. - A key whose scopes cover no write at all is refused on every
POST,PUT,PATCHandDELETE. - An endpoint that belongs to no scope needs full access.
- A request outside the key's scopes answers
403 forbidden, and the message names the scope it needs, for exampleapi key scope checkout:write required.
Choose scopes when you create a key in the dashboard. The dashboard sends them like this (key management needs a signed-in session, not an API key):
A key takes at most 50 scopes. A publishable key takes none.
Every scope
Open a row to see the endpoints it allows.
customers:readRead customers, their balance history, saved payment methods, subscriptions and invoices.7 endpoints
- GET
/api/v1/customers - GET
/api/v1/customers/{id} - GET
/api/v1/customers/{id}/balance-transactions - GET
/api/v1/customers/{id}/invoices - GET
/api/v1/customers/{id}/payment-methods - GET
/api/v1/customers/{id}/subscriptions - GET
/api/v1/customers/by-external-id/{externalId}
customers:writeCreate and update customers, save or remove payment methods, set tax details and grant credits.8 endpoints
- POST
/api/v1/customers - POST
/api/v1/customers/{id}/credits/grant - POST
/api/v1/customers/{id}/payment-methods - DELETE
/api/v1/customers/{id}/payment-methods/{pmId} - POST
/api/v1/customers/{id}/setup-intent - PUT
/api/v1/customers/{id}/tax - PUT
/api/v1/customers/by-external-id/{externalId} - POST
/api/v1/customers/by-external-id/{externalId}/credits/grant
subscriptions:readRead subscriptions, their discounts and their invoices.4 endpoints
- GET
/api/v1/subscriptions - GET
/api/v1/subscriptions/{id} - GET
/api/v1/subscriptions/{id}/discounts - GET
/api/v1/subscriptions/{id}/invoices
subscriptions:writeCreate, change, pause, resume and cancel subscriptions, and manage their items and discounts.14 endpoints
- POST
/api/v1/subscriptions - PATCH
/api/v1/subscriptions/{id} - POST
/api/v1/subscriptions/{id}/cancel - POST
/api/v1/subscriptions/{id}/change-plan - POST
/api/v1/subscriptions/{id}/change-plan/preview - POST
/api/v1/subscriptions/{id}/discounts - DELETE
/api/v1/subscriptions/{id}/discounts/{discountId} - POST
/api/v1/subscriptions/{id}/items - DELETE
/api/v1/subscriptions/{id}/items/{itemId} - PATCH
/api/v1/subscriptions/{id}/items/{itemId} - POST
/api/v1/subscriptions/{id}/pause - DELETE
/api/v1/subscriptions/{id}/pending-change - POST
/api/v1/subscriptions/{id}/reactivate - POST
/api/v1/subscriptions/{id}/resume
checkout:writeOpen hosted checkout sessions.1 endpoint
- POST
/api/v1/checkout-sessions
portal:writeOpen customer portal sessions.1 endpoint
- POST
/api/v1/portal-sessions
entitlements:readRead what a customer may use: plan, features, limits, credits and usage.2 endpoints
- GET
/api/v1/customers/{id}/entitlements - GET
/api/v1/customers/by-external-id/{externalId}/entitlements
usage:readRead usage totals.2 endpoints
- GET
/api/v1/meter-events/summary - GET
/api/v1/usage-events/aggregate
usage:writeReport usage and consume credits.4 endpoints
- POST
/api/v1/customers/{id}/credits/consume - POST
/api/v1/customers/by-external-id/{externalId}/credits/consume - POST
/api/v1/meter-events - POST
/api/v1/usage-events
invoices:readRead invoices, credit notes, refunds and invoice PDFs.6 endpoints
- GET
/api/v1/credit-notes/{id} - GET
/api/v1/invoices - GET
/api/v1/invoices/{id} - GET
/api/v1/invoices/{id}/credit-notes - GET
/api/v1/invoices/{id}/pdf - GET
/api/v1/invoices/{id}/refunds
invoices:writeCreate, finalize, charge, void and settle invoices, and issue credit notes. Refunds need full access.9 endpoints
- POST
/api/v1/invoices - POST
/api/v1/invoices/{id}/charge - POST
/api/v1/invoices/{id}/credit-notes - POST
/api/v1/invoices/{id}/finalize - POST
/api/v1/invoices/{id}/pay-link - POST
/api/v1/invoices/{id}/record-payment - POST
/api/v1/invoices/{id}/uncollectible - POST
/api/v1/invoices/{id}/void - POST
/api/v1/invoices/one-off
catalog:readRead products, plans, features, meters, coupons, tax rates and pricing tables.21 endpoints
- GET
/api/v1/coupons - GET
/api/v1/coupons/{id} - GET
/api/v1/entitlement-settings - GET
/api/v1/features - GET
/api/v1/features/{id} - GET
/api/v1/meters - GET
/api/v1/meters/{id} - GET
/api/v1/plans - GET
/api/v1/plans/{id} - GET
/api/v1/plans/{id}/entitlements - GET
/api/v1/plans/{id}/price-changes/preview - GET
/api/v1/pricing-tables - GET
/api/v1/pricing-tables/{id} - GET
/api/v1/products - GET
/api/v1/products/{id} - GET
/api/v1/promotion-codes - GET
/api/v1/promotion-codes/{id} - POST
/api/v1/promotion-codes/validate - GET
/api/v1/tax-rates - GET
/api/v1/tax-rates/{id} - POST
/api/v1/tax-rates/calculate
catalog:writeCreate and change products, plans, features, meters, coupons, tax rates and pricing tables.25 endpoints
- POST
/api/v1/coupons - DELETE
/api/v1/coupons/{id} - PATCH
/api/v1/coupons/{id} - PUT
/api/v1/entitlement-settings - POST
/api/v1/features - PATCH
/api/v1/features/{id} - POST
/api/v1/meters - PATCH
/api/v1/meters/{id} - POST
/api/v1/plans - PATCH
/api/v1/plans/{id} - PUT
/api/v1/plans/{id}/entitlements - POST
/api/v1/plans/{id}/price-changes - PUT
/api/v1/plans/{id}/price-points - PUT
/api/v1/plans/by-code/{code} - POST
/api/v1/pricing-tables - DELETE
/api/v1/pricing-tables/{id} - PATCH
/api/v1/pricing-tables/{id} - POST
/api/v1/products - PATCH
/api/v1/products/{id} - POST
/api/v1/promotion-codes - DELETE
/api/v1/promotion-codes/{id} - PATCH
/api/v1/promotion-codes/{id} - POST
/api/v1/tax-rates - DELETE
/api/v1/tax-rates/{id} - PATCH
/api/v1/tax-rates/{id}
webhooks:readRead webhook endpoints and their delivery history.2 endpoints
- GET
/api/v1/webhook-endpoints - GET
/api/v1/webhook-endpoints/{id}/deliveries
webhooks:writeAdd, change, rotate and remove webhook endpoints, and replay deliveries.8 endpoints
- POST
/api/v1/webhook-endpoints - DELETE
/api/v1/webhook-endpoints/{id} - PATCH
/api/v1/webhook-endpoints/{id} - POST
/api/v1/webhook-endpoints/{id}/end-secret-overlap - POST
/api/v1/webhook-endpoints/{id}/replay - POST
/api/v1/webhook-endpoints/{id}/rotate-secret - POST
/api/v1/webhook-endpoints/{id}/test - POST
/api/v1/webhook-endpoints/deliveries/{id}/replay
*Full access. Everything above, plus the endpoints no narrower scope opens.11 more
- GET
/api/v1/audit-log - GET
/api/v1/dashboard - GET
/api/v1/gateway-credentials/stripe - POST
/api/v1/gateway-credentials/stripe/{mode}/check - GET
/api/v1/onboarding - GET
/api/v1/price-changes - GET
/api/v1/price-changes/{id} - POST
/api/v1/price-changes/{id}/cancel - GET
/api/v1/settings - GET
/api/v1/team/invites - GET
/api/v1/team/members
no keySigned-in dashboard users only. A key answers 403 here, whatever its scopes.13 endpoints
- POST
/api/v1/invoices/{id}/refunds - PATCH
/api/v1/settings - DELETE
/api/v1/settings - PUT
/api/v1/gateway-credentials/stripe - DELETE
/api/v1/gateway-credentials/stripe/{mode} - PATCH
/api/v1/team/members/{userId} - DELETE
/api/v1/team/members/{userId} - POST
/api/v1/team/invites - DELETE
/api/v1/team/invites/{id} - POST
/api/v1/api-keys - GET
/api/v1/api-keys - DELETE
/api/v1/api-keys/{id} - POST
/api/v1/api-keys/{id}/roll
Older keys
Keys created before scopes were enforced may carry read or write. They still work: write means full access, and read means every :read scope.