Skip to content

Get Invoice

Request URL

GET /payment-link/merchant/invoice/file/:cFiInvoiceId

Description

This endpoint will allow you (the client/platform) to retrieve the specfied invoice file.

Snippet Examples

javascript

const axios = require('axios');
const config = {
  method: 'GET',
  url: '${CONNECTFI_BASE_URL}/payment-link/merchant/invoice/file/:cFiInvoiceId',
  headers: {
    'x-connectfi-token': "A long random string token received from /auth/get-token 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/payment-link/merchant/invoice/file/:cFiInvoiceId"  --header "x-connectfi-token: A long random string token received from /auth/get-token request" 

Successful Response Examples

200 SUCCESSFUL RESPONSE

HEADERS

Header Value
x-connectfi-token A long random string token received from /auth/get-token request

PARAMETERS

Parameter Description Value
cFiInvoiceId 2IKDJF0ya3KWe2aaSliIsp

REQUEST BODY

none

RESPONSE BODY

//Invoice file will appear as a media type response