Block Card API

Block Card API is called by the client to block the card on different aspects, there are majorly six types as described in the following table:

Block TypeDescription
CustomCard will Custom Blocked (partial transactions will be allowed)
TemporaryCard will be Temporary Blocked (No transactions will be permitted)
PermanentCard is Permanently Blocked
DebitAll debits from the card will be blocked (except system debits(source Account type – 11, 12, 15, 16, 41, 42))
CreditAll credits to the card will be blocked (except system credits(source Account type – 11, 12, 15, 16, 41, 42))
CreditDebitAll Credits and Debits will not allow, except system reversal credits and debits

Environment: https://domain/mob1/api/onboarding /v1/block

HTTP Method: PATCH

📘

Note:

Domain will be shared once this move to respective environment.

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

ParameterDescriptionExample

Encrypted

token
mandatory
String Token is the Encrypted body of the below request AES-192-CBC bits Encryption. 

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
Numeric Local Date and time stamp when the transaction originated from the client in YYYYMMDDHHMMSS with time in 24 hr format.20161031214559
customerId
mandatory
String Customer ID (entityCIF), which uniquely identifies the cardholder in the client system. It is conditional with mobile number and URN i.e either one of them should be present. Character Limit - 2011001188721
last4Digits
mandatory
String Last 4 digits of the card number. Character Limit - 47810
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 - 1170000000008
blockType
mandatory
String Type of Block's either its Custom, Temporary, Permanent, Debit, Credit.Character Limit - 10Temporary
reserved1
optional
String Audit details for block request(agentid).Character Limit - 500Block
reserved2
optional
String Reason for card block.Character Limit - 500Investigating for fraud

Sample request

Packet sample (Encrypted)

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

Packet sample (Decrypted)

{
"messageCode": "1240",
"clientTxnId": "CBL-458", "requestDateTime": "20161011221416", "last4Digits": "1559",
"urn": 70000000008,
"blockType": "CreditDebit", "customerId":"IN00001201001865", "reserved1":"Block",
"reserved2":"mobile lost.Blocking the card"
}

Response parameters

ParameterDescriptionSample value

Encrypted

tokenToken is the Encrypted body of the below request AES-192-CBC bits Encryption Pl8F5kDZcvADIiursiAvv
bHNuL9Wv5eaFdorGVFU6F
KfIEnV/YskkzJlAov2ZHJ
WnqGNLOXfBq4SQqw8Ep4
sK0gCAAkRXATCb1nSY6s=

Decrypted

messageCodeCode to Identify load response type1081
clientIdValue copied from the request2000
clientTxnIdValue copied from the requestGOUd789hhhjfscs
responseDateTimeResponse date time in the format YYYYMMDDHHMMSS with time in 24 hr format20161031214559
urnA unique reference number for the generated card by Prepaid system70000000008
customerIdCustomer Id(entityCIF), which uniquely identifies the cardholder in the client system.
Conditional with mobile number and Urn.11001188721
accosaTransactionIdUnique ID for a particular transaction generated in Prepaid3591893
responseCodeContains the status of the transaction. 00 indicates success. Please refer Appendix for other response codes0
responseMessageResponse message based on response code will be sentSuccess
descriptionReserved field to send information to clientSuccess
accosaRefNoAuto generated sequence number123212

API error codes

Error CodeDescription
00SUCCESS
1001CARD NOT FOUND
1009CARD CANCELLED CLOSED EXPIRED
1010CARD TEMPORARY BLOCK
1011CARD PERMANENT BLOCK
1012CARD PENDING CANCELLATION
1030INVALID MESSAGE
1034INVALID_MOBILE_NUMBER
1045UNABLE TO PROCESS REQUEST
1112INVALID BLOCK TYPE
1117CARD DEBIT BLOCK
1118CARD CREDIT BLOCK
1121CARD CREDIT DEBIT BLOCK
1131CARD CUSTOM BLOCK
1231DATA_NOT_FOUND
1237DUPLICATE_PHONE_NUMBER_WITH_MULTIPLE_ACCOUNT
1356CARD_NOT_ACTIVE
1366PROGRAM IS INACTIVE
1367PROGRAM NOT FOUND

HTTP status code

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

Sample response

Packet sample (Encrypted)

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

Packet sample (Decrypted)

{
"urn": 70000000008, "customerId": "62508sree0061", "description": "[RESERVE_1]",
"responseCode": "00",
"messageCode": 1241,
"clientTxnId": "BLOCK_JM_aax11LrjoCV-f34", "clientId": "2000",
"responseDateTime": "20230615234800", "responseMessage": "SUCCESS",
"bankId": 7000,
"accosaRefNo": "52"
}Block Card API is called by the client to Block the Card on different aspects, there are majorly 6 types, Temporary Block, Custom Block, Permanent Block, Debit Block, Credit Block and CreditDebit Block.