curl --request POST \
--url https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement/submit/ \
--header 'Content-Type: application/json' \
--header 'X-API-Version: <api-key>' \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>' \
--header 'X-Merchant-ID: <api-key>' \
--data '
{
"refs": [
"8207383264",
"5512907744"
]
}
'import requests
url = "https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement/submit/"
payload = { "refs": ["8207383264", "5512907744"] }
headers = {
"X-Client-ID": "<api-key>",
"X-Client-Secret": "<api-key>",
"X-Merchant-ID": "<api-key>",
"X-API-Version": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Client-ID': '<api-key>',
'X-Client-Secret': '<api-key>',
'X-Merchant-ID': '<api-key>',
'X-API-Version': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({refs: ['8207383264', '5512907744']})
};
fetch('https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement/submit/', 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/payments/{payment_id}/settlement/submit/",
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([
'refs' => [
'8207383264',
'5512907744'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Version: <api-key>",
"X-Client-ID: <api-key>",
"X-Client-Secret: <api-key>",
"X-Merchant-ID: <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/payments/{payment_id}/settlement/submit/"
payload := strings.NewReader("{\n \"refs\": [\n \"8207383264\",\n \"5512907744\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Client-ID", "<api-key>")
req.Header.Add("X-Client-Secret", "<api-key>")
req.Header.Add("X-Merchant-ID", "<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.post("https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement/submit/")
.header("X-Client-ID", "<api-key>")
.header("X-Client-Secret", "<api-key>")
.header("X-Merchant-ID", "<api-key>")
.header("X-API-Version", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"refs\": [\n \"8207383264\",\n \"5512907744\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement/submit/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Client-ID"] = '<api-key>'
request["X-Client-Secret"] = '<api-key>'
request["X-Merchant-ID"] = '<api-key>'
request["X-API-Version"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"refs\": [\n \"8207383264\",\n \"5512907744\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Documents submitted",
"data": {}
}Submit Settlement Documents
File a settled B2B-services payment’s delivery proofs by ref, and lock the set — in one call.
curl --request POST \
--url https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement/submit/ \
--header 'Content-Type: application/json' \
--header 'X-API-Version: <api-key>' \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>' \
--header 'X-Merchant-ID: <api-key>' \
--data '
{
"refs": [
"8207383264",
"5512907744"
]
}
'import requests
url = "https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement/submit/"
payload = { "refs": ["8207383264", "5512907744"] }
headers = {
"X-Client-ID": "<api-key>",
"X-Client-Secret": "<api-key>",
"X-Merchant-ID": "<api-key>",
"X-API-Version": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Client-ID': '<api-key>',
'X-Client-Secret': '<api-key>',
'X-Merchant-ID': '<api-key>',
'X-API-Version': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({refs: ['8207383264', '5512907744']})
};
fetch('https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement/submit/', 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/payments/{payment_id}/settlement/submit/",
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([
'refs' => [
'8207383264',
'5512907744'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Version: <api-key>",
"X-Client-ID: <api-key>",
"X-Client-Secret: <api-key>",
"X-Merchant-ID: <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/payments/{payment_id}/settlement/submit/"
payload := strings.NewReader("{\n \"refs\": [\n \"8207383264\",\n \"5512907744\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Client-ID", "<api-key>")
req.Header.Add("X-Client-Secret", "<api-key>")
req.Header.Add("X-Merchant-ID", "<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.post("https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement/submit/")
.header("X-Client-ID", "<api-key>")
.header("X-Client-Secret", "<api-key>")
.header("X-Merchant-ID", "<api-key>")
.header("X-API-Version", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"refs\": [\n \"8207383264\",\n \"5512907744\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement/submit/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Client-ID"] = '<api-key>'
request["X-Client-Secret"] = '<api-key>'
request["X-Merchant-ID"] = '<api-key>'
request["X-API-Version"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"refs\": [\n \"8207383264\",\n \"5512907744\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Documents submitted",
"data": {}
}Overview
Closes the post-settlement compliance step. Send theref of every delivery proof you want on the record; this call names them as the payment’s set, drops any upload it does not name, and locks the result.
curl -X POST 'https://api-pacb-uat.eximpe.com/pg/payments/PR6938527534/settlement/submit/' \
-H 'X-Client-ID: <client_id>' -H 'X-Client-Secret: <client_secret>' \
-H 'X-API-Version: 3.0.0' \
-H 'Content-Type: application/json' \
-d '{ "refs": ["8207383264", "5512907744"] }'
{
"success": true,
"message": "Documents submitted",
"data": {}
}
The request
One key.ref of each delivery proof to file against this payment, from Upload Document.Every ref must be an upload made against this payment — a ref from another of your payments reads as unknown, the same answer a made-up one gets. A ref repeated in one call files one document.refs is the whole set, not an addition to it. A delivery proof you uploaded against this payment and do not name here is deactivated by this call: what you send is what ops sees. Read the set back with List Settlement Documents first if you are unsure what you are holding.doc_type. The type you uploaded under already decided where the file was stored, so this call has nothing to cross-check — an invoice ref is simply not one of this payment’s settlement documents and reads as ERR_B2B_SETTLEMENT_001.What “complete” means here
B2B services requires at least onedelivery_proof. That is the whole test — there is no per-type checklist as there is on the goods flow, and many files ride under the single type.
Sending refs: [], or omitting the key, is a 400.
FRESH. Fix the ref and send the complete list again — you are not left with half a set.ERR_B2B_SETTLEMENT_002. Read the set back with List Settlement Documents before you call this.Errors
Every refusal is a400 in the standard envelope:
{
"success": false,
"error": {
"code": "ERR_B2B_SETTLEMENT_004",
"message": "Upload all required documents before submitting.",
"details": "Upload all required documents before submitting."
}
}
| Cause | code | What to do |
|---|---|---|
refs is empty or absent | ERR_B2B_SETTLEMENT_004 | Send at least one delivery_proof ref. |
| A ref is not one of this payment’s delivery proofs | ERR_B2B_SETTLEMENT_001 | The same answer whether it does not exist, was uploaded against another payment, or was uploaded as an invoice. Upload the file against this payment with type=delivery_proof. |
| The payment is not settled | ERR_B2B_SETTLEMENT_003 | Wait for PAYMENT_SETTLED. |
| Already submitted | ERR_B2B_SETTLEMENT_002 | Nothing to do — the step is done. Read state from List Settlement Documents to tell the two apart before calling. |
| The payment is not a B2B-services payment | 40360 | B2B goods has no partner-API settlement path. |
| The payment id does not resolve for this caller | 40360 | The same answer whether it does not exist or belongs to another merchant, so the endpoint never confirms someone else’s payment id. |
400 carrying ERR_B2B_SETTLEMENT_001 does not tell you the payment has settled, only that the ref did not resolve. An empty list, which names no ref, does surface the state: an unsettled payment answers ERR_B2B_SETTLEMENT_003 rather than _004.Related
Upload Document
ref.List Settlement Documents
B2B Services Verification
Authorizations
Client Application ID - Your unique application identifier used to authenticate API requests. You can find your Client ID in the Developer Settings section of the merchant dashboard.
Client Secret Key - Your secret key used alongside the Client ID for secure authentication. Keep this confidential and never expose it in client-side code. Available in the Developer Settings section of the merchant dashboard.
Merchant Identifier - The unique ID for the merchant account. This is required for PSP (Payment Service Provider) merchants who manage multiple merchant accounts. You can find merchant IDs in the Merchant Management section of the dashboard.
API Version - Specifies which version of the API to use (e.g., '1.X.X', '2.X.X', or '3.X.X'). This header allows you to control which API version your integration uses. Default version information is available in the Developer Settings.
Path Parameters
UID of the settled B2B-services payment the documents belong to.
Body
The ref of each uploaded file to file against this payment. Every ref must belong to the calling merchant and must have been uploaded under a type this flow files (delivery_proof). A ref repeated in one call files one document. An empty or omitted list is refused as an incomplete set.
64["8207383264", "5512907744"]