Skip to main content

Authentication

To access protected resources, use the Login API to authenticate users and retrieve a token.

POSTbaseUrl/api/v1/auth/login

Headers

  • Content-Type: application/json

Send a JSON object with the following fields:

FieldTypeRequiredDescription
usernamestringYesThe unique username of the cashier setup during the onboarding step. Or the email of the merchant account can be used here as well to login as a Merchant.
passwordstringYesThe corresponding 8 character long password.

Example Request

{
"username": "cashierUsername",
"password": "password"
}
{
"username": "merchant@email.com",
"password": "password"
}

Usage Tips

  • Keep Your Token Secure: Never expose the accessToken in client-side code or logs.
  • Token Expiry: The token expires after 24 hours. If your token expires, re-authenticate to obtain a new one.
  • Include the Token in Requests: Use the format Authorization: Bearer <accessToken> in the header when accessing protected resources.