two way SSL with MLE respone: API Internal Error: 2001. JSON string was not well formed

Kepler
Regular Visitor

two way SSL with MLE respone: API Internal Error: 2001. JSON string was not well formed

When I am using MLE for PAV API, the request body is like {"encData":"XXX"}

I came across error: API Internal Error: 2001. JSON string was not well formed . The X-CORRELATION-ID is 1698310199_522_1824083587_b9f55w85_VDP_WS, I am not sure if there is anything wrong with encryption, can you please help take a look?

4 REPLIES 4
Kepler
Regular Visitor

Re: two way SSL with MLE respone: API Internal Error: 2001. JSON string was not well formed

Add more header in response:

key: X-Content-Type-Options, value:["nosniff"]
key: X-CORRELATION-ID, value:["1698318829_221_442482391_b9f55w85_VDP_WS"]
key: Connection, value:["keep-alive"]
key: X-SERVED-BY, value:["b9f55w85"]
key: Pragma, value:["no-cache"]
key: Date, value:["Thu, 26 Oct 2023 11:13:49 GMT"]
key: X-Frame-Options, value:["SAMEORIGIN"]
key: X-APP-STATUS, value:["400"]
key: Strict-Transport-Security, value:["max-age\u003d31536000;includeSubdomains"]
key: Cache-Control, value:["no-cache, no-store, must-revalidate"]
key: encrypted, value:["true"]
key: X-ERROR-ORIGIN, value:["9900"]
key: Expires, value:["-1"]
key: X-XSS-Protection, value:["0"]
key: Content-Length, value:["639"]
key: Content-Security-Policy-Report-Only, value:["default-src \u0027self\u0027 https://*.v.me https://*.visa.com;script-src \u0027self\u0027 \u0027unsafe-inline\u0027 \u0027unsafe-eval\u0027 https://*.visa.com https://*.v.me;img-src \u0027self\u0027 https://*.v.me https://*.visa.com https://*.unica.com https://ad.doubleclick.net;style-src \u0027self\u0027 \u0027unsafe-inline\u0027 https://*.visa.com;object-src https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;"]
key: X-Application-Error-Code, value:["3001"]
key: Content-Language, value:["en-US"]

SandraW
Helper

Re: two way SSL with MLE respone: API Internal Error: 2001. JSON string was not well formed

Thank you for reaching out, @Kepler . An agent will get back to you as soon as possible. In the meantime, if any community member knows the solution, please reply to this thread! -SandraW

Kepler
Regular Visitor

Re: two way SSL with MLE respone: API Internal Error: 2001. JSON string was not well formed

Hi @SandraW , there is no code change, I ran it again,, but the error code changed to the following one: {"status":"INTERNAL_SERVER_ERROR","code":"NPPS007","message":"Internal error occured"},

And the new X-CORRELATION-ID is 1698419670_371_231789273_-59699695_VDP_WS.

Can you please help check what this error is? and why the error code changes as I have no code change

 

 

API_Products
Visa Developer Support Specialist

Re: two way SSL with MLE respone: API Internal Error: 2001. JSON string was not well formed

Hi @Kepler,

 

I ran a Payment Account Validation Card Validation sandbox test and received a successful request/response payload. My request/response payload is below. Please try again and share your result with us.

 

End Point https://sandbox.api.visa.com/pav/v1/cardvalidation
Method POST
Request
{
"systemsTraceAuditNumber": "743720",
"cardCvv2Value": "022",
"cardAcceptor": {
"address": {
"country": "US",
"zipCode": "94404",
"city": "fostr city",
"state": "CA"
},
"idCode": "111111",
"name": "ABC Corp",
"terminalId": "12345678"
},
"primaryAccountNumber": "4957030420210462",
"retrievalReferenceNumber": "015221743720",
"cardExpiryDate": "2040-10",
"addressVerificationResults": {
"street": "801 Metro Center Blv",
"postalCode": "94404"
}
}
Response
{
"approvalCode": "12AB54",
"cvv2ResultCode": "M",
"transactionIdentifier": 134312962938044,
"actionCode": "85",
"addressVerificationResults": "Z",
"responseCode": "5"
}
Response Header
Status Code: 200
Server : nginx
Date : Fri, 27 Oct 2023 22:02:24 GMT
Content-Type : application/json;charset=UTF-8
Content-Length : 156
Connection : keep-alive
X-SERVED-BY : b9f55
X-CORRELATION-ID : 1698444144_052_807499849_b9f55_VDP_WS
X-APP-STATUS : 200
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

 




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.