Skip to content

Void Check

Request URL

POST /check/void

Description

Requests to the /check/void endpoint will update the status of the check in the connectFi database and will send a notification to the bank that the specified check has been voided.

If the check is voided before the original request is sent to the bank, the cFiCheckStatus will update to "Cancelled" and will not be sent to the bank for printing. If the original request to print the check has already been sent to the bank, then the check will be printed, mailed, and delivered as usual. However, when the check is presented for payment, the bank will see the status of the check as voided. Therefore, no payment will be issued for the voided check.

Schema

Property table for check/void

Property Description Required Schema
cFiCheckId Check ID from the connectFi system obtained when the check was initialized Yes {
  "type": "string",
  "pattern": "^[0-9a-zA-Z_]+$",
  "minLength": 1,
  "maxLength": 36,
  "description": "common-id"
}
reason reason No {
  "type": "string",
  "pattern": "^((?![<>]).)*$",
  "minLength": 0,
  "maxLength": 500,
  "nullable": true,
  "description": "common-commonStr500"
}

Request Body

{
    "cFiCheckId": "chk_3XQYOJdwgRO4kElIQvpqNy",
    "reason": "Lost the check"
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
    "cFiCheckId": "chk_3XQYOJdwgRO4kElIQvpqNy",
    "reason": "Lost the check"
};
const config = {
  method: 'POST',
  url: '${CONNECTFI_BASE_URL}/check/void',
  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/check/void" --data "{    \"cFiCheckId\":\"chk_3XQYOJdwgRO4kElIQvpqNy\",   \"reason\":\"Lost the check\"}" --header "Content-Type: application/json" --header "x-connectfi-token: A long random string token received from /auth/get-token request" 

Successful Response Examples

200 CHECK/VOID SUCCESS EXAMPLE (CANCELLED BEFORE CHECK WAS SENT TO BANK)

HEADERS

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

REQUEST BODY

{
    "cFiCheckId": "chk_3XQYOJdwgRO4kElIQvpqNy",
    "reason": "Lost the check"
}

RESPONSE BODY

{
    "code": "0",
    "data": {
        "cFiCheckId": "chk_3XQYOJdwgRO4kElIQvpqNy",
        "reference": "extChkRef470",
        "serial": "115",
        "amount": 11.13,
        "currency": "USD",
        "cFiAggregatorId": "CLIENTID",
        "cFiCheckStatus": "Cancelled",
        "initVoid": false,
        "voidReason": "Lost the check",
        "webhookUrl": "https://your_webhook_url/extChkRef470",
        "dtsCancelled": "2023-05-15T18:57:04.954Z",
        "dtsCreatedAt": "2023-05-03T17:11:14.167Z"
    },
    "requestId": "489d0030f35211ed926a56da8a862cd8"
}

200 CHECK/VOID SUCCESS EXAMPLE (VOIDED AFTER CHECK WAS SENT TO BANK)

HEADERS

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

REQUEST BODY

{
    "cFiCheckId": "chk_3XQYOJdwgRO4kElIQvpqNy",
    "reason": "Lost the check"
}

RESPONSE BODY

{
    "code": "0",
    "data": {
        "cFiCheckId": "chk_3XQYOJdwgRO4kElIQvpqNy",
        "reference": "extChkRef470",
        "serial": "116",
        "amount": 11.13,
        "currency": "USD",
        "cFiAggregatorId": "CLIENTID",
        "cFiCheckStatus": "InBank", //current check status in connectFi
        "cFiVoidStatus": "Processing", //current status of the void request in connectFi
        "voidReason": "Lost the check", //description of the reason the check is to be voided
        "boStatus": "Sent to Automail", //current check status in the back office
        "boStatusDate": "2023-3-31T15:48:46.1133333",
        "boDatePrinted": "2023-3-31T00:00:00", //date that the check was printed
        "boTracking": "64165468656789", //back office tracking number
        "initVoid": true,
        "webhookUrl": "https://your_webhook_url/extChkRef470",
        "dtsSent": "2023-03-31T18:50:34.202Z",
        "dtsVoidInitiated": "2023-04-03T16:53:48.670Z",
        "dtsCreatedAt": "2023-03-31T18:48:18.900Z"
    },
    "requestId": "489d0030f35211ed926a56da8a862cd8"
}