Skip to content

Query Transactions

Request URL

POST /transfer-to/ach/query

Description

The status of up to 20 ACH payments may be requested at a time (either using the "references" array or the "cFiTransactionIds" array). The array that you include may not be an empty array.

The system will return only the ACH payments it could locate. Unknown IDs will be ignored and if no IDs are recognized, an empty array is returned with success code "0".

If the same ID is requested multiple times in the "сFiTransactionIds" or "references" array, the response will only return one object in the data array corresponding to that ID, regardless of how many times it was listed in the request array.

If more than 20 elements are listed in the request array (either "сFiTransactionIds" array or the "references" array), an error will be thrown even if the IDs are not unique. For example, if the cFiTransactionId "CLIENTID_5dRyPYn4mlXUAOTfhObZlw" is listed 21 times in the request array, the request will fail even though technically only one unique ID was requested.

Either "cFiTransactionIds": [...] should be used or "references": [...], but not both. You cannot combine both types of IDs into a single request.

Schema

Property table for schema 1 for transfer-to/ach/query

Property Description Required Schema
cFiTransactionIds Array of transaction IDs from the connectFi system obtained when each transaction was initialized Yes array of {
  "type": "string",
  "pattern": "^[0-9a-zA-Z_]+$",
  "minLength": 1,
  "maxLength": 36,
  "description": "common-id"
}

Property table for schema 2 for transfer-to/ach/query

Property Description Required Schema
references An array of external references Yes array of {
  "type": "string",
  "pattern": "^[0-9a-zA-Z]+$",
  "minLength": 1,
  "maxLength": 32,
  "description": "common-reference"
}

Request Body

{
    "cFiTransactionIds": [ 
        "CLIENTID_7jtkROwe7pLEIVHIiSfgvE", 
        "CLIENTID_6CX4ofCQ1FuyXL72EFMjfk"
        ]
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
    "cFiTransactionIds": [ 
        "CLIENTID_7jtkROwe7pLEIVHIiSfgvE", 
        "CLIENTID_6CX4ofCQ1FuyXL72EFMjfk"
        ]
}
;
const config = {
  method: 'POST',
  url: '${CONNECTFI_BASE_URL}/transfer-to/ach/query',
  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/transfer-to/ach/query" --data "{\"cFiTransactionIds\":[         \"CLIENTID_7jtkROwe7pLEIVHIiSfgvE\",        \"CLIENTID_6CX4ofCQ1FuyXL72EFMjfk\"        ]}" --header "Content-Type: application/json" --header "x-connectfi-token: A long random string token received from /auth/get-token request" 

Successful Response Examples

200 TRANSFER-TO/ACH/QUERY SUCCESSFUL RESPONSE USING CFITRANSACTIONIDS

HEADERS

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

REQUEST BODY

{
    "cFiTransactionIds": [ 
        "CLIENTID_7jtkROwe7pLEIVHIiSfgvE", "CLIENTID_6CX4ofCQ1FuyXL72EFMjfk"
        ]
}

RESPONSE BODY

{
    "code": "0",
    "data": [
        {
            "cFiTransactionId": "CLIENTID_6CX4ofCQ1FuyXL72EFMjfk",
            "reference": "extTrnAch450",
            "cFiAggregatorId": "CLIENTID",
            "status": "Initiated",
            "dtsCreatedAt": "2023-11-02T17:32:52.563Z",
            "effectiveEntryDate": "2023-11-03",
            "individualName": "John Smith",
            "routingNumber": "053207766",
            "amount": 3.15,
            "currency": "USD",
            "DFIAccountNumber": "123456789"
        },
        {
            "cFiTransactionId": "CLIENTID_7jtkROwe7pLEIVHIiSfgvE",
            "reference": "extTrnAch154",
            "cFiAggregatorId": "CLIENTID",
            "status": "Returned",
            "dtsCreatedAt": "2023-07-10T16:58:05.589Z",
            "effectiveEntryDate": "2023-07-11",
            "individualName": "John Smith",
            "routingNumber": "053207766",
            "amount": 3.15,
            "currency": "USD",
            "DFIAccountNumber": "123456789"
        }
    ],
    "requestId": "b0f7407079a611eeb5658f28ab5fe311"
}

200 TRANSFER-TO/ACH/QUERY SUCCESSFUL RESPONSE USING REFERENCES

HEADERS

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

REQUEST BODY

{
    "references": [ "extTrnAch154", "extTrnAch450" ]
}

RESPONSE BODY

{
    "code": "0",
    "data": [
        {
            "cFiTransactionId": "CLIENTID_7jtkROwe7pLEIVHIiSfgvE",
            "reference": "extTrnAch154",
            "cFiAggregatorId": "CLIENTID",
            "status": "Returned",
            "dtsCreatedAt": "2023-07-10T16:58:05.589Z",
            "effectiveEntryDate": "2023-07-11",
            "individualName": "John Smith",
            "routingNumber": "053207766",
            "amount": 3.15,
            "currency": "USD",
            "DFIAccountNumber": "123456789"
        },
        {
            "cFiTransactionId": "CLIENTID_6CX4ofCQ1FuyXL72EFMjfk",
            "reference": "extTrnAch450",
            "cFiAggregatorId": "CLIENTID",
            "status": "Initiated",
            "dtsCreatedAt": "2023-11-02T17:32:52.563Z",
            "effectiveEntryDate": "2023-11-03",
            "individualName": "John Smith",
            "routingNumber": "053207766",
            "amount": 3.15,
            "currency": "USD",
            "DFIAccountNumber": "123456789"
        }
    ],
    "requestId": "d2b84dd079a611eeb5658f28ab5fe311"
}

200 TRANSFER-TO/ACH/QUERY USING CFITRANSACTIONIDS SUCCESSFUL RESPONSE - REQUESTED IDS NOT RECOGNIZED

HEADERS

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

REQUEST BODY

{
    "cFiTransactionIds": [ 
        "unknownId1", 
        "unknownId2"
        ]
}

RESPONSE BODY

{
    "code": "0",
    "data": [],
    "requestId": "cbd6e930819a11ee9b7427220cc6c212"
}