Skip to main content
When your current user access token expires, exchange the refresh token you received alongside it for a new one — no need to re-run the full credential flow.
You’ll need: your API Key (use your Test API Key in the sandbox) and the Refresh Token returned when the access token was issued.
1

Call refreshUserAccessToken

Replace <YOUR_SANDBOX_API_KEY> and <YOUR_REFRESH_TOKEN> with your credentials:
2

Store the new token

The response contains a fresh access token carrying the same scopes as the previously issued token:
Copy the token value and use it in the Authorization: Bearer <YOUR_USER_ACCESS_TOKEN> header for authenticated requests, exactly as before. Store the new refreshToken too — you’ll need it for the next refresh.
Refresh proactively, before the current token expires, rather than waiting for a 401 and refreshing reactively. It keeps requests from failing under load.

Next steps

Quickstart: your first gift card purchase

With a valid token in hand, run the full happy path end to end — deposit funds, buy a gift card, and reveal it in the sandbox.