Console
Docs/Core concepts

Authentication

A signed assertion, a short-lived token, and a proof on every request.

Two credential types.

#Server client (all money operations)

A registered Ed25519 key pair. Exchange a signed client assertion for a short-lived access token, then prove possession on every request with DPoP.

  1. POST /v1/auth/token with your client assertion and a DPoP proof. The response contains access_token and token_type: "DPoP".
  2. Send authorization: DPoP <access_token> and a fresh dpop: <proof> header on every request.

The proof is bound to the token and to the request URL and method. Reusing a proof is rejected.

You do not need to implement this by hand. @paygate/server does the key handling, token exchange and proofs for you. Use the raw flow only if you are writing a client in another language.

#Publishable key (browser and mobile bundles)

pk_sandbox_... or pk_live_.... Read-only and origin-bound:

  • Allowed: GET /v1/payment_methods.
  • Refused: anything that moves money (403 publishable_key_forbidden).

It is safe to ship in a bundle because it can only read methods, and only from the origins registered when the key was created.

Reference

Every route, parameter and response is generated from the OpenAPI 3.1 document.

Open the API reference