Credit Transaction
Request URL
POST /ibis/financial/funds-credit
Description
This endpoint will credit (add) funds to 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.
The /ibis/financial/funds-credit 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-credit
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, "$id": "common-reference" } |
description | Description | No | { "type": "string", "minLength": 1, "maxLength": 60, "$id": "ibis-description" } |
amount | Amount | Yes | { "type": "number", "exclusiveMinimum": 0, "amountPrecision": 2, "$id": "common-amount" } |
currency | A three character ISO alphabetic code to identify the currency | Yes | { "type": "string", "maxLength": 3, "minLength": 3, "pattern": "^[A-Z]+$", "$id": "common-currency" } |
cFiCardId | The card ID in connectFi | Yes | { "type": "string", "pattern": "^[0-9a-zA-Z_]+$", "minLength": 1, "maxLength": 36, "$id": "common-id" } |
Request Body
{
"reference": "ExtCFunds206",
"cFiCardId": "icrd_575fma7wGFKTgSx537PMcO",
"description": "test trn",
"amount": 5,
"currency": "USD"
}
Snippet Examples
javascript
const axios = require('axios');
const data = {
"reference": "ExtCFunds206",
"cFiCardId": "icrd_575fma7wGFKTgSx537PMcO",
"description": "test trn",
"amount": 5,
"currency": "USD"
}
;
const config = {
method: 'POST',
url: '${CONNECTFI_BASE_URL}/ibis/financial/funds-credit',
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-credit" --data "{ \"reference\":\"ExtCFunds206\", \"cFiCardId\":\"icrd_575fma7wGFKTgSx537PMcO\", \"description\":\"test trn\", \"amount\":5, \"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": "ExtCFunds200",
"cFiCardId": "icrd_1qaR2QEPXIRKr4jOyjQkTw",
"description": "test trn",
"amount": 20,
"currency": "USD"
}
RESPONSE BODY
{
"code": "0",
"data": {
"reference": "ExtCFunds200",
"cFiFundsId": "ifnd_xiV52EEqIR1pemVvDqnUC",
"cFiAggregatorId": "CLIENTID",
"type": "credit",
"cFiCardId": "icrd_1qaR2QEPXIRKr4jOyjQkTw",
"cFiStatus": "Complete",
"boTransId": "F2166100328",
"arn": "0000000000000000002D",
"fee": 0,
"balance": 20,
"lastDepositAmount": 0,
"ledgerBalance": 20,
"dtsCreatedAt": "2023-11-12T23:06:10.553Z"
},
"requestId": "119ea1a081b011ee9b7427220cc6c212"
}