List post-settlement documents
curl --request GET \
--url https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement-documents/ \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>' \
--header 'X-Merchant-ID: <api-key>'import requests
url = "https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement-documents/"
headers = {
"X-Client-ID": "<api-key>",
"X-Client-Secret": "<api-key>",
"X-Merchant-ID": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Client-ID': '<api-key>',
'X-Client-Secret': '<api-key>',
'X-Merchant-ID': '<api-key>'
}
};
fetch('https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement-documents/', 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-documents/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement-documents/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-ID", "<api-key>")
req.Header.Add("X-Client-Secret", "<api-key>")
req.Header.Add("X-Merchant-ID", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement-documents/")
.header("X-Client-ID", "<api-key>")
.header("X-Client-Secret", "<api-key>")
.header("X-Merchant-ID", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement-documents/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Client-ID"] = '<api-key>'
request["X-Client-Secret"] = '<api-key>'
request["X-Merchant-ID"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Settlement documents",
"data": {
"state": "FRESH",
"is_settled": true,
"is_multi": true,
"required_doc_types": [
"delivery_proof"
],
"submitted_at": null,
"documents": [
{
"document_id": "4193006825",
"doc_type": "delivery_proof",
"file_name": "delivery-note.pdf",
"file": "https://bucket.s3.amazonaws.com/lrs_documents/308/8207383264/delivery-note.pdf?X-Amz-Signature=..."
}
]
}
}B2B Services
List Settlement Documents
Every post-settlement compliance document filed against a settled B2B-services payment, and whether the set is locked.
GET
/
pg
/
payments
/
{payment_id}
/
settlement-documents
/
List post-settlement documents
curl --request GET \
--url https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement-documents/ \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>' \
--header 'X-Merchant-ID: <api-key>'import requests
url = "https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement-documents/"
headers = {
"X-Client-ID": "<api-key>",
"X-Client-Secret": "<api-key>",
"X-Merchant-ID": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Client-ID': '<api-key>',
'X-Client-Secret': '<api-key>',
'X-Merchant-ID': '<api-key>'
}
};
fetch('https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement-documents/', 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-documents/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement-documents/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-ID", "<api-key>")
req.Header.Add("X-Client-Secret", "<api-key>")
req.Header.Add("X-Merchant-ID", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement-documents/")
.header("X-Client-ID", "<api-key>")
.header("X-Client-Secret", "<api-key>")
.header("X-Merchant-ID", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-pacb-uat.eximpe.com/pg/payments/{payment_id}/settlement-documents/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Client-ID"] = '<api-key>'
request["X-Client-Secret"] = '<api-key>'
request["X-Merchant-ID"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Settlement documents",
"data": {
"state": "FRESH",
"is_settled": true,
"is_multi": true,
"required_doc_types": [
"delivery_proof"
],
"submitted_at": null,
"documents": [
{
"document_id": "4193006825",
"doc_type": "delivery_proof",
"file_name": "delivery-note.pdf",
"file": "https://bucket.s3.amazonaws.com/lrs_documents/308/8207383264/delivery-note.pdf?X-Amz-Signature=..."
}
]
}
}Overview
Once a B2B-services payment is settled, one more compliance step remains: evidence that the service was actually delivered. This endpoint reads the delivery proofs you have uploaded against the payment, and whether the set is locked. It is safe to call at any time — it reads, it never re-runs anything. That includes before the payment settles: it answers withis_settled: false rather than refusing. Only Submit Settlement Documents refuses on an unsettled payment.
B2B services only. A payment that is not a B2B-services payment is refused. B2B goods has no partner-API settlement path.
Response
{
"success": true,
"message": "Settlement documents",
"data": {
"state": "FRESH",
"is_settled": true,
"is_multi": true,
"required_doc_types": ["delivery_proof"],
"submitted_at": null,
"documents": [
{
"document_id": "4193006825",
"doc_type": "delivery_proof",
"file_name": "delivery-note.pdf",
"file": "https://…s3.amazonaws.com/…?X-Amz-Signature=…"
},
{
"document_id": "7250884131",
"doc_type": "delivery_proof",
"file_name": "signed-acceptance.pdf",
"file": "https://…s3.amazonaws.com/…?X-Amz-Signature=…"
}
]
}
}
documents array means you have uploaded nothing yet — not that nothing is owed.
FRESH (nothing filed yet) or SUBMITTED (filed and locked). Two values, not three — there is no draft on this surface, because one submit files the set in a single call. documents is listed in both states, so FRESH means “this is what you are holding”, not “this is empty”. Read this before submitting: once it is SUBMITTED, a second submit is refused with ERR_B2B_SETTLEMENT_002.Whether the payment has settled. Documents can only be filed after it has; submitting earlier is refused with
ERR_B2B_SETTLEMENT_003. Uploading earlier is allowed, and so is this read.Every type this flow accepts. Because
is_multi is true, the set is complete once one file of any listed type is filed — not one of each. A single-file flow (is_multi: false) would need one of every type.An upload under a type not listed here never reaches this set at all, so a ref from one is refused by the submit with ERR_B2B_SETTLEMENT_001.The document’s id — the same value as the
ref Upload Document handed you. The upload writes this row, so there is only one id to hold on to.The type the file was uploaded under — you never send a
doc_type again after the upload. B2B services has exactly one, delivery_proof, and accepts many files under it. Goods is the opposite — one file per type — which is why the two flows do not share an endpoint.A pre-signed, time-limited URL for the stored file. Fetch it if you need the document back; do not store the URL itself, as it expires.
What is listed
Only active documents, oldest upload first. A delivery proof appears here as soon as it is uploaded, so you can check what you are holding before you file it. Uploading is not filing. Therefs array on the submit is the whole set — a document you do not name there is deactivated and stops being listed. After a submit, this list is exactly what you filed.
Errors
Reading the set is refused only when the payment itself does not qualify. Both cases are a400 carrying 40360; the details string says which.
| Cause | code | What to do |
|---|---|---|
| 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 payment is not a B2B-services payment | 40360 | B2B goods has no partner-API settlement path. |
{
"success": false,
"error": {
"code": 40360,
"message": "Payment is not in a state that accepts verification details.",
"details": "Payment is not in a state that accepts verification details. Payment not found."
}
}
Related
Submit Settlement Documents
File the delivery proofs by
ref and lock the set.Upload Document
Upload each delivery proof and keep its
ref.B2B Services Verification
The whole flow, in order.