Re: Card On File - NPPS012 Error

Kamal1
Regular Visitor

Card On File - NPPS012 Error

Hi , 

 

I have established the MTLS correctly and I have encrypted the below request and send it to the card on file api /v1/datainfo

however , I'm getting bad request error with code NPPS012

 

Request:

 

{
"requestHeader": {
"requestMessageId": "6da6bXA024532a2e0eacb1af58581",
"messageDateTime": "2023-07-29 05:25:12.327"
},
"requestData": {
"pANs": [
4072208010000000
],
"group": "STANDARD"
}
}
 
Response
{
"status": "BAD_REQUEST",
"code": "NPPS012",
"message": "Bad request"
}
 
X-CORRELATION-ID : 1690590175_731_1948211085_-6b78b6f4k45_VDP_WS
 
Please advise as we need to test
 
2 REPLIES 2
jenn_kh
Community Moderator

Re: Card On File - NPPS012 Error

Thank you for reaching out, @Kamal1An agent is looking into this and will get back to you as soon as possible. Until then, if any community members know a possible solution, feel free to reply in this thread. 

API_Products
Visa Developer Support Specialist

Re: Card On File - NPPS012 Error

Hi @Kamal1,

 

Apologies for the delay in answering your query. I ran a sandbox test today using the Visa Developer Center Playground tool and got a successful request/response payload.  Please see my request/response payload below (screenshot provided) and test again. 

 

Here's the link to the VDC Playground tool guide: https://developer.visa.com/pages/visa-developer-center-playground 

 

You can take a look at our Visa Developer Error Codes here: https://developer.visa.com/pages/visa-developer-error-codes 

Payload and URI Error Codes

HTTP STATUS HTTP CODE CAUSE/RESOLUTION
BAD REQUEST 400

This error could be due to a variety of reasons.

Check for the following:

  • The url has a space after the ?.
  • Whitespace issues, in general, anywhere in the url.
  • Ideally the following fields need to be checked for correctness:
    •  URL
    •  Query params

Or

  • The API endpoint you are trying to use only supports Two-Way SSL authentication. Please ensure you are not using any other token type.

Or

  • Invalid input found in the request payload.

 

 

Successful Request/Response Payload

 

End Point https://sandbox.api.visa.com/cofds-web/v1/datainfo
Method POST
Request
{
"requestHeader": {
"requestMessageId": "6da6b8b024532a2e0eacb1af58581",
"messageDateTime": "2019-02-35 05:25:12.327"
},
"requestData": {
"pANs": [4072208010000000],
"group": "STANDARD"
}
}
Response
{
"responseHeader": {
"numRecordsReturned": 1,
"responseMessageId": "1691608065_782_1398497577_-6b78b6f4-4_VDP_WS",
"requestMessageId": "6da6b8b024532a2e0eacb1af58581",
"messageDateTime": "2023-08-09 19:07:45.912"
},
"responseData": {
"panList": [{"panData": {
"panResponseMsg": "Success",
"merchants": [
{
"mrchDbaName": "EDF ENERGY",
"mrchName": "EDF ENERGY",
"totalTranCount": "1",
"cardAcceptorId": "54421241",
"mrchDbaId": "20599",
"lastTranCurrency": "GBP",
"sponsoredMerchantId": "ABCD",
"lastMrchTranDt": "2019-04-26",
"vAUUpdateStatus": "N",
"lastTranAmtUSD": "517.63",
"acctNumOld4Digit": "",
"mCC": "4900",
"tokenPANReplacementStatus": "N",
"paymentFacilitatorId": "ABCD",
"lastTranAmt": "400.0",
"tokenReqstrId": "0000000",
"vAULastUpdateDate": "",
"mrchAddr": "TELEDOC 228 PARIS 12 PARIS 75012 PARIS FRANCE",
"mrchURL": "",
"confidenceInd": "C",
"tranTypeDetails": [{
"lastTranCurrency": "GBP",
"lastTranAmt": "400.0",
"lastTranAmtUSD": "517.63",
"tranCount": 1,
"lastTranDateTime": "2019-04-26 09:49:11.000",
"tranType": "MAIL_TELEPHONE"
}],
"tokenPANReplacementDate": "",
"lastTranDateTime": "2019-04-26 09:49:11.000",
"mrchPhoneNum": "0000000"
},
{
"mrchDbaName": "EDF ENERGY",
"mrchName": "EDF ENERGY",
"totalTranCount": "1",
"cardAcceptorId": "54421241",
"mrchDbaId": "20599",
"lastTranCurrency": "GBP",
"sponsoredMerchantId": "ABCD",
"lastMrchTranDt": "2019-04-26",
"vAUUpdateStatus": "N",
"lastTranAmtUSD": "517.63",
"acctNumOld4Digit": "",
"mCC": "4900",
"tokenPANReplacementStatus": "N",
"paymentFacilitatorId": "ABCD",
"lastTranAmt": "400.0",
"tokenReqstrId": "0000000",
"vAULastUpdateDate": "",
"mrchAddr": "TELEDOC 228 PARIS 12 PARIS 75012 PARIS FRANCE",
"mrchURL": "",
"confidenceInd": "C",
"tranTypeDetails": [{
"lastTranCurrency": "GBP",
"lastTranAmt": "400.0",
"lastTranAmtUSD": "517.63",
"tranCount": 1,
"lastTranDateTime": "2019-04-26 09:49:11.000",
"tranType": "MAIL_TELEPHONE"
}],
"tokenPANReplacementDate": "",
"lastTranDateTime": "2019-04-26 09:49:11.000",
"mrchPhoneNum": "0000000"
},
{
"mrchDbaName": "EDF ENERGY",
"mrchName": "EDF ENERGY",
"totalTranCount": "3",
"cardAcceptorId": "54421241",
"mrchDbaId": "20599",
"lastTranCurrency": "USD",
"sponsoredMerchantId": "ABCD",
"lastMrchTranDt": "2020-05-16",
"vAUUpdateStatus": "N",
"lastTranAmtUSD": "230.0",
"acctNumOld4Digit": "",
"mCC": "4900",
"tokenPANReplacementStatus": "N",
"paymentFacilitatorId": "ABCD",
"lastTranAmt": "198.0",
"tokenReqstrId": "0000000",
"vAULastUpdateDate": "",
"mrchAddr": "TELEDOC 228 PARIS 12 PARIS 75012 PARIS FRANCE",
"mrchURL": "",
"confidenceInd": "C",
"tranTypeDetails": [
{
"lastTranCurrency": "GBP",
"lastTranAmt": "345.08",
"lastTranAmtUSD": "345.08",
"tranCount": 1,
"lastTranDateTime": "2020-04-26 09:49:11.000",
"tranType": "SCHEDULED_RECURRING"
},
{
"lastTranCurrency": "USD",
"lastTranAmt": "180.99",
"lastTranAmtUSD": "180.99",
"tranCount": 1,
"lastTranDateTime": "2020-02-18 16:40:10.000",
"tranType": "INSTALLMENT"
},
{
"lastTranCurrency": "USD",
"lastTranAmt": "198.0",
"lastTranAmtUSD": "230.0",
"tranCount": 1,
"lastTranDateTime": "2020-05-16 15:36:28.000",
"tranType": "UNSCHEDULED_RECURRING"
}
],
"tokenPANReplacementDate": "",
"lastTranDateTime": "2020-05-16 15:36:28.000",
"mrchPhoneNum": "0000000"
},
{
"mrchDbaName": "EDF ENERGY",
"mrchName": "EDF ENERGY",
"totalTranCount": "2",
"cardAcceptorId": "54421241",
"mrchDbaId": "20599",
"lastTranCurrency": "GBP",
"sponsoredMerchantId": "ABCD",
"lastMrchTranDt": "2020-04-26",
"vAUUpdateStatus": "N",
"lastTranAmtUSD": "517.63",
"acctNumOld4Digit": "",
"mCC": "4900",
"tokenPANReplacementStatus": "N",
"paymentFacilitatorId": "ABCD",
"lastTranAmt": "400.0",
"tokenReqstrId": "0000000",
"vAULastUpdateDate": "",
"mrchAddr": "TELEDOC 228 PARIS 12 PARIS 75012 PARIS FRANCE",
"mrchURL": "",
"confidenceInd": "C",
"tranTypeDetails": [
{
"lastTranCurrency": "GBP",
"lastTranAmt": "400.0",
"lastTranAmtUSD": "517.63",
"tranCount": 1,
"lastTranDateTime": "2020-04-26 09:49:11.000",
"tranType": "MAIL_TELEPHONE"
},
{
"lastTranCurrency": "USD",
"lastTranAmt": "180.99",
"lastTranAmtUSD": "180.99",
"tranCount": 1,
"lastTranDateTime": "2020-02-18 16:40:10.000",
"tranType": "ECOM_OTHER"
},
{
"lastTranCurrency": "USD",
"lastTranAmt": "159.0",
"lastTranAmtUSD": "229.0",
"tranCount": 1,
"lastTranDateTime": "2020-05-16 15:36:28.000",
"tranType": "AUTH_VERIFICATION"
}
],
"tokenPANReplacementDate": "",
"lastTranDateTime": "2020-04-26 09:49:11.000",
"mrchPhoneNum": "0000000"
},
{
"mrchDbaName": "ITUNES MUSIC STORE",
"mrchName": "APL ITUNES COM BILL",
"totalTranCount": "1",
"cardAcceptorId": "337186000108778",
"mrchDbaId": "1624",
"lastTranCurrency": "USD",
"sponsoredMerchantId": "ABCD",
"lastMrchTranDt": "2020-02-08",
"vAUUpdateStatus": "Y",
"lastTranAmtUSD": "18.99",
"acctNumOld4Digit": "9024",
"mCC": "5734",
"tokenPANReplacementStatus": "N",
"paymentFacilitatorId": "ABCD",
"lastTranAmt": "18.99",
"tokenReqstrId": "00000000",
"vAULastUpdateDate": "2020-09-12",
"mrchAddr": "",
"mrchURL": "",
"confidenceInd": "C",
"tranTypeDetails": [{
"lastTranCurrency": "USD",
"lastTranAmt": "18.99",
"lastTranAmtUSD": "18.99",
"tranCount": 1,
"lastTranDateTime": "2020-02-08 16:40:10.000",
"tranType": "ECOM_OTHER"
}],
"tokenPANReplacementDate": "",
"lastTranDateTime": "2020-02-08 16:40:10.000",
"mrchPhoneNum": "866-712-7753"
},
{
"mrchDbaName": "OTHER RECREATION SERVICES",
"mrchName": "BT CAMPS SOUTH CAROL",
"totalTranCount": "0",
"cardAcceptorId": "000445199040996",
"mrchDbaId": "2836",
"sponsoredMerchantId": "ABCD",
"lastMrchTranDt": "",
"vAUUpdateStatus": "Y",
"acctNumOld4Digit": "9024",
"mCC": "7999",
"tokenPANReplacementStatus": "N",
"paymentFacilitatorId": "ABCD",
"lastTranAmt": "0",
"tokenReqstrId": "00000000",
"vAULastUpdateDate": "2020-09-12",
"mrchAddr": "",
"mrchURL": "www.citigroup.com",
"confidenceInd": "E",
"tranTypeDetails": [{
"lastTranCurrency": "USD",
"lastTranAmt": "159.0",
"lastTranAmtUSD": "159.0",
"tranCount": 1,
"lastTranDateTime": "2020-05-11 15:36:28.000",
"tranType": "AUTH_VERIFICATION"
}],
"tokenPANReplacementDate": "",
"mrchPhoneNum": ""
}
],
"pAN": "4072208010000000"
}}],
"group": "STANDARD"
},
"status": {
"statusDescription": "COF Service - Success",
"statusCode": "CDI000"
}
}
Response Header
Status Code: 200
Server : nginx
Date : Wed, 09 Aug 2023 19:07:45 GMT
Content-Type : application/json;charset=UTF-8
Content-Length : 8173
Connection : keep-alive
X-SERVED-BY : -6b78b6f4-4
X-CORRELATION-ID : 1691608065_782_1398497577_-6b78b6f4-4_VDP_WS
X-APP-STATUS : 200
encrypted : true
Content-Language : en-US
Cache-Control : no-cache, no-store, must-revalidate
X-Frame-Options : SAMEORIGIN
X-XSS-Protection : 0
X-Content-Type-Options : nosniff
Strict-Transport-Security : max-age=31536000;includeSubdomains
Pragma : no-cache
Expires : -1
Content-Security-Policy-Report-Only : default-src 'self' https://*.v.me https://*.visa.com;script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.visa.com https://*.v.me;img-src 'self' https://*.v.me https://*.visa.com https://*.unica.com https://ad.doubleclick.net;style-src 'self' 'unsafe-inline' https://*.visa.com;object-src https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;
X-Content-Security-Policy-Report-Only : default-src 'self' https://*.v.me https://*.visa.com;script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.visa.com https://*.v.me;img-src 'self' https://*.v.me https://*.visa.com https://*.unica.com https://ad.doubleclick.net;style-src 'self' 'unsafe-inline' https://*.visa.com;object-src https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;
X-WebKit-CSP-Report-Only : default-src 'self' https://*.v.me https://*.visa.com;script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.visa.com https://*.v.me;img-src 'self' https://*.v.me https://*.visa.com https://*.unica.com https://ad.doubleclick.net;style-src 'self' 'unsafe-inline' https://*.visa.com;object-src https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;
X-XSS-Protection : 1; mode=block
X-Content-Type-Options : nosniff
Strict-Transport-Security : max-age=31536000;includeSubdomains;always

 

COF datainfo.png




Thanks,

Diana H.



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.