Obtain a session token
Send aPOST request to the login endpoint with your merchant credentials in the request body.
Endpoint
Required headers
Request body fields
Successful response
A200 OK response contains a token field. This is your session token.
Response
Attach the token to subsequent requests
After you obtain the token, pass it as theAuthorization header on every API call you make.
Required headers for authenticated requests
Authenticated request example
Both the
Authorization header (your dynamic session token) and the static Token: token header are required on authenticated endpoints. Omitting either one will result in an authentication error.Token lifecycle and re-authentication
Your session token is valid for a fixed period. When the token expires, any API call will return error code10000 (Incorrect Token Access). At that point, repeat the login request with your credentials to obtain a fresh token and resume normal operations.
Handling authentication errors
Error 10000 — Incorrect Token Access
This error means the token you sent is missing, malformed, or has expired. How to resolve it:- Confirm you are including the
Authorizationheader on the request. - Check that you are copying the full token value without truncation or extra whitespace.
- Re-authenticate by calling the login endpoint to obtain a new token.
- Retry the failed request with the fresh token.
Error 10007 — Username missing
You called the login endpoint without auser_name field in the request body. Add the field and retry.
Error 10008 — Password missing
You called the login endpoint without apassword field in the request body. Add the field and retry.