Skip to main content
BrandWallet API uses a two-credential exchange: your API key (identifies your integration) plus an API secret (identifies the merchant organization) produce a Bearer token scoped to that organization. Every subsequent API call carries this token in the Authorization header. Two auth endpoints cover the whole lifecycle:

Credentials

Keep credentials server-side. Your API key and secrets grant access to organization data. Never embed them in client-side code or expose them in a browser; only transmit them over HTTPS.

Get a token

Send your credentials as request headers — no request body. The pair is validated together: a valid API key with an API secret that belongs to another integration is rejected. The token is scoped to the secret’s organization.

Example

Response

Call the API

Include Authorization: Bearer <accessToken> on every request. BrandWallet validates the token on each call and rejects missing, expired, or malformed tokens. When the token expires, refresh it or request a new one with your credentials.

Refresh a token

Instead of re-sending credentials, send the current token pair. BrandWallet returns a new pair and immediately invalidates the old refresh token.
Refresh tokens are rotated — each successful call invalidates the token you sent and returns a brand-new pair. Replace both stored tokens immediately after a successful refresh; resending an old refresh token fails with _invalid_refresh_token.
Payload schema:
The response has the same shape as POST /auth/token: a new accessToken, tokenType, expiresIn, and refreshToken.

Error codes

For the complete list of error codes returned across all endpoints, see the Error Reference.
Last modified on September 29, 2026