List Invoices
Request URL
POST /public/customer/payment/invoice/list
Description
This endpoint will allow the customer session corresponding to the provided 'x-connectfi-jwtoken' header to retrieve a list of invoice objects associated with the payment link. This action can also be facilitated through the payment page HTML that is provided when the customer payment link email is sent or, depending on client configurations, the payment link webhook.
Schema
Property table for public/customer/payment/invoice/list
Property | Description | Required | Schema |
---|---|---|---|
cFiInvoiceId | The ID of the invoice in connectFi | No | { "type": "string", "pattern": "^[0-9a-zA-Z_]+$", "minLength": 1, "maxLength": 36, "$id": "common-id" } |
cFiTransactionId | The transaction ID in the connectFi system | Yes | { "type": "string", "pattern": "^[0-9a-zA-Z_]+$", "minLength": 1, "maxLength": 36, "$id": "common-id" } |
Request Body
Snippet Examples
javascript
const axios = require('axios');
const data = {
"cFiTransactionId": "29ljhq5Apu1YfdtU3wN7yx"
};
const config = {
method: 'POST',
url: '${CONNECTFI_BASE_URL}/public/customer/payment/invoice/list',
headers: {
'Content-Type': "application/json",
'x-connectfi-jwtoken': "A long random string token received from /public/customer/payment/link request"
},
data
};
let result;
try {
result = await axios.request(config);
if (result.status === 200) {
console.log(JSON.stringify(result.data));
}
} catch (err) {
console.log({
errCode: err.code,
responseStatus: err.response && err.response.status,
data: err.response && JSON.stringify(err.response.data)
});
}
cURL
curl --location "CONNECTFI_BASE_URL/public/customer/payment/invoice/list" --data "{ \"cFiTransactionId\":\"29ljhq5Apu1YfdtU3wN7yx\"}" --header "Content-Type: application/json" --header "x-connectfi-jwtoken: A long random string token received from /public/customer/payment/link request"
Successful Response Examples
200 SUCCESSFUL RESPONSE
HEADERS
Header | Value |
---|---|
Content-Type | application/json |
x-connectfi-jwtoken | A long random string token received from /public/customer/payment/link request |
REQUEST BODY
RESPONSE BODY
{
"code": "0",
"data": [
{
"cFiInvoiceId": "2IKDJF0ya3KWe2aaSliIsp",
"cFiMerchantId": "2Bc0QW0VYJe7VhTyXXEYNQ",
"fileName": "Document Example.pdf",
"size": 33319,
"cFiTransactionId": "29ljhq5Apu1YfdtU3wN7yx",
"path": "public/customer/payment/invoice/file/2IKDJF0ya3KWe2aaSliIsp/?x-connectfi-jwtoken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjRmlUcmFuc2FjdGlvbklkIjoiMjlsamhxNUFwdTFZZmR0VTN3Tjd5eCIsImNGaVNlc3Npb25JZCI6IjN0TFhHbDBkTFRMUmU1YW8ycE9jdHIiLCJpYXQiOjE3MjI0MjY3ODUsImV4cCI6MTcyMjQzMDM4NX0.EIs9Wlj_-qQMsCE76uSwkWc-n2TEqWM4932LjbzqZ0U"
}
],
"requestId": "9dbc89804f3311ef92543a54d404e711"
}