Authentication

Every /v1 operation except the public catalogue requires authentication. The documented method for integrations is the API key, sent in the Authorization header with the Bearer scheme:

Authorization: Bearer veriko_a1b2c3d4e5f6...

The key identifies the account and determines both the applicable permissions and the quota consumed. It does not expire: it stays valid until it is regenerated or until every session of the account is closed (password change or reset, "sign out everywhere", or a forced sign-out); from then on it answers 401 with session_invalidated and must be regenerated.

API key scope

Configure the scope in the application's API section. You can choose one of the “Read only”, “Validate”, or “Full access” presets, or select an explicit list of permissions for M2M operations. Scope is a ceiling, not an additional grant: each request must be allowed both by the key and by your account's current roles. The “Full access” preset cannot grant permissions your account does not have.

What each preset covers:

  • Read only: reads, without changing anything. It does not cancel or change retries, query the payment status again, or send the CEP to Telegram.
  • Validate: everything in “Read only”, plus validating receipts and following up on your own validations with validations.retries.manage: retries, a new payment status query, and sending the CEP to Telegram.
  • Full access: every M2M operation your account's roles allow.

The API key is for M2M integrations only. Viewing or changing its scope requires your session in the application, not the API key itself. An operation outside either the key's scope or the account's permissions returns 403 with permission_denied.

Obtaining and rotating

The key is read and replaced from the dashboard (the console session only, not the API key). Regeneration invalidates the previous one immediately: any integration still using it starts receiving 401 on its next request.

Reads expose only the prefix and the last characters of the key. The full value is shown at generation time, and the console can show it again afterwards by requiring the account password.

Failed authentication responses

codesituation
unauthorizedThe Authorization header is missing
invalid_api_keyThe key matches no account
session_invalidatedThe key was issued before every session was closed
account_suspendedThe account is suspended or closed. When the suspension has a term, meta.suspended_until says when it ends (UTC): from that time on the same key works again

All of them answer 401 in the usual error document shape.

A valid key on an operation the account lacks permission for answers 403 with permission_denied, not 401: the difference between the two is identity versus authorisation.

Console-only operations

The web console authenticates on its own, with a method that is not the API key. Dashboard and public API also do not expose the same set of operations. Administration operations are for Veriko staff: a customer account's API key never reaches them and receives 403 even when valid (auth_method_denied on the ones that accept only the console). A few administration reads also accept internal staff credentials; their reference page says so.

Each operation declares the methods it accepts on its reference page. The /v1 operations aimed at integrations accept both.