> ## Documentation Index
> Fetch the complete documentation index at: https://docs.laikipay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Access Token

> Exchange your Merchant ID and Secret Key for a 15-minute Bearer access token.

Exchange your Merchant ID (`mid_lk_...`) and Secret API Key (`sk_test_...` or `sk_live_...`) for an ephemeral Bearer access token valid for 15 minutes (900 seconds).

Subsequent requests to the Virtual Cards API must include this token in the `Authorization: Bearer <accessToken>` header.


## OpenAPI

````yaml openapi.json POST /auth/token
openapi: 3.0.3
info:
  title: LaikiPay Developer API
  description: >-
    Developer-first financial infrastructure for virtual card issuance,
    corporate vaults, and payment automation.
  version: 1.0.0
servers:
  - url: https://api.laikipay.com/v1/merchant
    description: Production API Server
  - url: http://localhost:3000/v1/merchant
    description: Local Development Sandbox
security:
  - bearerAuth: []
paths:
  /auth/token:
    post:
      tags:
        - Authentication
      summary: Create Access Token
      description: >-
        Exchange your Merchant ID and Secret Key for a 15-minute Bearer access
        token.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - merchantId
                - secretKey
              properties:
                merchantId:
                  type: string
                  description: Your unique Merchant ID
                  default: mid_lk_9a4f21e0b8c4d29a
                  example: mid_lk_9a4f21e0b8c4d29a
                secretKey:
                  type: string
                  description: Your secret API key
                  default: sk_test_9401ab38f8219cb7d4e320f0a82
                  example: sk_test_9401ab38f8219cb7d4e320f0a82
            example:
              merchantId: mid_lk_9a4f21e0b8c4d29a
              secretKey: sk_test_9401ab38f8219cb7d4e320f0a82
      responses:
        '200':
          description: Access token generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      accessToken:
                        type: string
                        description: Ephemeral JWT Bearer token valid for 15 minutes
                        example: >-
                          eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjbXJjXzAxIiwibWVyY2hhbnRJZCI6Im1pZF9sayIsImVudmlyb25tZW50IjoiVEVTVCIsInR5cGUiOiJtZXJjaGFudF9hcGlfdG9rZW4ifQ...
                      tokenType:
                        type: string
                        example: Bearer
                      expiresIn:
                        type: integer
                        description: Token validity in seconds (900 seconds = 15 minutes)
                        example: 900
                      environment:
                        type: string
                        example: TEST
                      merchantId:
                        type: string
                        example: mid_lk_9a4f21e0b8c4d29a
                  timestamp:
                    type: string
                    example: '2026-10-12T07:10:00.000Z'
                  path:
                    type: string
                    example: /v1/merchant/auth/token
        '401':
          description: Unauthorized - Invalid merchant credentials
      security: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT Access Token

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.