cURL
curl --request POST \ --url https://olp-api.nipuntheekshana.com/v1/auth/login \ --header 'Content-Type: application/json' \ --data ' { "email": "<string>", "password": "<string>", "twoFactorCode": "<string>" } '
Authenticate a merchant and obtain access and refresh tokens
{ "email": "admin@acmepay.com", "password": "SecureP@ss123" }
{ "email": "admin@acmepay.com", "password": "SecureP@ss123", "twoFactorCode": "482910" }
{ "token": "eyJhbGciOiJIUzI1NiIs...", "refreshToken": "rt_def456...", "merchant": { "id": "merch_abc123", "businessName": "Acme Payments Ltd", "email": "admin@acmepay.com", "businessType": "company", "status": "active", "twoFactorEnabled": false } }
{ "error": { "code": "UNAUTHORIZED", "message": "Invalid email or password" } }
{ "error": { "code": "TWO_FACTOR_REQUIRED", "message": "Two-factor authentication code is required" } }