Skip to content

Export Payments

Request URL

POST /payment-link/payment/export

Description

This endpoint will allow you (the client/platform) to export a .csv file containing a list of the payment link records that satisfy the specified criteria.

Schema

Property table for payment-link/payment/export

Property Description Required Schema
cFiTransactionId The transaction ID in the connectFi system No {
  "type": "string",
  "pattern": "^[0-9a-zA-Z_]+$",
  "minLength": 1,
  "maxLength": 36,
  "$id": "common-id"
}
cFiTransactionIds Array of transaction IDs from the connectFi system obtained when each transaction was initialized No array of {
  "type": "string"
}
status Status No {
  "type": "string",
  "nullable": true,
  "enum": [ "Initiated", "Sent", "Cancelled",
"Rejected", "Error", "Expired", "Processing",
"SentToPay", "Completed", "Settled",
"Returned", "Declined" ]
}
payerName Name of the payer No {
  "type": "string",
  "nullable": true
}
dateCreateFrom A beginning date in ISO Date format No {
  "type": "string",
  "nullable": true,
  "format": "dateISO"
}
dateCreateTo An ending date in ISO Date format No {
  "type": "string",
  "nullable": true,
  "format": "dateISO"
}
dueDateFrom A beginning date in ISO Date format No {
  "type": "string",
  "nullable": true,
  "format": "dateISO"
}
dueDateTo An ending date in ISO Date format No {
  "type": "string",
  "nullable": true,
  "format": "dateISO"
}
invoiceNumber The invoice number No {
  "type": "string",
  "pattern": "^((?![<>]).)*$",
  "minLength": 0,
  "maxLength": 50,
  "nullable": true,
  "$id": "common-commonStr50"
}
amountFrom A lower bound for amount No {
  "type": "number",
  "nullable": true
}
amountTo An upper bound for amount No {
  "type": "number",
  "nullable": true
}
paymentType The type of payment No {
  "type": "string",
  "nullable": true,
  "enum": [ "card", "ach" ]
}
numberOfRecords The maximum number of desired records to return No {
  "type": "number",
  "nullable": true
}
skipRecords The number of records to skip when returning results No {
  "type": "number",
  "nullable": true
}
cFiMerchantId The ID of the Merchant in connectFi No {
  "type": "string",
  "pattern": "^[0-9a-zA-Z_]+$",
  "minLength": 1,
  "maxLength": 36,
  "$id": "common-id"
}
cFiMerchantIds An array of connectFi Merchant IDs No array of {
  "type": "string"
}
cFiMerchantRef The external alphanumeric reference ID for the merchant entity in your system No {
  "type": "string",
  "pattern": "^[0-9a-zA-Z]+$",
  "minLength": 1,
  "maxLength": 32,
  "$id": "common-reference"
}

Request Body

{
  "cFiTransactionId": "29ljhq5Apu1YfdtU3wN7yx",
  "cFiTransactionIds": [],
  "dateCreateFrom": "2024-07-28T10:45:58.779+00:00",
  "dateCreateTo": "2024-08-01T10:45:58.779+00:00",
  "amountFrom": 0,
  "amountTo": 100,
  "payerName": "Doe John",
  "invoiceNumber": "11125",
  "cFiMerchantId": "2Bc0QW0VYJe7VhTyXXEYNQ",
  "cFiMerchantIds": [],
  "cFiMerchantRef": "1"
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
  "cFiTransactionId": "29ljhq5Apu1YfdtU3wN7yx",
  "cFiTransactionIds": [],
  "dateCreateFrom": "2024-07-28T10:45:58.779+00:00",
  "dateCreateTo": "2024-08-01T10:45:58.779+00:00",
  "amountFrom": 0,
  "amountTo": 100,
  "payerName": "Doe John",
  "invoiceNumber": "11125",
  "cFiMerchantId": "2Bc0QW0VYJe7VhTyXXEYNQ",
  "cFiMerchantIds": [],
  "cFiMerchantRef": "1"
};
const config = {
  method: 'POST',
  url: '${CONNECTFI_BASE_URL}/payment-link/payment/export',
  headers: {
    'Content-Type': "application/json",
    'x-connectfi-token': "A long random string token received from /auth/get-token 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/payment-link/payment/export" --data "{  \"cFiTransactionId\":\"29ljhq5Apu1YfdtU3wN7yx\", \"cFiTransactionIds\":[], \"dateCreateFrom\":\"2024-07-28T10:45:58.779+00:00\", \"dateCreateTo\":\"2024-08-01T10:45:58.779+00:00\", \"amountFrom\":0, \"amountTo\":100, \"payerName\":\"Doe John\", \"invoiceNumber\":\"11125\", \"cFiMerchantId\":\"2Bc0QW0VYJe7VhTyXXEYNQ\", \"cFiMerchantIds\":[], \"cFiMerchantRef\":\"1\"}" --header "Content-Type: application/json" --header "x-connectfi-token: A long random string token received from /auth/get-token request" 

Successful Response Examples

200 SUCCESSFUL RESPONSE

HEADERS

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

REQUEST BODY

{
  "cFiTransactionId": "m2GHCknYhGKZuF74jJPxu",
  "cFiTransactionIds": [],
  "dateCreateFrom": "2024-10-01T10:45:58.779+00:00",
  "dateCreateTo": "2024-10-26T10:45:58.779+00:00",
  "amountFrom": 0,
  "amountTo": 100,
  "payerName": "Doe John",
  "invoiceNumber": "11128",
  "cFiMerchantIds": [],
  "cFiMerchantRef": "12"
}

RESPONSE BODY

TRANSACTION ID,PLATFORM ID,INVOICE #,DATE CREATED (CST),DUE DATE,EXPIRATION DATE,FIRST NAME,LAST NAME,EMAIL,PHONE NUMBER,PAYMENT TYPE,AMOUNT,STATUS,MERCHANT #
m2GHCknYhGKZuF74jJPxu,CLIENTID,11128,2024-10-25T15:23:11.338Z,2024-10-29T00:00:00.000Z,,John,Doe,email.test+pltest1@test.email,,,1.5,Initiated,12