Payezydevelopers
Sandbox

Guides

Act for a customer with a key

Your platform's own credential never acts inside a customer. Mint one key per customer, with only the scopes your servers need.

  1. Mint. POSTMint a customer API key with a name that says which system holds it, and explicit scopes. Omitted scopes mean read-only.
  2. Store the secret. It is returned once. Put it in your secrets manager, keyed by the customer's org_id.
  3. Call the customer API with that key alone: /v1/orgs/{customerId}/....
  4. Rotate with POSTRoll a customer API key: the old secret keeps working for the overlap you set, at most 72 hours.
  5. Revoke with POSTRevoke a customer API key when you stop serving the customer. Unlinking a customer revokes every key you minted for it.
POST/v1/platforms/{orgId}/customers/{customerId}/api-keys

Mint a customer API key

Reference

Choosing scopes

Your servers need to Scopes
Show balances and statements accounts:view
Show funding instructions accounts:view
Manage recipients counterparties:view, counterparties:manage
Send payments payments:view, payments:create
Approve payments on the customer's behalf payments:approve (opt-in; only if the customer agreed)
Receive the customer's events webhooks:manage

platform:* and api_keys:manage can never be placed on a customer key.

Every call records source=platform_api and your platform id, on the customer's activity log and on yours.