A route called without the scope it needs answers
403 insufficient_scope.
events:write creates real events
It acts only on events that key created: other events answer
404 not_found. The scope is new on tokens issued after you turn it on:
fetch a new token to use it, even if the key is older. A publishable key can
never use it (403 credential_not_permitted). See
Create and publish events.
payments:write collects payments on your own site
It lets the key create and quote payments. It does
nothing until Laces has turned payments on for your organization
(403 shop_payments_not_enabled).
- It needs
orders:writeandorders:readas well: a payment is paid withPOST /orders/{orderId}/pay, and proof of payment is an order read. - Fetch a new token after turning it on.
orders:read returns personal data
For event orders you don’t need orders:read to learn whether a payment
succeeded (payments do need it):
- Webhooks tell you, and never include buyer details.
- Checkout session reads (
checkout_sessions:write) tell you the linked order’s status for hosted and embedded checkout.
orders:read is what you need to poll an order over the API.
Requesting fewer scopes
A token can ask for less than its client holds, with the space-separatedscope parameter on the token endpoint.
Omit it to get everything the client holds. Asking for a scope the client
doesn’t hold is 400 invalid_scope.
The publishable key is capped
Whatever the client holds (includingevents:write), a publishable key can only ever use
events:read and checkout_sessions:write, and only to create a session.
It can never create or pay orders or read them. That is what makes it safe to
put in page source. Calling an order route with it is
403 credential_not_permitted.