Skip to main content

Authentication

The v2 API supports two authentication flows. Call your own Vantr account from a trusted server with client credentials, or let other merchants connect their accounts to your app with the OAuth authorization code flow.

Client credentials

Your own account, called from a backend you control. One request, no browser, no user. Covered on this page.

Authorization code + PKCE

A third party connects other merchants’ accounts. Browser redirect plus a per-merchant consent screen. See the guide →
Client secrets are passwords for your integration. Keep them server-side and rotate them if they are ever exposed.

Choose an auth method

Use HTTP Basic auth with the client ID as the username and the client secret as the password.

Token request

Use application/x-www-form-urlencoded for OAuth token calls.
string
required
Use client_credentials, authorization_code, or refresh_token.
string
Space-separated scopes. Required for client_credentials and authorization_code; optional on refresh when you want to narrow the refreshed access token.
string
Authorization code returned from /oauth/authorize. Required for authorization_code.
string
PKCE verifier that matches the original code_challenge. Required for authorization_code.
string
required
Opaque bearer token to pass in the Authorization header.
integer
required
Lifetime in seconds for the access token.
string
required
Space-separated scopes granted to the token.
string
Returned for the authorization_code grant (unless disabled on the app). Refresh tokens rotate: each refresh revokes the one you used and returns a new one. The client_credentials grant does not issue refresh tokens — just request a new access token. See Authorize a user (OAuth).

Token lifecycle

Issue

Use /oauth/token for client credentials, authorization code, and refresh token grants.

Inspect

Use /oauth/introspect to check token activity and metadata.

Revoke

Use /oauth/revoke to remove access immediately.

Common failures

Check that the request uses HTTP Basic auth with the client ID and client secret. Also verify that the application secret has not been rotated.
The credential is valid, but the application or token does not include a scope accepted by that endpoint. Check the endpoint reference and update the application scope set.
Request only scopes that are enabled on the developer application. Use a space-separated scope string, not commas.

FAQ

Start with Basic auth for server-to-server integrations. Move to bearer tokens when your system needs OAuth grant handling or short-lived access tokens.
No. Client secrets must stay in trusted server environments.
Every endpoint in the API reference declares its required scope. The scopes guide lists the full starter set.