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>"
}
'import requests
url = "https://olp-api.nipuntheekshana.com/v1/auth/register"
payload = {
"businessName": "<string>",
"email": "<string>",
"password": "<string>",
"phone": "<string>",
"businessType": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
businessName: '<string>',
email: '<string>',
password: '<string>',
phone: '<string>',
businessType: '<string>'
})
};
fetch('https://olp-api.nipuntheekshana.com/v1/auth/register', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://olp-api.nipuntheekshana.com/v1/auth/register",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'businessName' => '<string>',
'email' => '<string>',
'password' => '<string>',
'phone' => '<string>',
'businessType' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://olp-api.nipuntheekshana.com/v1/auth/register"
payload := strings.NewReader("{\n \"businessName\": \"<string>\",\n \"email\": \"<string>\",\n \"password\": \"<string>\",\n \"phone\": \"<string>\",\n \"businessType\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://olp-api.nipuntheekshana.com/v1/auth/register")
.header("Content-Type", "application/json")
.body("{\n \"businessName\": \"<string>\",\n \"email\": \"<string>\",\n \"password\": \"<string>\",\n \"phone\": \"<string>\",\n \"businessType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://olp-api.nipuntheekshana.com/v1/auth/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"businessName\": \"<string>\",\n \"email\": \"<string>\",\n \"password\": \"<string>\",\n \"phone\": \"<string>\",\n \"businessType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthentication
Register Merchant
Create a new merchant account on the Open Pay platform
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>"
}
'import requests
url = "https://olp-api.nipuntheekshana.com/v1/auth/register"
payload = {
"businessName": "<string>",
"email": "<string>",
"password": "<string>",
"phone": "<string>",
"businessType": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
businessName: '<string>',
email: '<string>',
password: '<string>',
phone: '<string>',
businessType: '<string>'
})
};
fetch('https://olp-api.nipuntheekshana.com/v1/auth/register', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://olp-api.nipuntheekshana.com/v1/auth/register",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'businessName' => '<string>',
'email' => '<string>',
'password' => '<string>',
'phone' => '<string>',
'businessType' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://olp-api.nipuntheekshana.com/v1/auth/register"
payload := strings.NewReader("{\n \"businessName\": \"<string>\",\n \"email\": \"<string>\",\n \"password\": \"<string>\",\n \"phone\": \"<string>\",\n \"businessType\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://olp-api.nipuntheekshana.com/v1/auth/register")
.header("Content-Type", "application/json")
.body("{\n \"businessName\": \"<string>\",\n \"email\": \"<string>\",\n \"password\": \"<string>\",\n \"phone\": \"<string>\",\n \"businessType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://olp-api.nipuntheekshana.com/v1/auth/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"businessName\": \"<string>\",\n \"email\": \"<string>\",\n \"password\": \"<string>\",\n \"phone\": \"<string>\",\n \"businessType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyRequest Body
string
required
The legal business name of the merchant.
string
required
Business email address. Must be unique across the platform.
string
required
Account password. Minimum 8 characters, must include uppercase, lowercase, and a number.
string
required
Business phone number in international format (e.g.,
+94771234567).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"
}
}