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

Request Body

businessName
string
required
The legal business name of the merchant.
email
string
required
Business email address. Must be unique across the platform.
password
string
required
Account password. Minimum 8 characters, must include uppercase, lowercase, and a number.
phone
string
required
Business phone number in international format (e.g., +94771234567).
businessType
string
required
Type of business. One of individual, company, nonprofit.

Example Request

{
  "businessName": "Acme Payments Ltd",
  "email": "admin@acmepay.com",
  "password": "SecureP@ss123",
  "phone": "+94771234567",
  "businessType": "company"
}

Example Response (201)

{
  "merchant": {
    "id": "merch_abc123",
    "businessName": "Acme Payments Ltd",
    "email": "admin@acmepay.com",
    "phone": "+94771234567",
    "businessType": "company",
    "status": "pending_verification",
    "createdAt": "2026-03-26T10:00:00Z"
  },
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "refreshToken": "rt_def456..."
}

Error Responses

409 Conflict
{
  "error": {
    "code": "CONFLICT",
    "message": "A merchant with this email already exists"
  }
}
400 Validation Error
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "password must be at least 8 characters"
  }
}