Authenticate by sending your secret key in the x-api-key header.
Do not send your key as a Bearer token. Authorization: Bearer sk_live_... is read as a dashboard session token, not an API key, and fails with 401 Invalid or expired token. Use x-api-key.

401 responses

A 401 means Payve could not accept the credential. The body is short and has no error.code:
Do not retry a 401. The same request will fail the same way.

403 responses

A 403 means the key is valid but may not do this. There are two shapes. A key that lacks the scope for a payout gets:
Other permission refusals use the standard error envelope:
Handle both shapes. Read the HTTP status first, then look for error.code, and fall back to the top-level message.

Never put a key in a browser or mobile app

A secret key can move money out of your wallets. Anything shipped to a browser or a phone can be read by whoever holds the device. Keep keys on your server.
  • Call Payve from your backend. Have your web or mobile app call your backend.
  • To take a payment from a customer without building a server flow, use a payment link. The hosted checkout needs no key.
  • If a key has ever been in client code, treat it as leaked and revoke it.

Endpoints that need no key

GET /v1/currencies and GET /v1/rates are public.