Skip to content

Check PIN

Request URL

POST /ibis/card/check-pin

Description

This endpoint accepts requests to check to see if the PIN stored for the given cFiCardId matches the given card PIN. The request is successful only if the PIN is a match. The PIN must be set using an /ibis/card/set-pin request before attempting to check the PIN. In addition, the request will fail if the card has not yet been activated, even if the correct PIN is given. Make sure to activate the card with an /ibis/card/activate request before checking for a PIN match.

An /ibis/card/check-pin request can successfully be made for cards with the following status values: "B" (ON).

Schema

Property table for ibis/card/check-pin

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"
}
pin A four digit PIN Yes {
  "type": "string",
  "pattern": "^\d{4}$"
}

Request Body

{
    "cFiCardId" : "icrd_575fma7wGFKTgSx537PMcO",
    "pin" : "1234"
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
    "cFiCardId" : "icrd_575fma7wGFKTgSx537PMcO",
    "pin" : "1234"
};
const config = {
  method: 'POST',
  url: '${CONNECTFI_BASE_URL}/ibis/card/check-pin',
  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/card/check-pin" --data "{\"cFiCardId\": \"icrd_575fma7wGFKTgSx537PMcO\",   \"pin\": \"1234\"}" --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

{
    "cFiCardId" : "icrd_1qaR2QEPXIRKr4jOyjQkTw",
    "pin" : "1234"
}

RESPONSE BODY

{
    "code": "0",
    "data": {
        "cFiCardId": "icrd_1qaR2QEPXIRKr4jOyjQkTw",
        "cFiStatus": "Complete",
        "customerId": "cstap_7uvAC6nLftLGCq7yic3TfI",
        "cFiAggregatorId": "CLIENTID",
        "reference": "extIDCrd100",
        "memberNumber": "cstcp_2WZ7ariGgrtumtUlD452LM",
        "cardProgramId": "d_gpr_test",
        "programType": "debit",
        "boReferenceId": "110195634081158",
        "boCustomerId": "110000001956340811",
        "vAccountNumber": "1234567890123456",
        "abaRoutingNumber": "122244184",
        "dtsCreatedAt": "2023-11-01T18:05:04.208Z",
        "transId": "F2166100326",
        "fee": 0,
        "balance": 0,
        "lastDepositAmount": 0,
        "ledgerBalance": 0
    },
    "requestId": "7725f42081af11ee9b7427220cc6c212"
}