Update Order
curl --request PATCH \
--url https://api-pacb-uat.eximpe.com/pg/orders/{order_id}/ \
--header 'Content-Type: application/json' \
--header 'X-API-Version: <api-key>' \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>' \
--data '
{
"buyer": {
"pan_number": "CDEFG1234H",
"dob": "1992-08-14"
},
"invoice": {
"number": "INV_UPDATED_2024_1205",
"date": "2024-12-05"
}
}
'import requests
url = "https://api-pacb-uat.eximpe.com/pg/orders/{order_id}/"
payload = {
"buyer": {
"pan_number": "CDEFG1234H",
"dob": "1992-08-14"
},
"invoice": {
"number": "INV_UPDATED_2024_1205",
"date": "2024-12-05"
}
}
headers = {
"X-Client-ID": "<api-key>",
"X-Client-Secret": "<api-key>",
"X-API-Version": "<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>',
'X-API-Version': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
buyer: {pan_number: 'CDEFG1234H', dob: '1992-08-14'},
invoice: {number: 'INV_UPDATED_2024_1205', date: '2024-12-05'}
})
};
fetch('https://api-pacb-uat.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-pacb-uat.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' => 'CDEFG1234H',
'dob' => '1992-08-14'
],
'invoice' => [
'number' => 'INV_UPDATED_2024_1205',
'date' => '2024-12-05'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Version: <api-key>",
"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-pacb-uat.eximpe.com/pg/orders/{order_id}/"
payload := strings.NewReader("{\n \"buyer\": {\n \"pan_number\": \"CDEFG1234H\",\n \"dob\": \"1992-08-14\"\n },\n \"invoice\": {\n \"number\": \"INV_UPDATED_2024_1205\",\n \"date\": \"2024-12-05\"\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("X-API-Version", "<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-pacb-uat.eximpe.com/pg/orders/{order_id}/")
.header("X-Client-ID", "<api-key>")
.header("X-Client-Secret", "<api-key>")
.header("X-API-Version", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"buyer\": {\n \"pan_number\": \"CDEFG1234H\",\n \"dob\": \"1992-08-14\"\n },\n \"invoice\": {\n \"number\": \"INV_UPDATED_2024_1205\",\n \"date\": \"2024-12-05\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-pacb-uat.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["X-API-Version"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"buyer\": {\n \"pan_number\": \"CDEFG1234H\",\n \"dob\": \"1992-08-14\"\n },\n \"invoice\": {\n \"number\": \"INV_UPDATED_2024_1205\",\n \"date\": \"2024-12-05\"\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": "CDEFG1234H",
"dob": "1992-08-14"
},
"invoice": {
"number": "INV_UPDATED_2024_1205",
"date": "2024-12-05"
}
}
}
}{
"success": false,
"error": {
"code": "ERR_ORDER_002",
"message": "Validation error",
"details": {
"buyer": {
"pan_number": "PAN number must be in format: AAAAA1111A (5 letters, 4 digits, 1 letter)"
}
}
}
}{
"success": false,
"error": {
"code": "ERR_AUTH_000",
"message": "Missing credentials",
"details": {
"authentication": "Missing credentials."
}
}
}{
"success": false,
"error": {
"code": "ERR_ORDER_001",
"message": "Order not found",
"details": {
"order_id": "Order not found"
}
}
}{
"success": false,
"error": {
"code": "ERR_SERVICE_ERROR_000",
"message": "Payment gateway error",
"details": {
"error": "An unexpected error occurred. Please try again later"
}
}
}Order
Update Order
Update specific fields of an existing order.
PATCH
/
pg
/
orders
/
{order_id}
/
Update Order
curl --request PATCH \
--url https://api-pacb-uat.eximpe.com/pg/orders/{order_id}/ \
--header 'Content-Type: application/json' \
--header 'X-API-Version: <api-key>' \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>' \
--data '
{
"buyer": {
"pan_number": "CDEFG1234H",
"dob": "1992-08-14"
},
"invoice": {
"number": "INV_UPDATED_2024_1205",
"date": "2024-12-05"
}
}
'import requests
url = "https://api-pacb-uat.eximpe.com/pg/orders/{order_id}/"
payload = {
"buyer": {
"pan_number": "CDEFG1234H",
"dob": "1992-08-14"
},
"invoice": {
"number": "INV_UPDATED_2024_1205",
"date": "2024-12-05"
}
}
headers = {
"X-Client-ID": "<api-key>",
"X-Client-Secret": "<api-key>",
"X-API-Version": "<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>',
'X-API-Version': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
buyer: {pan_number: 'CDEFG1234H', dob: '1992-08-14'},
invoice: {number: 'INV_UPDATED_2024_1205', date: '2024-12-05'}
})
};
fetch('https://api-pacb-uat.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-pacb-uat.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' => 'CDEFG1234H',
'dob' => '1992-08-14'
],
'invoice' => [
'number' => 'INV_UPDATED_2024_1205',
'date' => '2024-12-05'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Version: <api-key>",
"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-pacb-uat.eximpe.com/pg/orders/{order_id}/"
payload := strings.NewReader("{\n \"buyer\": {\n \"pan_number\": \"CDEFG1234H\",\n \"dob\": \"1992-08-14\"\n },\n \"invoice\": {\n \"number\": \"INV_UPDATED_2024_1205\",\n \"date\": \"2024-12-05\"\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("X-API-Version", "<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-pacb-uat.eximpe.com/pg/orders/{order_id}/")
.header("X-Client-ID", "<api-key>")
.header("X-Client-Secret", "<api-key>")
.header("X-API-Version", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"buyer\": {\n \"pan_number\": \"CDEFG1234H\",\n \"dob\": \"1992-08-14\"\n },\n \"invoice\": {\n \"number\": \"INV_UPDATED_2024_1205\",\n \"date\": \"2024-12-05\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-pacb-uat.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["X-API-Version"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"buyer\": {\n \"pan_number\": \"CDEFG1234H\",\n \"dob\": \"1992-08-14\"\n },\n \"invoice\": {\n \"number\": \"INV_UPDATED_2024_1205\",\n \"date\": \"2024-12-05\"\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": "CDEFG1234H",
"dob": "1992-08-14"
},
"invoice": {
"number": "INV_UPDATED_2024_1205",
"date": "2024-12-05"
}
}
}
}{
"success": false,
"error": {
"code": "ERR_ORDER_002",
"message": "Validation error",
"details": {
"buyer": {
"pan_number": "PAN number must be in format: AAAAA1111A (5 letters, 4 digits, 1 letter)"
}
}
}
}{
"success": false,
"error": {
"code": "ERR_AUTH_000",
"message": "Missing credentials",
"details": {
"authentication": "Missing credentials."
}
}
}{
"success": false,
"error": {
"code": "ERR_ORDER_001",
"message": "Order not found",
"details": {
"order_id": "Order not found"
}
}
}{
"success": false,
"error": {
"code": "ERR_SERVICE_ERROR_000",
"message": "Payment gateway error",
"details": {
"error": "An unexpected error occurred. Please try again later"
}
}
}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 updating order details after creation or if additional buyer information is requested from the bank. You can update the following fields:- Buyer Information: PAN number, date of birth
- Invoice Information: Invoice number, invoice date
Request Parameters
Path
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| order_id | path | string | Yes | Unique identifier of the order |
Body (JSON)
Only include the fields you want to update.Parameter Definitions
Top-level
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
| buyer | object | No | Buyer information to update | See Buyer object |
| invoice | object | No | Invoice information to update | See Invoice object |
Buyer
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
| pan_number | string | No | Buyer’s PAN number | Format: Indian PAN (e.g., ABCDE1234F) |
| dob | string (date) | No | Buyer’s date of birth | Format: YYYY-MM-DD |
Invoice
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
| number | string | No | Invoice number | Max 255 chars |
| date | string (date) | No | Invoice date | Format: YYYY-MM-DD |
Authorizations
Body
application/json
Order update request - only include fields to update