Card2Card Transaction
Request URL
POST /ibis/financial/card-to-card
Description
This endpoint will transfer funds from one card to another card (or one vAccount to another vAccount). When using this endpoint to transfer between vAccount only accounts, use the issued cFiAccountIds as the value for the cardFromId and cardToId properties.
Note that funds cannot be pulled from a debit card or vAccount unless the status code is "B" (ON) and funds are available. You can, however, transfer funds to a pre-active card or vAccount (issued but not yet activated). 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/card-to-card 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
"cardFromId": "icrd_5lFBjJG6pPlapyodSxZ97a",
"cardToId": "icrd_71iRvTzeQckz3fNxQ2DVqM",
"description": "Both of these transactions will post.",
"amount": 50,
"currency": "USD"
}
{
"reference": "EXT_REFERENCE_ID2", //Different reference IDs
"cardFromId": "icrd_5lFBjJG6pPlapyodSxZ97a",
"cardToId": "icrd_71iRvTzeQckz3fNxQ2DVqM",
"description": "Both of these transactions will post.",
"amount": 50,
"currency": "USD"
}
Schema
Property table for ibis/financial/card-to-card
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" } |
cardFromId | The card ID in connectFi of the card to pull funds from | Yes | { "type": "string", "pattern": "^[0-9a-zA-Z_]+$", "minLength": 1, "maxLength": 36, "$id": "common-id" } |
cardToId | The card ID in connectFi of the card to push funds to | Yes | { "type": "string", "pattern": "^[0-9a-zA-Z_]+$", "minLength": 1, "maxLength": 36, "$id": "common-id" } |
Request Body
{
"reference": "ExtC2CFunds133",
"cardFromId": "icrd_1qaR2QEPXIRKr4jOyjQkTw",
"cardToId": "icrd_5Y3maHhGD2iEqZGEpN6jBg",
"description": "Transfer to other card",
"amount": 10.50,
"currency": "USD"
}
Snippet Examples
javascript
const axios = require('axios');
const data = {
"reference": "ExtC2CFunds133",
"cardFromId": "icrd_1qaR2QEPXIRKr4jOyjQkTw",
"cardToId": "icrd_5Y3maHhGD2iEqZGEpN6jBg",
"description": "Transfer to other card",
"amount": 10.50,
"currency": "USD"
}
;
const config = {
method: 'POST',
url: '${CONNECTFI_BASE_URL}/ibis/financial/card-to-card',
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/card-to-card" --data "{ \"reference\":\"ExtC2CFunds133\", \"cardFromId\":\"icrd_1qaR2QEPXIRKr4jOyjQkTw\", \"cardToId\":\"icrd_5Y3maHhGD2iEqZGEpN6jBg\", \"description\":\"Transfer to other card\", \"amount\":10.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 TRANSFER BETWEEN CARDS
HEADERS
Header | Value |
---|---|
Content-Type | application/json |
x-connectfi-token | A long random string token received from /auth/get-token request |
REQUEST BODY
{
"reference": "ExtC2CFunds134",
"cardFromId": "icrd_1qaR2QEPXIRKr4jOyjQkTw",
"cardToId": "icrd_5Y3maHhGD2iEqZGEpN6jBg",
"description": "Transfer to other card",
"amount": 10.50,
"currency": "USD"
}
RESPONSE BODY
{
"code": "0",
"data": {
"reference": "ExtC2CFunds134",
"cFiFundsId": "ifnd_k76YyY9Mk8IfBZwUpT2Uy",
"cFiAggregatorId": "CLIENTID",
"type": "cardToCard",
"cardFromId": "icrd_1qaR2QEPXIRKr4jOyjQkTw",
"cardToId": "icrd_5Y3maHhGD2iEqZGEpN6jBg",
"cFiStatus": "Complete",
"boTransId": "F2166100335",
"arn": "0000000000000000002J",
"fee": 0,
"balance": 10.5,
"lastDepositAmount": 0,
"ledgerBalance": 10.5,
"dtsCreatedAt": "2023-11-12T23:13:08.318Z",
"fromCardBalance": "10.50",
"toCardBalance": "10.50"
},
"requestId": "0aa5b31081b111ee9b7427220cc6c212"
}
200 SUCCESSFUL RESPONSE TRANSFER BETWEEN VACCOUNTS
HEADERS
Header | Value |
---|---|
Content-Type | application/json |
x-connectfi-token | A long random string token received from /auth/get-token request |
REQUEST BODY
{
"reference": "ExtC2CFunds261",
"cardFromId": "icrd_7bCpK7s3qeH5OEQqmljYYy",
"cardToId": "icrd_5RWjpAROPQimP91UfvK6wq",
"description": "Transfer to other vAccount only account",
"amount": 20,
"currency": "USD"
}
RESPONSE BODY
{
"code": "0",
"data": {
"reference": "ExtC2CFunds261",
"cFiFundsId": "ifnd_7jsHptbcJUU3zATJX1nvIS",
"cFiAggregatorId": "CLIENTID",
"type": "cardToCard",
"cardFromId": "icrd_7bCpK7s3qeH5OEQqmljYYy",
"cardToId": "icrd_5RWjpAROPQimP91UfvK6wq",
"cFiStatus": "Complete",
"boTransId": "F2166324908",
"arn": "0000000000000000004w",
"fee": 0,
"balance": 10,
"lastDepositAmount": 0,
"ledgerBalance": 10,
"dtsCreatedAt": "2024-01-18T15:12:04.757Z",
"fromCardBalance": "10.00",
"toCardBalance": "20.00"
},
"requestId": "f049b420b61311eeaa76ffd7d3224a12"
}