Skip to content

Reverse Transaction

Request URL

POST /ibis/financial/reversal

Description

This endpoint will reverse an existing eligible transaction. Currently, reversals are not supported for /ibis/financial/funds-credit or /ibis/financial/funds-debit transactions. Reversals are available for /ibis/financial/card-to-card transactions in which both cards belong to the same cardProgramId.

Schema

Property table for ibis/financial/reversal

Property Description Required Schema
cFiFundsId The funds transfer ID in connectFi Yes {
  "type": "string",
  "pattern": "^[0-9a-zA-Z_]+$",
  "minLength": 1,
  "maxLength": 36,
  "$id": "common-id"
}
amount amount No {
  "type": "number",
  "exclusiveMinimum": 0,
  "nullable": true
}
description description No {
  "type": "string",
  "pattern": "^((?![<>]).)*$",
  "minLength": 0,
  "maxLength": 50,
  "nullable": true,
  "$id": "common-commonStr50"
}

Request Body

{
    "cFiFundsId": "ifnd_k76YyY9Mk8IfBZwUpT2Uy"
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
    "cFiFundsId": "ifnd_k76YyY9Mk8IfBZwUpT2Uy"
}
;
const config = {
  method: 'POST',
  url: '${CONNECTFI_BASE_URL}/ibis/financial/reversal',
  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/reversal" --data "{    \"cFiFundsId\":\"ifnd_k76YyY9Mk8IfBZwUpT2Uy\"}" --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

{
    "cFiFundsId": "ifnd_k76YyY9Mk8IfBZwUpT2Uy"
}

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": 21,
        "lastDepositAmount": 0,
        "ledgerBalance": 21,
        "dtsCreatedAt": "2023-11-12T23:13:08.318Z",
        "reversal": {
            "cFiStatus": "Complete",
            "dtsReversalInitiated": "2023-11-12T23:13:59.401Z",
            "arn": "0000000000000000002K",
            "responseDesc": "Shortfall Currency Exchange",
            "boTransId": "F2166100344"
        }
    },
    "requestId": "291aa2b081b111ee9b7427220cc6c212"
}