Submit post-settlement documents
curl --request POST \
--url https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement/submit/ \
--header 'Content-Type: application/json' \
--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>",
"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>',
'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-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("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("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["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": {}
}B2B Services
Submit Settlement Documents
File a settled B2B-services payment’s delivery proofs by ref, and lock the set — in one call.
POST
/
pg
/
payments
/
{payment_id}
/
settlement
/
submit
/
Submit post-settlement documents
curl --request POST \
--url https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement/submit/ \
--header 'Content-Type: application/json' \
--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>",
"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>',
'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-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("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("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["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": ["4193006825", "7250884131"] }'
{
"success": true,
"message": "Documents submitted",
"data": {}
}
There is no attach step, and no draft. The draft window is the upload step: an upload is durable and readable back, so collect proof over days — before the payment settles, if you have it — read the set with List Settlement Documents, and send the refs when it is ready. This is the same shape Submit Verification Details uses for its documents — upload once, reference by id, file in the call that completes the set.
The request
One key.The
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.No
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.
The whole call is one transaction. If any ref is refused, nothing is filed, nothing is dropped, and the set stays
FRESH. Fix the ref and send the complete list again — you are not left with half a set.Submitting is final. The set becomes read-only; a second submit is refused with
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. |
refs is not a list, or a ref is over 64 characters or holds anything but letters, digits and dashes. | 40359 | Send refs as a list of the refs Upload Document returned. |
| 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. |
The refs are the payload, so they are answered for first. An unknown ref is reported before the payment’s own state is judged — a
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, and an already submitted set answers ERR_B2B_SETTLEMENT_002, rather than _004.Related
Upload Document
Upload each delivery proof and keep its
ref.List Settlement Documents
Read the set back before locking it.
B2B Services Verification
The whole flow, in order.
Authorizations
Headers
Path Parameters
Body
application/json
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.
Maximum string length:
64Example:
["8207383264", "5512907744"]