Get Invoice
Request URL
GET /public/customer/payment/invoice/file/:cFiInvoiceId
Description
This endpoint will allow the customer session corresponding to the provided 'x-connectfi-jwtoken' header to retrieve the specified invoice file. 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.
Snippet Examples
javascript
const axios = require('axios');
const config = {
method: 'GET',
url: '${CONNECTFI_BASE_URL}/public/customer/payment/invoice/file/:cFiInvoiceId',
headers: {
'x-connectfi-jwtoken': "A long random string token received from /public/customer/payment/link request"
},
};
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/file/:cFiInvoiceId" --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 |
---|---|
x-connectfi-jwtoken | A long random string token received from /public/customer/payment/link request |
PARAMETERS
Parameter | Description | Value |
---|---|---|
cFiInvoiceId | 2IKDJF0ya3KWe2aaSliIsp |
REQUEST BODY
RESPONSE BODY