Update Order
curl --request PATCH \
--url https://api-staging.eximpe.com/pg/orders/{order_id} \
--header 'Content-Type: application/json' \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>' \
--data '
{
"buyer": {
"pan_number": "BNYPG9212K",
"dob": "2010-01-23"
},
"invoice": {
"number": "INV_2TIO9F",
"date": "2025-06-22"
}
}
'import requests
url = "https://api-staging.eximpe.com/pg/orders/{order_id}"
payload = {
"buyer": {
"pan_number": "BNYPG9212K",
"dob": "2010-01-23"
},
"invoice": {
"number": "INV_2TIO9F",
"date": "2025-06-22"
}
}
headers = {
"X-Client-ID": "<api-key>",
"X-Client-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Client-ID': '<api-key>',
'X-Client-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
buyer: {pan_number: 'BNYPG9212K', dob: '2010-01-23'},
invoice: {number: 'INV_2TIO9F', date: '2025-06-22'}
})
};
fetch('https://api-staging.eximpe.com/pg/orders/{order_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://api-staging.eximpe.com/pg/orders/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'buyer' => [
'pan_number' => 'BNYPG9212K',
'dob' => '2010-01-23'
],
'invoice' => [
'number' => 'INV_2TIO9F',
'date' => '2025-06-22'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Client-ID: <api-key>",
"X-Client-Secret: <api-key>"
],
]);
$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://api-staging.eximpe.com/pg/orders/{order_id}"
payload := strings.NewReader("{\n \"buyer\": {\n \"pan_number\": \"BNYPG9212K\",\n \"dob\": \"2010-01-23\"\n },\n \"invoice\": {\n \"number\": \"INV_2TIO9F\",\n \"date\": \"2025-06-22\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Client-ID", "<api-key>")
req.Header.Add("X-Client-Secret", "<api-key>")
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.patch("https://api-staging.eximpe.com/pg/orders/{order_id}")
.header("X-Client-ID", "<api-key>")
.header("X-Client-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"buyer\": {\n \"pan_number\": \"BNYPG9212K\",\n \"dob\": \"2010-01-23\"\n },\n \"invoice\": {\n \"number\": \"INV_2TIO9F\",\n \"date\": \"2025-06-22\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.eximpe.com/pg/orders/{order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Client-ID"] = '<api-key>'
request["X-Client-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"buyer\": {\n \"pan_number\": \"BNYPG9212K\",\n \"dob\": \"2010-01-23\"\n },\n \"invoice\": {\n \"number\": \"INV_2TIO9F\",\n \"date\": \"2025-06-22\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Order updated successfully",
"data": {
"success": true,
"message": "Order updated successfully",
"data": {
"order_id": "{Order_ID}",
"buyer": {
"pan_number": "BNYPG9212K",
"dob": "2010-01-23"
},
"invoice": {
"number": "INV_2TIO9F",
"date": "2025-06-22"
}
}
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"message": "Order not found",
"error": {
"code": "ERR_ORDER_404",
"message": "Order with ID 'OD3451762252' not found"
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Order
Update Order
Update specific fields of an existing order.
PATCH
/
pg
/
orders
/
{order_id}
Update Order
curl --request PATCH \
--url https://api-staging.eximpe.com/pg/orders/{order_id} \
--header 'Content-Type: application/json' \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>' \
--data '
{
"buyer": {
"pan_number": "BNYPG9212K",
"dob": "2010-01-23"
},
"invoice": {
"number": "INV_2TIO9F",
"date": "2025-06-22"
}
}
'import requests
url = "https://api-staging.eximpe.com/pg/orders/{order_id}"
payload = {
"buyer": {
"pan_number": "BNYPG9212K",
"dob": "2010-01-23"
},
"invoice": {
"number": "INV_2TIO9F",
"date": "2025-06-22"
}
}
headers = {
"X-Client-ID": "<api-key>",
"X-Client-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Client-ID': '<api-key>',
'X-Client-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
buyer: {pan_number: 'BNYPG9212K', dob: '2010-01-23'},
invoice: {number: 'INV_2TIO9F', date: '2025-06-22'}
})
};
fetch('https://api-staging.eximpe.com/pg/orders/{order_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://api-staging.eximpe.com/pg/orders/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'buyer' => [
'pan_number' => 'BNYPG9212K',
'dob' => '2010-01-23'
],
'invoice' => [
'number' => 'INV_2TIO9F',
'date' => '2025-06-22'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Client-ID: <api-key>",
"X-Client-Secret: <api-key>"
],
]);
$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://api-staging.eximpe.com/pg/orders/{order_id}"
payload := strings.NewReader("{\n \"buyer\": {\n \"pan_number\": \"BNYPG9212K\",\n \"dob\": \"2010-01-23\"\n },\n \"invoice\": {\n \"number\": \"INV_2TIO9F\",\n \"date\": \"2025-06-22\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Client-ID", "<api-key>")
req.Header.Add("X-Client-Secret", "<api-key>")
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.patch("https://api-staging.eximpe.com/pg/orders/{order_id}")
.header("X-Client-ID", "<api-key>")
.header("X-Client-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"buyer\": {\n \"pan_number\": \"BNYPG9212K\",\n \"dob\": \"2010-01-23\"\n },\n \"invoice\": {\n \"number\": \"INV_2TIO9F\",\n \"date\": \"2025-06-22\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.eximpe.com/pg/orders/{order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Client-ID"] = '<api-key>'
request["X-Client-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"buyer\": {\n \"pan_number\": \"BNYPG9212K\",\n \"dob\": \"2010-01-23\"\n },\n \"invoice\": {\n \"number\": \"INV_2TIO9F\",\n \"date\": \"2025-06-22\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Order updated successfully",
"data": {
"success": true,
"message": "Order updated successfully",
"data": {
"order_id": "{Order_ID}",
"buyer": {
"pan_number": "BNYPG9212K",
"dob": "2010-01-23"
},
"invoice": {
"number": "INV_2TIO9F",
"date": "2025-06-22"
}
}
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"message": "Order not found",
"error": {
"code": "ERR_ORDER_404",
"message": "Order with ID 'OD3451762252' not found"
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Overview
The Update Order endpoint enables you to modify specific information of an existing order, such as buyer details (PAN number, date of birth) and invoice information. This is useful for correcting or updating order details after creation. You can update the following fields:- Buyer Information: PAN number, date of birth
- Invoice Information: Invoice number, invoice date
Authorizations
Client app ID. You can find your app id in the merchant dashboard.
Client secret key. You can find your secret in the merchant dashboard.
Path Parameters
Unique identifier of the order
Body
application/json
Order update request - only include fields to update
⌘I