Card Inquiry API

The Card Inquiry API is called by the client to retrieve the summary of the card. e.g. Cardholder information, balance on the card etc. This API will not provide the transaction history of the card.

Environment: https://domain/mob1/API/onboarding/v1/cardInquiry

HTTP Method: POST

Request parameters

Header

ParameterDescriptionExample
x-api-key
mandatory
String This is a unique key.7fe1c0de
clientId
mandatory
String Uniquely identifies the client. During program enrolment each client is provided with a unique client id by Prepaid2000
bankId
mandatory
Numeric Bank Id is provided by Prepaid Aero during program enrolment to uniquely identify the card issuer.7000
entityId
mandatory
Numeric Defaults to parent branch i.e., 100100
secureCode
mandatory
String Uniquely identifies the client on payload level for performing operations.AfYtlO5kqdySIjXyNmGg3F

Body

📘

Note:

Encryption or decryption methodology is AES-192-CBC bits encryption.

ParameterDescriptionExample

Encrypted

token
mandatory
String Token is the Encrypted body of the below request AES-192-CBC bits EncryptionPl8F5kDZcvADIiursiA
vvbHNuL9Wv5eaFdorGV
FU6FKfIEnV/YskkzJlA
ov2ZHJWnqGNLOXfBq4S
Qqw8Ep4sK0gCAAkRXAT
Cb1nSY6s=

Decrypted

messageCode
mandatory
Numeric Code to Identify load card request type. Character Limit - 41080
clientTxnId
mandatory
String Unique ID generated by the client for each transaction. Character Limit - 14GOUd789hhhjfscs
requestDateTime
mandatory
NumericLocal Date and time stamp when the transaction originated from the client in YYYYMMDDHHMMSS with time in 24 hr format
Character Limit - 13
20161031214559
cusotmerId
mandatory
StringCustomer Id (entityCIF), which uniquely identifies the cardholder in the client system
Character Limit - 20
IN2016201611
last4Digits
mandatory
NumericThis parameter must contain the last 4 digit of card number. This parameter is conditional, so required with urn.
Character Limit - 4
4664
urn
mandatory
String A unique reference number for the generated card. Need to share this in request body of the APIs. Conditional with mobile number and Customer Id i.e either one of them should be present.
Character Limit - 11.
70000000008

Sample request

Packet sample (Encrypted)

{

“token”: “h/0YSUdGzgNsMcmfYAvIIPgF3Z80/kMJkW/7l9wG9L+bXt//P/HBG0NsuoPtbn6ugjzNOLl/wQPJFbCKMqQJtSSQs4JVYBohia1TPP1yJULHN+TLIVKFRZsg0GokTPI+ZKpNPcrKrQSa70qV/RtVWMv6CmqRHaG1gQvgAYKjNyOpip7G3Io5IDEF4b2cXOlH4G1hbOtjAHQ/7ZS9KrkmJA==”

Packet sample (Decrypted)

{
  "messageCode": "1090",
  "clientTxnId": "20200804162237767_Aero_Wibmo_B12dscxdD",
  "last4Digits": "6974",
  "urn": 70000000008,
  "customerId": "129915",
  "requestDateTime": "20200804162237"
}

Response parameters

ParameterDescriptionExample

Encrypted

tokenToken is the Encrypted body of the below request AES-192-CBC bits EncryptionPl8F5kDZcvADIiursiAvvb
HNuL9Wv5eaFdorGVFU
6FKfIEnV/YskkzJlAov2ZHJ
WnqGNLOXfBq4SQqw8Ep
4sK0gCAAkRXATCb1nSY6s=

Decrypted

messageCodeCode to Identity “Card Inquiry” API response1091
clientTxnIdUnique Id generated by the client for each transaction. This value must be unique for every API call20150701235959xhstiesqfds
responseDateTimeResponse date time in the format YYYYMMDDHHMMSS with time in 24 hr format20161031214559
responseCodeContains the status of the transaction. 00 indicates success. Please refer Appendix for other response codes00
responseMessageResponse message based on response code will be sent“SUCCESS”
urnA unique reference number for the generated card/wallet by Prepaid system70000000008
bankIdValue copied from header7000
clientIdValue copied from header2000
descriptionReserved field to send information to client
availableBalanceWallet available balance (implied decimals)50,000
availableCashLimitAvailable Cash Limit on the card (implied decimals)11,000
cardNumberFull Card Number47994XXXX1156979
cardExpiryExpiry of the card in format MMYY07XX
cardCVV2CVV for the card6XX
cardProfileIdProfile id of the card30
activationTimeStampActivation date time of the card01:12.0
lastActivityTimeStampLast Activity date time of the card01:12.0
cardHolderFistNameCard holder first nameAlice
cardHolderLastNameCard holder last nameJohn
cardholderMobileMobile number of the card holder. Please append 60 at the beginning of this field.6.0014E+11
cardholderEmailEmail address of the card holder[email protected]
cardholderAddressaddress of the card holder212 One way drive, Seattle
cardholderCityCity of the cardholderBangalore
cardholderStateState of the cardholderKarnataka
cardholderCountryCountry of the cardholderIndia
cardholderZipCodeZipCode of the cardholder560020
cardHolderDateOfBirthDate of birth of the cardholder. Format is dd-MMM-yyyy25-Dec-90
SubwalletDetails. subwallet_idSubwallet id of the subwalletMob497d9a_1
SubwalletDetails. default_walletWhether this subwallet is default subwallet or not0/1
SubwalletDetails. available_balanceTotal available balance of the subwallet20,000
SubwalletDetails. account_numberAccount number of the subwallet6.0501E+12
SubwalletDetails. account_statusAccount status of the subwallet9 – pre-active
0 – Active
21 - Disabled
SubwalletDetails. subwallet_nameSubwallet name of the subwallet“Mobility gpr wallet”
SubwalletDetails. ledger_balanceLedger balance linked to the subwallet10000
SubwalletDetails. authorized_amountTotal authorized amount linked to subwallet that has been deducted after authorization10000
SubwalletDetails. settled_amountTotal settled amount linked to subwallet that has been settled after transaction10000
SubwalletDetails. jitAuthorized_amountTotal authorized amount linked to subwallet that has been deducted after JIT transaction10000
SubwalletDetails. jitSettled_amountTotal settled amount linked to subwallet that has been settled after JIT transaction10000

API error codes

Error CodeDescription
0SUCCESS
1001CARD_NOT_FOUND
1030INVALID MESSAGE
1031INVALID BANK ID
1032INVALID_CLIENT_CHANNEL
1049INVALID SECURE CODE
1052SYSTEM_ERROR
1055MALFORMED_REQUEST
1081OPERATION NOT ALLOWED
1083URN AND LAST 4 DIGITS MISMATCH
1084URN AND CUSTOMER ID MISMATCH
1088INVALID DATE FORMAT
1093INVALID CLIENT TXN ID
1262CLIENT ID NOT PRESENT
1264BANK ID NOT PRESENT
1310XCONSUMERKEY NOT PRESENT
1311SECURE CODE NOT PRESENT
1320REQUEST_DATETIME_IS_MANDATORY
1500SYSTEM ERROR

HTTP status code

HTTP Status CodeHTTP Status Description
200OK
400Bad Request
401Unauthorized
500Internal Server Error
403Forbidden
404Not Found
503Service Unavailable

Sample response

Packet sample (Encrypted)

{

“token”: “h/0YSUdGzgNsMcmfYAvIIPgF3Z80/kMJkW/7l9wG9L+bXt//P/HBG0NsuoPtbn6ugjzNOLl/wQPJFbCKMqQJtSSQs4JVYBohia1TPP1yJULHN+TLIVKFRZsg0GokTPI+ZKpNPcrKrQSa70qV/RtVWMv6CmqRHaG1gQvgAYKjNyOpip7G3Io5IDEF4b2cXOlH4G1hbOtjAHQ/7ZS9KrkmJA==”}

Packet sample (Decrypted)

Success scenario

{
  "urn": 70000000008,
  "customerId": "62509sree0001",
  "description": "Active",
  "responseCode": "00",
  "messageCode": 1091,
  "clientTxnId": "CardINq_JMquSQD5WucX=mob234222227",
  "clientId": "2000",
  "responseDateTime": "20230605182552",
  "responseMessage": "SUCCESS",
  "bankId": 7000,
  "cardNumber": "8000XXXXX9405293",
  "cardExpiry": "0X25",
  "cardCVV2": "2X4",
  "cardStatus": "0",
  "availableBalance": "90000",
  "availableCashLimit": "0",
  "subwalletListDetails": [
    {
      "subwallet_id": "Mob497d9a_1",
      "default_wallet": 1,
      "available_balance": "900.00",
      "account_number": "601010002488",
      "account_status": "0",
      "subwallet_name": "utility Wallet",
      "ledger_balance": "900.00",
      "authorized_amount": "0.00",
      "settled_amount": "0.00"
    },
    {
      "subwallet_id": "Mob497d9a_2",
      "default_wallet": 0,
      "available_balance": "0.00",
      "account_number": "601010002496",
      "account_status": "0",
      "subwallet_name": "General Purpose wallet",
      "ledger_balance": "0.00",
      "authorized_amount": "0.00",
      "settled_amount": "0.00"
    }
  ],
  "cardHolder": {
    "cardProfileId": 300,
    "cardholderFirstName": "Sandeep",
    "cardholderLastName": "Prasad",
    "cardholderMobile": "600140016908",
    "cardholderEmail": "[email protected]",
    "cardholderAddress": "MGRaod, India ",
    "cardholderCity": "Bangalore",
    "cardholderState": "Karnataka",
    "cardholderCountry": "India",
    "cardholderZipCode": "560022",
    "cardholderDateOfBirth": "11-Jul-1995",
    "cardholderAddressLine1": "#3,dasMeena Nilayat",
    "cardholderAddressLine2": "2nd ddCrosss, Tejewswini agar",
    "cardholderAddressLine3": "Near Meenakshi Temple ",
    "employeeId": "",
    "ovdName": "",
    "isPanValid": 0
  },
  "activationTimeStamp": "2023-06-01 13:47:11.826",
  "lastActivityTimeStamp": "2023-06-02 15:38:12.871"
}

Failure scenario

{
  "responseCode": "1001",
  "responseDateTime": "20220914200827",
  "responseMessage": "CARD NOT FOUND"
}