Skip to main content
POST
/
v1
/
auth
/
login
Login
curl --request POST \
  --url https://olp-api.nipuntheekshana.com/v1/auth/login \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "password": "<string>",
  "twoFactorCode": "<string>"
}
'

Documentation Index

Fetch the complete documentation index at: https://docs-openpay.nipuntheekshana.com/llms.txt

Use this file to discover all available pages before exploring further.

Request Body

email
string
required
The merchant’s registered email address.
password
string
required
The merchant’s account password.
twoFactorCode
string
Six-digit TOTP code. Required only if the merchant has two-factor authentication enabled.

Example Request

{
  "email": "admin@acmepay.com",
  "password": "SecureP@ss123"
}

Example Request with 2FA

{
  "email": "admin@acmepay.com",
  "password": "SecureP@ss123",
  "twoFactorCode": "482910"
}

Example Response (200)

{
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "refreshToken": "rt_def456...",
  "merchant": {
    "id": "merch_abc123",
    "businessName": "Acme Payments Ltd",
    "email": "admin@acmepay.com",
    "businessType": "company",
    "status": "active",
    "twoFactorEnabled": false
  }
}

Error Responses

401 Invalid Credentials
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid email or password"
  }
}
401 2FA Required
{
  "error": {
    "code": "TWO_FACTOR_REQUIRED",
    "message": "Two-factor authentication code is required"
  }
}