Change Card Status API

The Change Card Status API will change the card status of the card number of the customer. Basically, we can activate the card from pre-active status using the change card status API.

Environment: https://domain/api/onboarding/v1/change-card-status

HTTP Method: PATCH

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
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
cardStatus
mandatory
String New Status of the Card.
Character Limit - 10
Active
reason
optional
String This field captures the reason for change in Card Status Character Limit - 10Customer Activation

Sample request

Packet sample (Encrypted)

{

β€œtoken”:"Pl8F5kDZcvADIiursiAvvbHNuL9Wv5eaFdorGVFU6FKfIEnV/YskkzJlAov2ZHJWnqGNLOXfBq4SQqw8Ep4sK0gCAAkRXATCb1nSY6s="

}

Packet sample (Decrypted)

{
  "messageCode": 3010,
  "clientTxnId": "ChangecardStatus000001",
  "requestDateTime": "20220615123143",
  "urn": "70000000008",
  "cardStatus": "Active"
}

Response parameters

ParameterDescriptionExample

Encrypted

tokenToken is the Encrypted body of the below request AES-192-CBC bits EncryptionPl8F5kDZcvADIiursiAvvbHNuL9Wv5eaFdorGVFU6FKfIEnV/YskkzJlAov2ZHJWnqGNLOXfBq4SQqw8Ep4sK0gCAAkRXATCb1nSY6s=

Decrypted

messageCodeCode to Identity create card response type1011
clientTxnIdValue copied from the request20150701235959xhstiesqfds
responseDateTimeResponse date time in the format YYYYMMDDHHMMSS with time in 24 hr format20161031214559
responseCodeContains the status of the transaction. 201 indicates CREATED. Please refer Appendix for other response codes201
responseMessageResponse message based on response code will be sentCard creation successful
urnA unique reference number for the generated card/wallet by Prepaid system70000000008
bankIdValue copied from request header7000
clientIdUnique ID for client2000
accosaRefNoAuto generated sequence number.4565166
customerIdCustomer ID generated by client stored against customer’s prepaid instrument.IN2016201611

API error codes

Error CodeDescription
1001CARD_NOT_FOUND
1004CARD_ALREADY_ACTIVATED
1009CARD CANCELLED CLOSED EXPIRED
1010CARD_TEMPORARY_BLOCK
1011CARD_PERMANENT_BLOCK
1012CARD_PENDING_CANCELLATION
1030INVALID MESSAGE
1031INVALID BANK ID
1032INVALID_CLIENT_CHANNEL
1049INVALID SECURE CODE
1051CHECKSUM FAILURE
1052SYSTEM_ERROR
1055MALFORMED_REQUEST
1058INVALID WALLETS
1080IP_NOT_ALLOWED
1081OPERATION NOT ALLOWED
1084CARD_CUSTOMER_ID_MISMATCH
1085PRODUCT NOT ALLOWED
1088INVALID DATE FORMAT
1093INVALID CLIENT TXN ID
1118CARD_CREDIT_BLOCK
1121CARD_CREDIT_DEBIT_BLOCK
1131CARD_CUSTOM_BLOCK
1262CLIENT ID NOT PRESENT
1264BANK ID NOT PRESENT
1292CARD_STATUS_CANNOT_BE_BLANK
1293INVAILD_CARD_STATUS
1302INVALID_CUSTOMER
1303CUSTOMER DETAILS NOT PRESENT
1310XCONSUMERKEY NOT PRESENT
1311SECURE CODE NOT PRESENT
1320REQUEST_DATETIME_IS_MANDATORY
1330CHANGE_CARD_STATUS_REQUEST_IS_NOT_ELGIBLE
1343CARD_STATUS_LOCKED

HTTP status code

HTTP Status CodeHTTP Status Description
200OK
404Not Found
500Internal Server Error
400Bad Request

Sample response

Packet sample (Encrypted)

{

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

Packet sample (Decrypted)

{
  "urn": 70000000008,
  "customerId": "62507sree4sd06",
  "responseCode": "00",
  "messageCode": 3011,
  "clientTxnId": "ChangecardStatus000004",
  "clientId": "1040",
  "responseDateTime": "20220912173234",
  "responseMessage": "SUCCESS",
  "bankId": 6040,
  "accosaRefNo": "28231"
}