Do not include the token in client-side code. Treat it as a secret.
Each user has at most one active API token. Generating a new token from the
dashboard invalidates the previous one.
Workspace header
Piriod is multi-workspace: a single user can belong to several accounts. Every
request must declare which workspace it operates on:
x-simple-workspace: acc_01H8XYZ123ABC
Requests without this header (or with a workspace the user does not belong to)
return 400 or 403.
Test mode
Set x-piriod-test-mode: true to operate against test data — separate from your
production data. Resources created in test mode are returned only when this
header is true.
x-piriod-test-mode: true
Publishable keys (payment links)
Hosted payment-link endpoints under /publishable/payment_links/... are
designed to be called from the browser using the link’s publishable_key.
These endpoints do not require Authorization: Token. They are read-only
or limited to payment-intent operations.