Authentication

Authentication

Payezy accepts three credentials on the customer API.

A browser session uses the payezy_session cookie from Kratos. Dashboard actions that move money or change keys require a second factor (AAL2).

An API key is a bearer token shaped pz_test_<id>_<secret> on staging and pz_live_<id>_<secret> in production. The prefix must match the environment. A live key works only after staff grant production API access and only while the organization is active. Scopes are frozen when the key is created. Possession of the key replaces interactive step-up for those scopes.

Staff view-as and platform view-as use a short-lived bearer token. Those tokens are not API keys, and API keys cannot open a view-as session.

Try a call from the API reference

The reference can attach three credentials. A key from the Developer page is the API key scheme, not the session cookie.

  1. In the Payezy app, open Developer and create a key. Copy the full secret before you leave that page. It is shown once. A sandbox secret starts with pz_test_. A production secret starts with pz_live_ and does not authenticate until Payezy staff grant production API access for that organization.
  2. Open API reference. Set authentication to apiKey and paste the whole secret. The call sends Authorization: Bearer pz_test_... (or pz_live_...).
  3. Do not paste the secret into payezy_session. That field is the browser session cookie. The API does not treat it as a key, so the call returns 401. On the sandbox the real session cookie is named payezy_stg_session.
  4. Use your own organization id, and only operations the key's scopes allow. A new key is read-only until you add scopes. A missing scope returns 403, not 401.

API keys

API keys

Create keys from the Developer page. The secret is shown once. Payezy stores only an HMAC of the secret. To call the API, send Authorization: Bearer and the full secret. In the API reference, choose the apiKey scheme and paste that secret. The payezy_session cookie field is not an API key.

Read-only keys expire in 365 days by default. Keys with a write scope expire in 90 days. No key lasts longer than one year. Roll a key to mint a replacement; the old secret can keep working for up to 72 hours. Revoke ends it immediately.

An empty IP allowlist accepts any address. A non-empty list accepts only those CIDR networks.

Each key has its own rate limit. Production allows 100 reads and 25 writes per second. Staging is tighter. If the limit store is unavailable, the key is refused.

Live keys that can write email the organization's owners. Revoking production API access keeps the keys listed and makes them fail with api_access_revoked until access is granted again.

Creating, rolling and revoking a key, and rotating a webhook signing secret, require a signed-in member. An API key cannot do those. A platform with platform:customer_keys mints a separate customer key for each linked customer. That customer key is the only credential on later requests. It cannot mint further keys. Removing the customer link revokes the keys that platform minted and leaves keys the customer created.

A key minted by a platform records source=platform_api and the platform id on every later action. A key from the Developer page records source=customer_api. A signed-in session records source=customer_app.

Webhooks

Webhooks

Register an HTTPS endpoint from the Developer page and choose payment.updated, withdrawal.updated, onboarding.updated, or platform_customer.updated.

Payezy signs the raw body. The Payezy-Signature header looks like t=<unix>,v1=<hex hmac sha256>. The signed string is <unix>.<body>. During the 24 hours after a secret rotation, the header carries a v1 for the new secret and a v1 for the previous one. Reject timestamps older than five minutes.

Production registration and re-enabling require the production API grant. Deliveries retry with backoff and are marked failing after repeated errors. Replay queues one delivery again.

Endpoints must be public HTTPS. Private, loopback, and link-local addresses are rejected.

Sandbox

Sandbox

Staging is the public sandbox. It has its own network, database, and keys, and it talks to the Brale test network. Production is live only.

Sandbox keys use the pz_test_ prefix and work before verification. Live keys exist only in production. A key from one environment is rejected by the other.

POST /v1/orgs/{orgId}/accounts/{accountId}/simulate-deposit credits a sandbox account. Production returns not_found. The staging web app shows the same action on the Simulate deposit page.

Sign-up on staging sends real email. There is no on-screen code and no MFA bypass. Staff sign-in is limited to the networks operators configure.

above_ceiling

above_partner

account_inactive

this account cannot send payments

account_not_active

this account can't receive deposits

account_not_opened

we couldn't open the account right now; try again in a few minutes

account_not_ready

this account is still being set up

allowlist_too_long

an API key can list at most 20 networks

already_claimed

the customer has already claimed this account

already_decided

you already responded to this payment

already_linked

this organization already belongs to a platform

already_member

this person is already a member

api_access_revoked

production API access is not enabled for this organization

api_key_inactive

this key is no longer active

application_locked

the application can no longer be edited

assignment_ended

This assignment has already ended.

auto_debit_required

Fees are always paid from the Payezy balance for direct customers.

billing_not_available

Billing for this organization is handled by its platform.

book_archived

This version is already archived.

book_assigned

book_changed

The draft was edited after activation was requested; request activation again.

book_is_draft

Delete a draft instead of archiving it.

book_kind_mismatch

Platforms are priced on platform books.

book_not_active

Activate the book before assigning it.

book_not_draft

Active and archived versions cannot change; start a new version.

break_not_open

This break is not open.

cannot_disable_self

you cannot disable your own access

cannot_transfer_to_self

choose another member to become the owner

claim_link_required

open the claim link from your platform to claim this account

credit_not_available

Only credits not yet applied to a bill can be voided.

customer_action_required

only the customer can accept the account agreement

customer_type_not_allowed

customer_type_not_offered

your platform is not set up for

daily_payout_limit

delivery_unavailable

this environment always emails invitations

description_required

Describe the credit; the customer sees it on their bill.

draft_exists

This book already has a draft version:

duplicate_account

this wallet is already saved for this recipient

duplicate_commitment

Each commitment kind can be set once per product and once overall.

duplicate_item

effective_in_past

Rate changes cannot take effect in the past; past charges never change.

email_not_verified

verify your email address to continue

enrollment_required

provide an invitation token or a platform link

events_required

choose at least one event

external_ref_exists

you already have a customer with this reference

forbidden

this API key does not include

idempotency_key_required

send an Idempotency-Key header

idempotency_key_reused

this Idempotency-Key was used for a different request

idempotency_mismatch

this idempotency key was used for a different payment

identity_unavailable

the account could not be opened

impersonation_ended

this view-as session has ended

impersonation_read_only

simulations cannot be run while viewing as a customer

individual_exists

this person already has a personal account

insufficient_funds

available balance is

insufficient_rank

you cannot modify a member with a higher role

internal

An unexpected error occurred.

invalid_

invalid_account

provide either a bank account or a wallet

invalid_account_number

account numbers are 4 to 17 digits

invalid_account_type

account type must be checking or savings

invalid_address

this is not a valid

invalid_amount

Enter a positive amount.

invalid_application

some fields need attention

invalid_bound

invalid_category

category must be one of

invalid_cidr

invalid_commitment

invalid_customer

a platform cannot be another platform's customer

invalid_customer_type

customer type must be individual or business

invalid_customer_types

customer types must be business and/or individual

invalid_decision

decision must be approve, reject, request_changes or send

invalid_document

could not read the upload

invalid_documents

some documents were already sent to the partner or belong to another application

invalid_email

Enter a valid billing email.

invalid_estimate

estimates cannot be negative

invalid_event

unknown event:

invalid_expiry

expiry must be within the next year

invalid_idempotency_key

idempotency keys are at most 200 characters

invalid_invoice_number

invoice numbers are at most 64 characters

invalid_item

invalid_kind

New books are platform or customer books; edit the standard book with a new version.

invalid_label

labels are at most 80 characters

invalid_limit

Enter a positive single-transfer limit.

invalid_memo

memos are at most 140 characters

invalid_method

Payment method must be bank_transfer or manual.

invalid_name

enter the recipient's name (up to 140 characters)

invalid_overlap

overlap must be between 0 and 72 hours

invalid_owner_email

enter the email address the customer will sign in with

invalid_period

Period must be YYYY-MM.

invalid_policy

threshold must be ≥ 0 and approvers between 0 and 5

invalid_purpose

purpose must be payment or withdrawal

invalid_rail

invalid_reason

the reason is at most 500 characters

invalid_request

malformed application

invalid_routing_number

enter a valid 9-digit ABA routing number

invalid_scope

scope is not allowed on a customer API key:

invalid_side

side must be front or back

invalid_slug

the link name uses 3-40 lowercase letters, digits and dashes

invalid_state

slack install state is invalid

invalid_status

Status must be resolved or ignored.

invalid_terms

Payment terms are 0 to 90 days.

invalid_type

type must be individual or business

invalid_url

webhook URL must be https

invitation_email_mismatch

this invitation was sent to a different email address

invitation_inactive

this invitation is no longer valid; ask the platform for a new one

invitation_required

send the invitation link or the claim id, not both

invoice_closed

Paid and void invoices cannot be voided.

invoice_not_draft

Only draft invoices can be issued.

invoice_not_open

Only open or past-due invoices can be marked paid.

invoice_partly_paid

This invoice is partly paid; record the rest or issue a credit instead.

ip_not_allowed

this API key is not allowed from this network

label_too_long

keep the name under 80 characters

last_account

a recipient keeps at least one account; remove the recipient instead

last_owner

an organization must keep at least one owner

member_disabled

re-enable this member before making them the owner

membership_disabled

your access to this organization has been disabled

name_required

name the key after the system that will use it

no_documents

upload the requested documents first

no_documents_requested

no documents are currently requested

no_route

no_virtual_account

this account has no active deposit details yet

no_workflow

Onboarding is not running for this customer.

not_a_member

that person is not an active member of this customer

not_active

only active platforms can be suspended

not_allowed

staff cannot create organizations on behalf of customers

not_awaiting_review

This application is not waiting for review.

not_business

only business and platform accounts can invite team members

not_cancelable

this payment was already sent and can no longer be canceled

not_found

The resource does not exist, or it is not visible to this caller.

not_own_account

withdrawals go to your own linked accounts; use Pay to send money to someone else

not_pending

only pending applications can be approved

not_pending_approval

this payment is not waiting for approval

not_restricted

this customer is not restricted

not_submitted

This customer has not been opened at a partner yet.

not_supported

personal accounts have a single owner

not_suspended

only suspended platforms can be reinstated

not_your_session

only the person who opened this session or a platform admin can end it

note_required

Explain the resolution in a note.

onboarding_unavailable

account opening is temporarily unavailable

org_closed

this account is closed

org_not_verified

complete verification before using this feature

org_restricted

outgoing payments are temporarily restricted on this account

org_suspended

this account is suspended; contact support

own_account

this is one of your own accounts; use Withdraw to move money to it

owner_identity_conflict

that sign-in already belongs to someone else

owner_not_attached

the account could not be opened

partner_link_missing

This customer already has accounts at a partner, but there is no partner profile to re-sync.

pdf_not_ready

The PDF is available once the invoice is issued.

period_open

A month can be billed only after it ends.

permission_denied

your role does not allow this action (

platform_in_review

this is available once Payezy approves your platform application

platform_invite_email_mismatch

this invitation was sent to a different email address; sign in with that address to apply

platform_invite_exists

a pending invite for this platform and email already exists; resend it instead

platform_invite_inactive

only pending invites can be resent

platform_invite_required

platform applications are by invitation only; open the link in your invitation email

platform_unavailable

this platform is not accepting new customers right now

product_unavailable

This product is not available yet and cannot be enabled.

rate_limit_unavailable

try again shortly

rate_limited

too many questions from this network

reason_required

Give a reason of at least 10 characters.

reason_too_long

keep the reason under 1000 characters

recipient_archived

this recipient was removed

recipient_blocked

payments to this recipient are not allowed

recipient_under_review

this recipient is being reviewed by compliance; try again later

request_in_progress

this account is still being opened; try again shortly

review_not_running

The documents are approved, but onboarding is not running for this customer, so they were not sent. Contact engineering.

role_not_applicable

this role is not available for this account type

scope_not_held

you cannot grant a scope you do not have (

scopes_required

choose at least one scope

self_approval

you cannot approve a payment you created

session_inactive

this session has already

session_required

simulation_rejected

simulator_unavailable

this partner cannot simulate deposits

simulator_unknown_account

the sandbox partner no longer knows this account (its state was reset); re-onboard to simulate deposits

single_payout_limit

payments are limited to

slack_not_configured

Slack is not configured for this environment

slug_taken

this link name is taken; choose another

source_unavailable

this account type isn't available for your organization yet

standard_in_force

The standard book always needs a version in force; activate a new version instead.

standard_not_assignable

Every organization falls back to the standard book; end its assignment instead.

step_up_required

Confirm with two-factor authentication to continue.

terms_required

accept the current account agreement to continue

too_many_accounts

unauthorized

sign in to continue

unavailable

the docs assistant is not configured

unknown_product

unknown_role

unknown role

unknown_source

choose one of the listed account types

unknown_tool

tools are search_docs and get_operation

unsupported_content

this file type cannot be shown

unsupported_network

unsupported_partner_kind

Choose a document type the partner accepts before sending a US photo ID or a proof of address.

unsupported_state

We can't open this type of account in

user_suspended

this user has been suspended; contact support

wire_address_required

wires need the beneficiary's address and the bank's address