Update Merchant
curl --request PUT \
--url https://olp-api.nipuntheekshana.com/v1/merchants/{id} \
--header 'Content-Type: application/json' \
--data '
{
"businessName": "<string>",
"phone": "<string>",
"walletAddress": "<string>",
"webhookUrl": "<string>",
"businessType": "<string>"
}
'import requests
url = "https://olp-api.nipuntheekshana.com/v1/merchants/{id}"
payload = {
"businessName": "<string>",
"phone": "<string>",
"walletAddress": "<string>",
"webhookUrl": "<string>",
"businessType": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
businessName: '<string>',
phone: '<string>',
walletAddress: '<string>',
webhookUrl: '<string>',
businessType: '<string>'
})
};
fetch('https://olp-api.nipuntheekshana.com/v1/merchants/{id}', 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/merchants/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'businessName' => '<string>',
'phone' => '<string>',
'walletAddress' => '<string>',
'webhookUrl' => '<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/merchants/{id}"
payload := strings.NewReader("{\n \"businessName\": \"<string>\",\n \"phone\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"businessType\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://olp-api.nipuntheekshana.com/v1/merchants/{id}")
.header("Content-Type", "application/json")
.body("{\n \"businessName\": \"<string>\",\n \"phone\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"businessType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://olp-api.nipuntheekshana.com/v1/merchants/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"businessName\": \"<string>\",\n \"phone\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"businessType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyMerchants
Update Merchant
Update a merchant’s profile information
PUT
/
v1
/
merchants
/
{id}
Update Merchant
curl --request PUT \
--url https://olp-api.nipuntheekshana.com/v1/merchants/{id} \
--header 'Content-Type: application/json' \
--data '
{
"businessName": "<string>",
"phone": "<string>",
"walletAddress": "<string>",
"webhookUrl": "<string>",
"businessType": "<string>"
}
'import requests
url = "https://olp-api.nipuntheekshana.com/v1/merchants/{id}"
payload = {
"businessName": "<string>",
"phone": "<string>",
"walletAddress": "<string>",
"webhookUrl": "<string>",
"businessType": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
businessName: '<string>',
phone: '<string>',
walletAddress: '<string>',
webhookUrl: '<string>',
businessType: '<string>'
})
};
fetch('https://olp-api.nipuntheekshana.com/v1/merchants/{id}', 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/merchants/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'businessName' => '<string>',
'phone' => '<string>',
'walletAddress' => '<string>',
'webhookUrl' => '<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/merchants/{id}"
payload := strings.NewReader("{\n \"businessName\": \"<string>\",\n \"phone\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"businessType\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://olp-api.nipuntheekshana.com/v1/merchants/{id}")
.header("Content-Type", "application/json")
.body("{\n \"businessName\": \"<string>\",\n \"phone\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"businessType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://olp-api.nipuntheekshana.com/v1/merchants/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"businessName\": \"<string>\",\n \"phone\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"businessType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyThis endpoint requires a valid Bearer token in the
Authorization header. Merchants can only update their own profile.Path Parameters
Request Body
Example Request
{
"businessName": "Acme Payments International",
"walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
"webhookUrl": "https://acmepay.com/webhooks/openpay"
}
Example Response (200)
{
"id": "merch_abc123",
"businessName": "Acme Payments International",
"email": "admin@acmepay.com",
"phone": "+94771234567",
"businessType": "company",
"status": "active",
"walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
"webhookUrl": "https://acmepay.com/webhooks/openpay",
"twoFactorEnabled": true,
"createdAt": "2026-03-26T10:00:00Z",
"updatedAt": "2026-03-26T14:00:00Z"
}
Error Responses
400 Validation Error
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid wallet address format"
}
}
403 Forbidden
{
"error": {
"code": "FORBIDDEN",
"message": "You do not have permission to update this merchant"
}
}