Introduction
Welcome to the user documentation for Card91BusinessSDK! This package provides a set of awesome utility functions that can simplify and enhance your .NET projects.
Installation
To install Card91BusinessSDK, follow these steps:
1-Open your Visual Studio project.
2-Go to "Tools" > "NuGet Package Manager" > "Manage NuGet Packages for Solution."
3-Search for "Card91BusinessSDK" and click "Install."
Once the installation is complete, you can start utilising the utility functions provided by Card91BusinessSDK in your code.
Usage
The main function of this SDK allows you to retrieve card details by passing the card number and other details. This function returns the status code, header details, and the response data.
Use the method to integrate place you want to use:
Method Name | Description |
---|---|
GetCardDetails | use to fetch card details |
GetCardholderStatus | use to fetch customer status |
LoadFundToCard | use to load money to individual card |
GetAddress | use to fetch customer addresses |
PrintCard | use for converting virtual card to physical card |
MapCustomerToInstakit | use to map insta kit to customer |
Functions
Environment
Each function requires environment variable to connect to appropriate base url.
"PROD_SANDBOX" in case of production sandbox environment and "PROD" in case of production
GetCardDetails
You can get you details by passing you card id. You can call this function by creating a instance for this class CardDetails. The request needs to be pass as a json string parameter. The sample request given below,
Request:
string token = "k0gvISPmSU+HzHinEda5QU+keMsItM2SAGMw470Ecmk="; ///Card holder token
string environment = "PROD_SANDBOX"; // PROD_SANDBOX or PROD
string cardId = "230530100608159ID1CARD5790474"; // Card ID
string cardDetailsRequestJson = $@"
{{
""token"": ""{token}"",
""environment"": ""{environment}"",
""param"": {{
""cardId"": ""{cardId}""
}},
""body"": {{}}
}}";
Card91.CardDetails CardDetails = new Card91.CardDetails();
Card91.CardResponse res = new Card91.CardResponse();
res = CardDetails.GetCardDetails(cardDetailsRequestJson);
Response:
{
"status":200,
"headers":"[{\"Key\":\"Transfer-Encoding\",\"Value\":[\"chunked\"]},{\"Key\":\"Connection\",\"Value\":[\"keep-alive\"]},{\"Key\":\"Vary\",\"Value\":[\"Origin\",\"Access-Control-Request-Method\",\"Access-Control-Request-Headers\"]},{\"Key\":\"X-Content-Type-Options\",\"Value\":[\"nosniff\"]},{\"Key\":\"X-XSS-Protection\",\"Value\":[\"1; mode=block\"]},{\"Key\":\"Pragma\",\"Value\":[\"no-cache\"]},{\"Key\":\"Strict-Transport-Security\",\"Value\":[\"max-age=31536000 ; includeSubDomains\"]},{\"Key\":\"X-Frame-Options\",\"Value\":[\"DENY\"]},{\"Key\":\"Cache-Control\",\"Value\":[\"no-store, must-revalidate, no-cache, max-age=0\"]},{\"Key\":\"Date\",\"Value\":[\"Sun, 06 Aug 2023 13:32:14 GMT\"]}]",
"data":"{\"id\":\"230530100608159ID1CARD5790474\",\"customerId\":\"220629141431170ID1CUSTID9321576\",\"nameOnCard\":\"Kashif\",\"cardProgramId\":\"230528190350397ID1CP9723194\",\"cardProgramName\":\"test\",\"orgId\":\"230526135544169ID1OID4070270\",\"orgDisplayName\":\"SDK Business\",\"orgName\":\"SDK Business\",\"cardMode\":\"PHYSICAL_NAMED_CARD\",\"instakit\":false,\"last4Digit\":\"7915\",\"createdBy\":\"230526135756147ID1UID5972864\",\"modifiedBy\":\"230714102428729ID1UID0083499\",\"expiredBy\":null,\"modifiedTime\":\"2023-08-01T10:48:25.000+00:00\",\"createdTime\":\"2023-05-30T10:06:10.000+00:00\",\"status\":\"ACTIVE\",\"cardImage\":null,\"wallets\":{\"cardId\":\"230530100608159ID1CARD5790474\",\"totalBalance\":\"0\",\"virtualBalance\":\"0\",\"prepaidBalance\":\"0\",\"otherBalance\":\"0\",\"appBalances\":[{\"appId\":\"5141c8f7-17bc-4fc6-a3a4-5e8358d71a7f\",\"appName\":\"Test\",\"balance\":\"0.0000\",\"balanceType\":\"VIRTUAL\",\"countInBalance\":true}]},\"cardFlags\":{\"ATM_ENABLED\":true,\"POS_ENABLED\":true,\"ECOM_ENABLED\":false,\"CL_ENABLED\":false},\"issuerCode\":\"YES\",\"network\":\"RUPAY\",\"addresses\":[{\"addressType\":\"DELIVERY_ADDRESS\",\"status\":\"ACTIVE\",\"address1\":\"1142,card91 6th main road, sector 7\",\"address2\":\"Hsrlayout\",\"landmark\":null,\"city\":\"Bangalore\",\"countryISOCode\":\"IND\",\"pincode\":\"560102\",\"state\":\"KARNATAKA\"}]}"
}
GetHolderDetails
You can get customer status by passing mobile number of the card holder. You can call this function by creating a instance for this class HolderDetails. The request needs to be pass as a json string parameter. The sample request given below
Request:
string token = "k0gvISPmSU+HzHinEda5QU+keMsItM2SAGMw470Ecmk=";
string environment = "STAGE_SANDBOX";
string mobileNo = "917812381818";
string CardHolderJson = $@"
{{
""token"": ""{token}"",
""environment"": ""{environment}"",
""param"": {{
""mobileNo"": ""{mobileNo}""
}},
""body"": {{}}
}}";
Card91.HolderDetails HolderDetails = new Card91.HolderDetails();
Card91.CardResponse CardHolderres = new Card91.CardResponse();
CardHolderres = HolderDetails.GetHolderDetails(CardHolderJson);
Response:
{"status":200,"headers":"[{\"Key\":\"Transfer-Encoding\",\"Value\":[\"chunked\"]},{\"Key\":\"Connection\",\"Value\":[\"keep-alive\"]},{\"Key\":\"Vary\",\"Value\":[\"Origin\",\"Access-Control-Request-Method\",\"Access-Control-Request-Headers\"]},{\"Key\":\"X-Content-Type-Options\",\"Value\":[\"nosniff\"]},{\"Key\":\"X-XSS-Protection\",\"Value\":[\"1; mode=block\"]},{\"Key\":\"Pragma\",\"Value\":[\"no-cache\"]},{\"Key\":\"Strict-Transport-Security\",\"Value\":[\"max-age=31536000 ; includeSubDomains\"]},{\"Key\":\"X-Frame-Options\",\"Value\":[\"DENY\"]},{\"Key\":\"Cache-Control\",\"Value\":[\"no-store, must-revalidate, no-cache, max-age=0\"]},{\"Key\":\"Date\",\"Value\":[\"Sun, 06 Aug 2023 13:48:46 GMT\"]}]","data":"{\"cardHolderId\":\"230719090829814ID1CUSTID8908902\",\"name\":\"SDK Business\",\"nameOnCard\":\"SDK Business\",\"email\":\"\",\"mobile\":\"917812381818\",\"status\":\"ACTIVE\",\"createdAt\":\"2023-07-19T09:08:30.000+00:00\",\"kycStatus\":[],\"cards\":[{\"cardId\":\"230719090829847ID1CARD4118406\",\"status\":\"INACTIVE\",\"last4CardDigits\":\"0563\",\"cardMode\":\"PHYSICAL_NAMED_CARD\",\"cardImageUrl\":null,\"orgId\":\"230526135544169ID1OID4070270\",\"createdAt\":\"2023-07-19T09:08:31.000+00:00\"}],\"addresses\":[{\"addressType\":\"DELIVERY_ADDRESS\",\"status\":\"PENDING\",\"address1\":\"1100\",\"address2\":\"New Street\",\"landmark\":\"Near Old Street\",\"city\":\"Banglore\",\"countryISOCode\":\"IND\",\"pincode\":\"580003\",\"state\":\"Karnataka\"}]}"}
LoadMoneyToCard
You can load money to individual card by passing the parameter as follows. You can call this function by creating a instance for this class LoadMoney. The request needs to be pass as a json string parameter. The sample request given below,
Request:
string refId = "Ref53453";
string walletId = "5141c8f7-17bc-4fc6-a3a4-5e8358d71a7f";
string amount = "280";
string CardID = "230530100608159ID1CARD5790474";
string LoadMoneyJson = $@"
{{
""token"": ""{token}"",
""environment"": ""{environment}"",
""param"": {{
""CardID"": ""{CardID}"",
}},
""body"": {{
""refId"": ""{refId}"",
""walletId"": ""{walletId}"",
""amount"": ""{amount}"",
}}
}}";
Card91.LoadMoney LoadMoney = new Card91.LoadMoney();
Card91.CardResponse LoadMoneyRes = new Card91.CardResponse();
LoadMoneyRes = LoadMoney.LoadMoneyToCard(LoadMoneyJson);
Response:
{"status":200,"headers":"[{\"Key\":\"Transfer-Encoding\",\"Value\":[\"chunked\"]},{\"Key\":\"Connection\",\"Value\":[\"keep-alive\"]},{\"Key\":\"Vary\",\"Value\":[\"Origin\",\"Access-Control-Request-Method\",\"Access-Control-Request-Headers\"]},{\"Key\":\"X-Content-Type-Options\",\"Value\":[\"nosniff\"]},{\"Key\":\"X-XSS-Protection\",\"Value\":[\"1; mode=block\"]},{\"Key\":\"Pragma\",\"Value\":[\"no-cache\"]},{\"Key\":\"Strict-Transport-Security\",\"Value\":[\"max-age=31536000 ; includeSubDomains\"]},{\"Key\":\"X-Frame-Options\",\"Value\":[\"DENY\"]},{\"Key\":\"Cache-Control\",\"Value\":[\"no-store, must-revalidate, no-cache, max-age=0\"]},{\"Key\":\"Date\",\"Value\":[\"Sun, 06 Aug 2023 13:48:46 GMT\"]}]","data":"{\"refId\":\"Ref53453\",\"cardId\":\"230530100608159ID1CARD5790474\",\"walletId\":\"5141c8f7-17bc-4fc6-a3a4-5e8358d71a7f\",\"amount\":\"280.00\",\"balance\":\"0.0000\"}"}
AddCustomerAddress
You can create address for customer by passing the respective parameters as follows. You can call this function by creating a instance for this class AddressDetails. The request needs to be pass as a json string parameter. The sample request given below
Request:
string AddAddressJson = @"
{
""address1"": ""1142,card91 6th main road, sector 7"",
""address2"": ""Hsr layout"",
""addressType"": ""DELIVERY_ADDRESS"",
""pincode"": ""560102"",
""city"": ""Chennai"",
""country"": ""IND"",
""state"": ""TamilNadu""
}";
string entityType = "CUST";
string entityId = "220629141431170ID1CUSTID9321576";
string addressJson = $@"{{
""token"": ""{token}"",
""environment"": ""{environment}"",
""param"": {{}},
""body"": {{
""entityType"": ""{entityType}"",
""entityId"": ""{entityId}"",
""address"": {AddAddressJson}
}}
}}";
Card91.AddressDetails AddressDetails = new Card91.AddressDetails();
Card91.CardResponse AddAddressRes = new Card91.CardResponse();
AddAddressRes = AddressDetails.AddCustomerAddress(addressJson);
Response:
{"status":200,"headers":"[{\"Key\":\"Transfer-Encoding\",\"Value\":[\"chunked\"]},{\"Key\":\"Connection\",\"Value\":[\"keep-alive\"]},{\"Key\":\"Vary\",\"Value\":[\"Origin\",\"Access-Control-Request-Method\",\"Access-Control-Request-Headers\"]},{\"Key\":\"X-Content-Type-Options\",\"Value\":[\"nosniff\"]},{\"Key\":\"X-XSS-Protection\",\"Value\":[\"1; mode=block\"]},{\"Key\":\"Pragma\",\"Value\":[\"no-cache\"]},{\"Key\":\"Strict-Transport-Security\",\"Value\":[\"max-age=31536000 ; includeSubDomains\"]},{\"Key\":\"X-Frame-Options\",\"Value\":[\"DENY\"]},{\"Key\":\"Cache-Control\",\"Value\":[\"no-store, must-revalidate, no-cache, max-age=0\"]},{\"Key\":\"Date\",\"Value\":[\"Sun, 06 Aug 2023 13:48:47 GMT\"]}]","data":"{\"addressId\":21152}"}
GetAddressList
You can get fetch customer addresses by passing respective parameter as follows. You can call this function by creating a instance for this class AddressDetails. The request needs to be pass as a json string parameter. The sample request given below
Request:
string customerId = "220629141431170ID1CUSTID9321576";
string ListJson = $@"
{{
""token"": ""{token}"",
""environment"": ""{environment}"",
""param"": {{
""customerId"": ""{customerId}""
}},
""body"": {{}}
}}";
Card91.AddressDetails Address = new Card91.AddressDetails();
Card91.CardResponse ListJsonRes = new Card91.CardResponse();
ListJsonRes = Address.GetAddressList(ListJson);
Response:
{"status":200,"headers":"[{\"Key\":\"Transfer-Encoding\",\"Value\":[\"chunked\"]},{\"Key\":\"Connection\",\"Value\":[\"keep-alive\"]},{\"Key\":\"Vary\",\"Value\":[\"Origin\",\"Access-Control-Request-Method\",\"Access-Control-Request-Headers\"]},{\"Key\":\"X-Content-Type-Options\",\"Value\":[\"nosniff\"]},{\"Key\":\"X-XSS-Protection\",\"Value\":[\"1; mode=block\"]},{\"Key\":\"Pragma\",\"Value\":[\"no-cache\"]},{\"Key\":\"Strict-Transport-Security\",\"Value\":[\"max-age=31536000 ; includeSubDomains\"]},{\"Key\":\"X-Frame-Options\",\"Value\":[\"DENY\"]},{\"Key\":\"Cache-Control\",\"Value\":[\"no-store, must-revalidate, no-cache, max-age=0\"]},{\"Key\":\"Date\",\"Value\":[\"Sun, 06 Aug 2023 14:04:17 GMT\"]}]","data":"{\"addresses\":[{\"createdTime\":\"2022-06-29T14:14:31.000+0000\",\"createdBy\":\"20220119MPADMIN001\",\"modifiedTime\":null,\"modifiedBy\":null,\"id\":8313,\"entityId\":\"220629141431170ID1CUSTID9321576\",\"entityType\":\"CUST\",\"addressType\":\"DELIVERY_ADDRESS\",\"status\":\"PENDING\",\"address1\":\"wrwer\",\"address2\":\"wer\",\"landmark\":\"wer\",\"city\":\"bangalore\",\"countryISOCode\":\"IND\",\"pinCode\":\"560103\",\"state\":\"karnataka\",\"latitude\":0.0,\"longitude\":0.0},{\"createdTime\":\"2022-07-01T05:50:06.000+0000\",\"createdBy\":\"20220119MPADMIN001\",\"modifiedTime\":null,\"modifiedBy\":null,\"id\":8416,\"entityId\":\"220629141431170ID1CUSTID9321576\",\"entityType\":\"CUST\",\"addressType\":\"DELIVERY_ADDRESS\",\"status\":\"PENDING\",\"address1\":\"addressLine1 is mandatory\",\"address2\":\"Street / Area\",\"landmark\":\"Flat\",\"city\":\"bangalore\",\"countryISOCode\":\"IND\",\"pinCode\":\"614804\",\"state\":\"KA\",\"latitude\":0.0,\"longitude\":0.0},{\"createdTime\":\"2023-05-09T11:07:30.000+0000\",\"createdBy\":\"221129084538831ID1UID7577402\",\"modifiedTime\":null,\"modifiedBy\":null,\"id\":19461,\"entityId\":\"220629141431170ID1CUSTID9321576\",\"entityType\":\"CUST\",\"addressType\":\"DELIVERY_ADDRESS\",\"status\":\"PENDING\",\"address1\":\"4444\",\"address2\":\"\",\"landmark\":\"\",\"city\":\"banglore\",\"countryISOCode\":\"IND\",\"pinCode\":\"897876\",\"state\":\"karnataka\",\"latitude\":0.0,\"longitude\":0.0},{\"createdTime\":\"2023-08-01T10:46:05.000+0000\",\"createdBy\":\"230714102428729ID1UID0083499\",\"modifiedTime\":\"2023-08-01T10:46:05.000+0000\",\"modifiedBy\":\"230714102428729ID1UID0083499\",\"id\":21130,\"entityId\":\"220629141431170ID1CUSTID9321576\",\"entityType\":\"CUST\",\"addressType\":\"DELIVERY_ADDRESS\",\"status\":\"ACTIVE\",\"address1\":\"1142,card91 6th main road, sector 7\",\"address2\":\"Hsr layout\",\"landmark\":null,\"city\":\"Bangalore\",\"countryISOCode\":\"IND\",\"pinCode\":\"560102\",\"state\":\"KARNATAKA\",\"latitude\":0.0,\"longitude\":0.0},{\"createdTime\":\"2023-08-01T13:36:10.000+0000\",\"createdBy\":\"230714102428729ID1UID0083499\",\"modifiedTime\":\"2023-08-01T13:36:10.000+0000\",\"modifiedBy\":\"230714102428729ID1UID0083499\",\"id\":21131,\"entityId\":\"220629141431170ID1CUSTID9321576\",\"entityType\":\"CUST\",\"addressType\":\"DELIVERY_ADDRESS\",\"status\":\"ACTIVE\",\"address1\":\"1142,card91 6th main road, sector 7\",\"address2\":\"Hsr layout\",\"landmark\":null,\"city\":\"Bangalore\",\"countryISOCode\":\"IND\",\"pinCode\":\"560102\",\"state\":\"KARNATAKA\",\"latitude\":0.0,\"longitude\":0.0},{\"createdTime\":\"2023-08-03T14:38:54.000+0000\",\"createdBy\":\"230714102428729ID1UID0083499\",\"modifiedTime\":\"2023-08-03T14:38:54.000+0000\",\"modifiedBy\":\"230714102428729ID1UID0083499\",\"id\":21146,\"entityId\":\"220629141431170ID1CUSTID9321576\",\"entityType\":\"CUST\",\"addressType\":\"DELIVERY_ADDRESS\",\"status\":\"ACTIVE\",\"address1\":\"1142,card91 6th main road, sector 7\",\"address2\":\"Hsr layout\",\"landmark\":null,\"city\":\"Chennai\",\"countryISOCode\":\"IND\",\"pinCode\":\"560102\",\"state\":\"TamilNadu\",\"latitude\":0.0,\"longitude\":0.0},{\"createdTime\":\"2023-08-03T14:44:59.000+0000\",\"createdBy\":\"230714102428729ID1UID0083499\",\"modifiedTime\":\"2023-08-03T14:44:59.000+0000\",\"modifiedBy\":\"230714102428729ID1UID0083499\",\"id\":21147,\"entityId\":\"220629141431170ID1CUSTID9321576\",\"entityType\":\"CUST\",\"addressType\":\"DELIVERY_ADDRESS\",\"status\":\"ACTIVE\",\"address1\":\"1142,card91 6th main road, sector 7\",\"address2\":\"Hsr layout\",\"landmark\":null,\"city\":\"Chennai\",\"countryISOCode\":\"IND\",\"pinCode\":\"560102\",\"state\":\"TamilNadu\",\"latitude\":0.0,\"longitude\":0.0},{\"createdTime\":\"2023-08-04T07:34:55.000+0000\",\"createdBy\":\"230714102428729ID1UID0083499\",\"modifiedTime\":\"2023-08-04T07:34:55.000+0000\",\"modifiedBy\":\"230714102428729ID1UID0083499\",\"id\":21148,\"entityId\":\"220629141431170ID1CUSTID9321576\",\"entityType\":\"CUST\",\"addressType\":\"DELIVERY_ADDRESS\",\"status\":\"ACTIVE\",\"address1\":\"1142,card91 6th main road, sector 7\",\"address2\":\"Hsr layout\",\"landmark\":null,\"city\":\"Chennai\",\"countryISOCode\":\"IND\",\"pinCode\":\"560102\",\"state\":\"TamilNadu\",\"latitude\":0.0,\"longitude\":0.0},{\"createdTime\":\"2023-08-04T08:34:11.000+0000\",\"createdBy\":\"230714102428729ID1UID0083499\",\"modifiedTime\":\"2023-08-04T08:34:11.000+0000\",\"modifiedBy\":\"230714102428729ID1UID0083499\",\"id\":21149,\"entityId\":\"220629141431170ID1CUSTID9321576\",\"entityType\":\"CUST\",\"addressType\":\"DELIVERY_ADDRESS\",\"status\":\"ACTIVE\",\"address1\":\"1142,card91 6th main road, sector 7\",\"address2\":\"Hsr layout\",\"landmark\":null,\"city\":\"Chennai\",\"countryISOCode\":\"IND\",\"pinCode\":\"560102\",\"state\":\"TamilNadu\",\"latitude\":0.0,\"longitude\":0.0},{\"createdTime\":\"2023-08-06T13:32:16.000+0000\",\"createdBy\":\"230714102428729ID1UID0083499\",\"modifiedTime\":\"2023-08-06T13:32:16.000+0000\",\"modifiedBy\":\"230714102428729ID1UID0083499\",\"id\":21151,\"entityId\":\"220629141431170ID1CUSTID9321576\",\"entityType\":\"CUST\",\"addressType\":\"DELIVERY_ADDRESS\",\"status\":\"ACTIVE\",\"address1\":\"1142,card91 6th main road, sector 7\",\"address2\":\"Hsr layout\",\"landmark\":null,\"city\":\"Chennai\",\"countryISOCode\":\"IND\",\"pinCode\":\"560102\",\"state\":\"TamilNadu\",\"latitude\":0.0,\"longitude\":0.0},{\"createdTime\":\"2023-08-06T13:48:47.000+0000\",\"createdBy\":\"230714102428729ID1UID0083499\",\"modifiedTime\":\"2023-08-06T13:48:47.000+0000\",\"modifiedBy\":\"230714102428729ID1UID0083499\",\"id\":21152,\"entityId\":\"220629141431170ID1CUSTID9321576\",\"entityType\":\"CUST\",\"addressType\":\"DELIVERY_ADDRESS\",\"status\":\"ACTIVE\",\"address1\":\"1142,card91 6th main road, sector 7\",\"address2\":\"Hsr layout\",\"landmark\":null,\"city\":\"Chennai\",\"countryISOCode\":\"IND\",\"pinCode\":\"560102\",\"state\":\"TamilNadu\",\"latitude\":0.0,\"longitude\":0.0},{\"createdTime\":\"2023-08-06T14:04:18.000+0000\",\"createdBy\":\"230714102428729ID1UID0083499\",\"modifiedTime\":\"2023-08-06T14:04:18.000+0000\",\"modifiedBy\":\"230714102428729ID1UID0083499\",\"id\":21153,\"entityId\":\"220629141431170ID1CUSTID9321576\",\"entityType\":\"CUST\",\"addressType\":\"DELIVERY_ADDRESS\",\"status\":\"ACTIVE\",\"address1\":\"1142,card91 6th main road, sector 7\",\"address2\":\"Hsr layout\",\"landmark\":null,\"city\":\"Chennai\",\"countryISOCode\":\"IND\",\"pinCode\":\"560102\",\"state\":\"TamilNadu\",\"latitude\":0.0,\"longitude\":0.0}]}"}
PrintCardDetails
You can converting virtual card to physical card by passing the respective parameters a follows. You can call this function by creating an instance for this class PrintCard. The request needs to be pass as a json string parameter. The sample request given below
Request:
string token = "k0gvISPmSU+HzHinEda5QU+keMsItM2SAGMw470Ecmk=";
string environment = "STAGE_SANDBOX";
string cardId = "230530100608159ID1CARD5790474";
string cardDetailsRequestJson = $@"
{{
""token"": ""{token}"",
""environment"": ""{environment}"",
""param"": {{
""cardId"": ""{cardId}""
}},
""body"": {{}}
}}";
Card91.CardDetails CardDetails = new Card91.CardDetails();
Card91.CardResponse res = new Card91.CardResponse();
res = CardDetails.GetCardDetails(cardDetailsRequestJson);
Response:
{"status":200,"headers":"[{\"Key\":\"Transfer-Encoding\",\"Value\":[\"chunked\"]},{\"Key\":\"Connection\",\"Value\":[\"keep-alive\"]},{\"Key\":\"Vary\",\"Value\":[\"Origin\",\"Access-Control-Request-Method\",\"Access-Control-Request-Headers\"]},{\"Key\":\"X-Content-Type-Options\",\"Value\":[\"nosniff\"]},{\"Key\":\"X-XSS-Protection\",\"Value\":[\"1; mode=block\"]},{\"Key\":\"Pragma\",\"Value\":[\"no-cache\"]},{\"Key\":\"Strict-Transport-Security\",\"Value\":[\"max-age=31536000 ; includeSubDomains\"]},{\"Key\":\"X-Frame-Options\",\"Value\":[\"DENY\"]},{\"Key\":\"Cache-Control\",\"Value\":[\"no-store, must-revalidate, no-cache, max-age=0\"]},{\"Key\":\"Date\",\"Value\":[\"Sun, 06 Aug 2023 14:04:17 GMT\"]}]","data":"{\"refId\":\"Ref53453\",\"cardId\":\"230530100608159ID1CARD5790474\",\"walletId\":\"5141c8f7-17bc-4fc6-a3a4-5e8358d71a7f\",\"amount\":\"280.00\",\"balance\":\"0.0000\"}"}
MapCustomer
You can get you details by passing you card id. You can call this function by creating a instance for this class CustomerMapping. The request needs to be pass as a json string parameter. The sample request given below
Request:
string kitNumber = "230000070080";
string mobile = "917812381818";
string orgId = "230526135544169ID1OID4070270";
string cardProgramId = "230528190350397ID1CP9723194";
string cardDetailsRequestJson2 = $@"
{{
""token"": ""{token}"",
""environment"": ""{environment}"",
""param"": {{}},
""body"": {{
""kitNumber"": ""{kitNumber}"",
""mobile"": ""{mobile}"",
""orgId"": ""{orgId}"",
""cardProgramId"": ""{cardProgramId}"",
}}
}}";
Card91.CustomerMapping CustomerMapping = new Card91.CustomerMapping();
Card91.CardResponse CustomerMappingRes = new Card91.CardResponse();
CustomerMappingRes = CustomerMapping.MapCustomer(cardDetailsRequestJson2);
Response:
{"status":500,"headers":"[{\"Key\":\"Transfer-Encoding\",\"Value\":[\"chunked\"]},{\"Key\":\"Connection\",\"Value\":[\"keep-alive\"]},{\"Key\":\"Vary\",\"Value\":[\"Origin\",\"Access-Control-Request-Method\",\"Access-Control-Request-Headers\"]},{\"Key\":\"X-Content-Type-Options\",\"Value\":[\"nosniff\"]},{\"Key\":\"X-XSS-Protection\",\"Value\":[\"1; mode=block\"]},{\"Key\":\"Pragma\",\"Value\":[\"no-cache\"]},{\"Key\":\"Strict-Transport-Security\",\"Value\":[\"max-age=31536000 ; includeSubDomains\"]},{\"Key\":\"X-Frame-Options\",\"Value\":[\"DENY\"]},{\"Key\":\"Cache-Control\",\"Value\":[\"no-store, must-revalidate, no-cache, max-age=0\"]},{\"Key\":\"Date\",\"Value\":[\"Sun, 06 Aug 2023 14:04:18 GMT\"]}]","data":"{\"message\":\"Card creation has not been started for this customer, no pending card rows found\"}"}
Request
To initiate a request and obtain card details, use the following code:
CardDetails cardDet = new CardDetails();
CardResponse Crs = new CardResponse();
Crs = cardDet.GetCardDetails("230530100608159ID1CARD5790474");
Where:
CardDetails - The main class to create an object to access the GetCardDetails method.
CardResponse - The response class to create an object to store the response from the method.
Response
The function will return a class with the following properties:
status - Integer status code.
headers - Header details in JSON string format.
data - Response details in JSON string format.
public class CardResponse
{
public int status { get; set; }
public string headers { get; set; }
public string data { get; set; }
}
Failure
Response:
status – 403
header - [{"Key":"Connection","Value":["keep-alive"]},{"Key":"Vary","Value":["Origin","Access-Control-Request-Method","Access-Control-Request-Headers"]},{"Key":"X-Content-Type-Options","Value":["nosniff"]},{"Key":"X-XSS-Protection","Value":["1; mode=block"]},{"Key":"Pragma","Value":["no-cache"]},{"Key":"Strict-Transport-Security","Value":["max-age=31536000 ; includeSubDomains"]},{"Key":"X-Frame-Options","Value":["DENY"]},{"Key":"Cache-Control","Value":["no-store, must-revalidate, no-cache, max-age=0"]},{"Key":"Date","Value":["Mon, 31 Jul 2023 14:03:33 GMT"]}]
data - {"message":"This user does not have the required privileges to perform this action"}