Skip to content

Debit Transaction

Request URL

POST /ibis/financial/funds-debit

Description

This endpoint will debit (pull) funds from the specified card or vAccount. When using this endpoint with a vAccount only account, use the issued cFiAccountId as the value for the cFiCardId property.

Note that funds cannot be pulled from a debit card or vAccount unless the card status code is "B" (ON) and funds are available. Also, when pulling funds from a credit card, the requested transfer will be declined if it causes the credit card to go over the available credit limit.

The /ibis/financial/funds-debit endpoint supports idempotency and will not accept requests with duplicate reference IDs. The external reference ID included in the request body is how connectFi controls for duplicate transaction requests. It is important to note that transaction requests submitted with unique reference IDs will not be considered duplicates, even if there are other properties with identical values. For example, the following requests are not considered duplicates.

{
    "reference": "EXT_REFERENCE_ID1", //Different reference IDs
    "cFiCardId": "icrd_4Iex5dfzlnJWTYal2K5YQI",
    "description": "Both of these transactions will post.",
    "amount": 24,
    "currency": "USD"
}
{
    "reference": "EXT_REFERENCE_ID2", //Different reference IDs
    "cFiCardId": "icrd_4Iex5dfzlnJWTYal2K5YQI",
    "description": "Both of these transactions will post.",
    "amount": 24,
    "currency": "USD"
}

Schema

Property table for ibis/financial/funds-debit

Property Description Required Schema
reference An external alphanumeric reference ID for the entity in your system Yes {
  "type": "string",
  "pattern": "^[0-9a-zA-Z]+$",
  "minLength": 1,
  "maxLength": 32,
  "description": "common-reference"
}
description description No {
  "type": "string",
  "minLength": 1,
  "maxLength": 60,
  "description": "ibis-description"
}
amount amount Yes {
  "type": "number",
  "exclusiveMinimum": 0,
  "amountPrecision": 2,
  "description": "common-amount"
}
currency A three character ISO alphabetic code to identify the currency Yes {
  "type": "string",
  "maxLength": 3,
  "minLength": 3,
  "pattern": "^[A-Z]+$",
  "description": "common-currency"
}
cFiCardId The card ID in connectFi Yes {
  "type": "string",
  "pattern": "^[0-9a-zA-Z_]+$",
  "minLength": 1,
  "maxLength": 36,
  "description": "common-id"
}

Request Body

{
    "reference": "ExtDFunds206",
    "cFiCardId": "icrd_575fma7wGFKTgSx537PMcO",
    "description": "Paying bill",
    "amount": 2.50,
    "currency": "USD"
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
    "reference": "ExtDFunds206",
    "cFiCardId": "icrd_575fma7wGFKTgSx537PMcO",
    "description": "Paying bill",
    "amount": 2.50,
    "currency": "USD"
}
;
const config = {
  method: 'POST',
  url: '${CONNECTFI_BASE_URL}/ibis/financial/funds-debit',
  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/ibis/financial/funds-debit" --data "{    \"reference\":\"ExtDFunds206\",   \"cFiCardId\":\"icrd_575fma7wGFKTgSx537PMcO\",   \"description\":\"Paying bill\",   \"amount\":2.50,   \"currency\":\"USD\"}" --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

{
    "reference": "ExtDFunds200",
    "cFiCardId": "icrd_1qaR2QEPXIRKr4jOyjQkTw",
    "description": "Paying bill",
    "amount": 1.50,
    "currency": "USD"
}

RESPONSE BODY

{
    "code": "0",
    "data": {
        "reference": "ExtDFunds200",
        "cFiFundsId": "ifnd_1BbJoybpUZYZRiTkAD4RZE",
        "cFiAggregatorId": "CLIENTID",
        "type": "debit",
        "cFiCardId": "icrd_1qaR2QEPXIRKr4jOyjQkTw",
        "cFiStatus": "Complete",
        "boTransId": "F2166100329",
        "arn": "0000000000000000002E",
        "fee": 0,
        "balance": 18.5,
        "lastDepositAmount": 0,
        "ledgerBalance": 18.5,
        "dtsCreatedAt": "2023-11-12T23:07:09.125Z",
        "cardPrgName": "GPR Card Program"
    },
    "requestId": "348e921081b011ee9b7427220cc6c212"
}