Skip to content

Sandbox Endpoint

Request URL

POST /ibis-sandbox/webhook/init

Description

The /ibis-sandbox/webhook/init endpoint will allow you (the client) to simulate and test Collaborative Authorization webhooks that may be received at your preset webhook URL. Contact a support representative to first provide the URL at which you wish to receive Collaborative Authorization webhooks, as well as a default strategy that will be used for "request" actionType webhooks requiring a response from your server in case of unforeseen circumstances.

You will need to include the test card cFiCardId in the request body. If the sandBoxCases property is not included, then all test cases will be returned and your preset webhook URL will receive a webhook for each test case. In order to specify desired test cases, you may include the optional "sandBoxCases" array field and list the desired cases in the format ["t002_01"], where t002_01 refers to test 2, case 1. See the Collaborative Authorization Sandbox Tests documentation for more details on test cases.

The /ibis-sandbox/webhook/init response body will include the following object for each included test (and subtest if the test consists of multiple webhooks).

{
  "code": [
    "t002_01", //id of test
    "01" //subtest
  ],
  "name": "T002 1. Pre-authorization transaction is being successfully processed from IPC and IPS. (0100)", //test name/description
  "responseData": { //the responseCode received back from your webhook URL (or error, if applicable)
    "responseCode": "00"
  },
  "time": 680, //the time in milliseconds for this test or subtest
  "pass": true //true if the test passed
},

Schema

Property table for ibis-sandbox/webhook/init

Property Description Required Schema
cFiCardId The card ID in connectFi Yes {
  "type": "string",
  "pattern": "^[0-9a-zA-Z_]+$",
  "minLength": 1,
  "maxLength": 36,
  "$id": "common-id"
}
sandBoxCases sandBoxCases No array of {
  "type": "string"
}

Request Body

{
    "cFiCardId": "icrd_7kLj9RSVzlwOtNb8vd6lPW"
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
    "cFiCardId": "icrd_7kLj9RSVzlwOtNb8vd6lPW"
};
const config = {
  method: 'POST',
  url: '${CONNECTFI_BASE_URL}/ibis-sandbox/webhook/init',
  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-sandbox/webhook/init" --data "{    \"cFiCardId\":\"icrd_7kLj9RSVzlwOtNb8vd6lPW\"}" --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 - ALL TESTS

HEADERS

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

REQUEST BODY

{
    "cFiCardId": "icrd_7kLj9RSVzlwOtNb8vd6lPW"
}

RESPONSE BODY

{
    "code": "0",
    "data": [
        {
            "code": [
                "t002_01",
                "01"
            ],
            "name": "T002 1. Pre-authorization transaction is being successfully processed from IPC and IPS. (0100)",
            "responseData": {
                "responseCode": "00"
            },
            "time": 680,
            "pass": true
        },
        {
            "code": [
                "t002_02",
                "01"
            ],
            "name": "T002 2. Pre-authorization and its Full Reversal is successfully processed from IPC and IPS. (0100)",
            "responseData": {
                "responseCode": "00"
            },
            "time": 304,
            "pass": true
        },
        {
            "code": [
                "t002_02",
                "02"
            ],
            "name": "T002 2. Pre-authorization and its Full Reversal is successfully processed from IPC and IPS. (0420)",
            "responseData": {
                "responseCode": "00"
            },
            "time": 304,
            "pass": true
        },
        {
            "code": [
                "t002_02",
                "03"
            ],
            "name": "T002 2. Pre-authorization and its Full Reversal is successfully processed from IPC and IPS. (0420)",
            "responseData": {
                "responseCode": "00"
            },
            "time": 292,
            "pass": true
        },
        {
            "code": [
                "t002_03",
                "01"
            ],
            "name": "T002 3. Pre-authorization and its Partial Reversal is successfully processed from IPC and IPS. (0100)",
            "responseData": {
                "responseCode": "00"
            },
            "time": 373,
            "pass": true
        },
        {
            "code": [
                "t002_03",
                "02"
            ],
            "name": "T002 3. Pre-authorization and its Partial Reversal is successfully processed from IPC and IPS. (0420)",
            "responseData": {
                "responseCode": "00"
            },
            "time": 279,
            "pass": true
        },
        {
            "code": [
                "t002_04",
                "01"
            ],
            "name": "T002 4. Full Reversal of Pre-authorization and its Completion is successfully processed from IPC and IPS. After reversal of completion, transaction amount should be hold again as completion is reversed. (0100)",
            "responseData": {
                "responseCode": "00"
            },
            "time": 425,
            "pass": true
        },
        {
            "code": [
                "t002_04",
                "02"
            ],
            "name": "T002 4. Full Reversal of Pre-authorization and its Completion is successfully processed from IPC and IPS. After reversal of completion, transaction amount should be hold again as completion is reversed. (0220)",
            "responseData": {
                "responseCode": "00"
            },
            "time": 481,
            "pass": true
        },
        {
            "code": [
                "t002_04",
                "03"
            ],
            "name": "T002 4. Full Reversal of Pre-authorization and its Completion is successfully processed from IPC and IPS. After reversal of completion, transaction amount should be hold again as completion is reversed. (0420)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 301,
            "pass": false
        },
        {
            "code": [
                "t002_05",
                "01"
            ],
            "name": "T002 5. Partial Reversal of Pre-authorization and its Completion is successfully processed from IPC and IPS. As completion is partially reversed that is why full amount is not hold back. (0100)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 455,
            "pass": false
        },
        {
            "code": [
                "t002_05",
                "02"
            ],
            "name": "T002 5. Partial Reversal of Pre-authorization and its Completion is successfully processed from IPC and IPS. As completion is partially reversed that is why full amount is not hold back. (0220)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 333,
            "pass": false
        },
        {
            "code": [
                "t002_05",
                "03"
            ],
            "name": "T002 5. Partial Reversal of Pre-authorization and its Completion is successfully processed from IPC and IPS. As completion is partially reversed that is why full amount is not hold back. (0420)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 271,
            "pass": false
        },
        {
            "code": [
                "t003_01",
                "01"
            ],
            "name": "T003 1. Partial Reversal of POS Purchase is successfully processed from IPC and IPS. (0200)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 357,
            "pass": false
        },
        {
            "code": [
                "t003_01",
                "02"
            ],
            "name": "T003 1. Partial Reversal of POS Purchase is successfully processed from IPC and IPS. (0420)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 320,
            "pass": false
        },
        {
            "code": [
                "t003_02",
                "01"
            ],
            "name": "T003 2. Partial Reversal of POS Purchase is successfully processed from IPC and IPS. (0200)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 228,
            "pass": false
        },
        {
            "code": [
                "t003_02",
                "02"
            ],
            "name": "T003 2. Partial Reversal of POS Purchase is successfully processed from IPC and IPS. (0420)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 270,
            "pass": false
        },
        {
            "code": [
                "t004_01",
                "01"
            ],
            "name": "T004 1. Cardholder perform transaction in Canada  of 10.50 CAD, transaction will be processed as 20.00 USD.DE 49 = 124  (Two decimal precision) DE 51 = 840  (Two decimal precision) (0200)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 347,
            "pass": false
        },
        {
            "code": [
                "t004_02",
                "01"
            ],
            "name": "T004 2. Cardholder performs single currency International transaction from Canada of amount 10.50 USD. (0200)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 245,
            "pass": false
        },
        {
            "code": [
                "t004_03",
                "01"
            ],
            "name": "T004 3. Cardholder perform transaction in Bahrain  of 210.151  BHD , transaction will be processed as 2.00 USD . DE 49 = 048  (Three  decimal precision) DE 51 = 840  (Two decimal precision) (0200)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 405,
            "pass": false
        },
        {
            "code": [
                "t005_01",
                "01"
            ],
            "name": "T005 1 Cardholder Performs POS Balance Inquiry and it is processed successfully from IPC and IPS and balance would be received in response in DE54. (0100)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 276,
            "pass": false
        },
        {
            "code": [
                "t007_01",
                "01"
            ],
            "name": "T007 1. Account Verification transaction is successfully processed from IPC and IPS. (0200)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 277,
            "pass": false
        },
        {
            "code": [
                "t008_01",
                "01"
            ],
            "name": "T008 1. Financial Transaction with Surcharge fee (DE 28) is successfully processed from IPC and IPS. DE 4 also includes Surcharge fee. DE 28 is just to specify the Surcharge amount. (0200)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 250,
            "pass": false
        },
        {
            "code": [
                "t009_01",
                "01"
            ],
            "name": "T009 1. This case is to verify extra hold amount on mcc 3503. (0100)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 359,
            "pass": false
        },
        {
            "code": [
                "t010_01",
                "01"
            ],
            "name": "T010 1. Pre-authorization is processed from IPC and IPS. But then it’s two completions comes and successfully processed from IPC and IPS. (0100)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 359,
            "pass": false
        },
        {
            "code": [
                "t010_01",
                "02"
            ],
            "name": "T010 1. Pre-authorization is processed from IPC and IPS. But then it’s two completions comes and successfully processed from IPC and IPS. (0420)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 363,
            "pass": false
        },
        {
            "code": [
                "t010_01",
                "03"
            ],
            "name": "T010 1. Pre-authorization is processed from IPC and IPS. But then it’s two completions comes and successfully processed from IPC and IPS. (0220)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 486,
            "pass": false
        },
        {
            "code": [
                "t010_01",
                "04"
            ],
            "name": "T010 1. Pre-authorization is processed from IPC and IPS. But then it’s two completions comes and successfully processed from IPC and IPS. (0220)",
            "responseData": {
                "responseCode": "00"
            },
            "time": 265,
            "pass": true
        },
        {
            "code": [
                "t011_01",
                "01"
            ],
            "name": "T011 1. - 2 Pre-authorization are processed from IPC and IPS. But then it’s one completion comes with partial amount and is successfully processed from IPC and IPS. Rest of the hold amount will be released. (0100)",
            "responseData": {
                "responseCode": "00"
            },
            "time": 305,
            "pass": true
        },
        {
            "code": [
                "t011_01",
                "02"
            ],
            "name": "T011 1. - 2 Pre-authorization are processed from IPC and IPS. But then it’s one completion comes with partial amount and is successfully processed from IPC and IPS. Rest of the hold amount will be released. (0100)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 210,
            "pass": false
        },
        {
            "code": [
                "t011_01",
                "03"
            ],
            "name": "T011 1. - 2 Pre-authorization are processed from IPC and IPS. But then it’s one completion comes with partial amount and is successfully processed from IPC and IPS. Rest of the hold amount will be released. (0220)",
            "responseData": {
                "responseCode": "00"
            },
            "time": 294,
            "pass": true
        },
        {
            "code": [
                "t011_02",
                "01"
            ],
            "name": "T011 2. - 2 Pre-authorization are processed from IPC and IPS. But then it’s one completion comes and is successfully processed from IPC and IPS. (0100)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 220,
            "pass": false
        },
        {
            "code": [
                "t011_02",
                "02"
            ],
            "name": "T011 2. - 2 Pre-authorization are processed from IPC and IPS. But then it’s one completion comes and is successfully processed from IPC and IPS. (0100)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 296,
            "pass": false
        },
        {
            "code": [
                "t011_02",
                "03"
            ],
            "name": "T011 2. - 2 Pre-authorization are processed from IPC and IPS. But then it’s one completion comes and is successfully processed from IPC and IPS. (0220)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 375,
            "pass": false
        },
        {
            "code": [
                "t012_01",
                "01"
            ],
            "name": "T012 1. Pre-authorization is processed from IPC and IPS. But then it's expired and a reversal is sent and processed successfully. (0100)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 333,
            "pass": false
        },
        {
            "code": [
                "t012_01",
                "02"
            ],
            "name": "T012 1. Pre-authorization is processed from IPC and IPS. But then it's expired and a reversal is sent and processed successfully. (0420)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 510,
            "pass": false
        },
        {
            "code": [
                "t013_01",
                "01"
            ],
            "name": "T013 1. Pre-authorization,Completions,Chargeback and Representment is processed from IPC and IPS. (0100)",
            "responseData": {
                "responseCode": "00"
            },
            "time": 241,
            "pass": true
        },
        {
            "code": [
                "t013_01",
                "02"
            ],
            "name": "T013 1. Pre-authorization,Completions,Chargeback and Representment is processed from IPC and IPS. (0420)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 220,
            "pass": false
        },
        {
            "code": [
                "t013_01",
                "03"
            ],
            "name": "T013 1. Pre-authorization,Completions,Chargeback and Representment is processed from IPC and IPS. (0100)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 627,
            "pass": false
        },
        {
            "code": [
                "t013_01",
                "04"
            ],
            "name": "T013 1. Pre-authorization,Completions,Chargeback and Representment is processed from IPC and IPS. (0420)",
            "responseData": {
                "responseCode": "00"
            },
            "time": 466,
            "pass": true
        },
        {
            "code": [
                "t013_01",
                "05"
            ],
            "name": "T013 1. Pre-authorization,Completions,Chargeback and Representment is processed from IPC and IPS. (0100)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 328,
            "pass": false
        },
        {
            "code": [
                "t017_01",
                "01"
            ],
            "name": "T017 1. Cardholder performs financial transaction with cash back amount and it is processed successfully from IPC and IPS.Then a reversal is sent and the transaction is reversed successfully along with the cash-back amount. DE54 = 0040840D000000002000. (0100)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 390,
            "pass": false
        },
        {
            "code": [
                "t017_01",
                "02"
            ],
            "name": "T017 1. Cardholder performs financial transaction with cash back amount and it is processed successfully from IPC and IPS.Then a reversal is sent and the transaction is reversed successfully along with the cash-back amount. DE54 = 0040840D000000002000. (0420)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 242,
            "pass": false
        },
        {
            "code": [
                "t019_01",
                "01"
            ],
            "name": "T019 1. Financial Transaction is sent to host and cardholder didn’t have balance so it was declined with response code 51 meaning Insufficient Funds (0100)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 233,
            "pass": false
        },
        {
            "code": [
                "t019_01",
                "02"
            ],
            "name": "T019 1. Financial Transaction is sent to host and cardholder didn’t have balance so it was declined with response code 51 meaning Insufficient Funds (0120)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 482,
            "pass": false
        },
        {
            "code": [
                "t020_01",
                "01"
            ],
            "name": "T020 1. Pre-authorization is processed from IPC and IPS and response received is 51. (0120)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 317,
            "pass": false
        },
        {
            "code": [
                "t021_01",
                "01"
            ],
            "name": "T021 1. Completion of purchase return will be processed successfully and sent to debit host. (0220)",
            "responseData": {
                "error": {
                    "code": "responseCode",
                    "message": "Response code not found"
                }
            },
            "time": 374,
            "pass": false
        }
    ],
    "requestId": "96fb6d00018611efafdb56da8a8652d8"
}

200 SUCCESSFUL RESPONSE - SPECIFIED TEST(S)

HEADERS

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

REQUEST BODY

{
    "cFiCardId": "icrd_7kLj9RSVzlwOtNb8vd6lPW",
    "sandBoxCases": ["t002_01"]
}

RESPONSE BODY

{
    "code": "0",
    "data": [
        {
            "code": [
                "t002_01",
                "01"
            ],
            "name": "T002 1. Pre-authorization transaction is being successfully processed from IPC and IPS. (0100)",
            "responseData": {
                "responseCode": "00"
            },
            "time": 613,
            "pass": true
        }
    ],
    "requestId": "2f5765f0019011efafdb56da8a8652d8"
}