Skip to main content

Authentication

LaikiPayenforces a single, unified, zero-trust authentication architecture: Token-Based Bearer Authentication. All API operations (virtual cards, balance queries, funding, spend limits, and transactions) authenticate using short-lived 15-minute Bearer Access Tokens issued by the LaikiPaytoken service.

Authentication Flow Overview


Step 1: Obtain a 15-Minute Access Token

To interact with the API, exchange your Merchant ID and Secret Key for a short-lived access token:

Request

Request Body

Response (200 OK)


Step 2: Authorize Subsequent Requests

Provide the generated accessToken in the Authorization header of every API request:
cURL Example

Token Lifecycle & Auto-Refresh

  • Validity Period: Access tokens are valid for 15 minutes (900 seconds) from creation.
  • Auto-Refresh Best Practice: Cache the accessToken in your application memory or Redis cache with an expiration of 14 minutes. When expired, invoke POST /v1/merchant/auth/token again to fetch a fresh token.
  • Stateless & Scalable: Ephemeral tokens eliminate the security risk of keeping long-lived credentials in distributed containers or serverless instances.