Skip to content

Set PIN

Request URL

POST /ibis/card/set-pin

Description

This endpoint will set a specified valid PIN for the given card. The PIN must be set using /ibis/card/set-pin before an /ibis/card/check-pin request can succeed. You may use this endpoint to set an initial card PIN, as well as to update an existing card PIN.

An /ibis/card/set-pin request can successfully be made for pre-active (status "A") and active/ON (status "B") cards.

Schema

Property table for ibis/card/set-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/set-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/set-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",
        "cardProgramName": "GPR Card Program",
        "transId": "F2166100325",
        "fee": 0,
        "balance": 0,
        "lastDepositAmount": 0,
        "ledgerBalance": 0
    },
    "requestId": "675b986081af11ee9b7427220cc6c212"
}