Problem with calling /vts/panEnrollments API

mic
Regular Visitor

Problem with calling /vts/panEnrollments API

Calling developer API /vts/panErollements

I'm programmatically correctly generating the XPayToken as it matches the developer sandbox generated value.
Getting a 400 response with message:
"Input for encPaymentInstrument is invalid or inconsistent with the profile."
I'm not sure what is mis-matching between my request and profile as I'm using the one and only correct API key.
My manually built-up and encrypted encPaymentInstrument matches the developer sandbox blob, so that's not the issue.  My raw/unencrypted payment instrument is as follows:

"accountNumber": "4957031028125015","last4": "5015","expirationDate": { "month": "10", "year": "2016"},"billingAddress": { "line1": "100 Queen Street", "line2": null, "city": "Brisbane", "state": "QL", "country": "AU", "postalCode": "4001"}

 

I'm using the one and only correct API key/shared-secret for my profile.

 

What is the possible problem with my encPaymentInstrument raw data compared with my profile? Please assist.

11 REPLIES 11
ricardo_visa
Community Scholar

Re: Problem with calling /vts/panEnrollments API

Hi Mic, 

 

What is the app name?

 

Thanks,

Ricardo 




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

Re: Problem with calling /vts/panEnrollments API

Mic, 

You do not need to enter “last4” in the payment instrument. There is no field as such. You are missing name and CVV2 in the inputs

 

Example of the Payment instrument is provided below

 

{

"accountNumber": "4411059860000004",

"name": "BillEvans",

"cvv2": "123",

"expirationDate": {

"month": "10",

"year": "2015"

},

"billingAddress": {

"line1": "801MetroCenterBlvd",

"line2": null,

"city": "FosterCity",

"state": "CA",

"country": "US",

"postalCode": "94404"

},

 

Hope this helps!

 

-Ricardo




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

Re: Problem with calling /vts/panEnrollments API

Hi,

 

The app name I’m using in the request is AppID

 

i.e.

"clientAppID": "AppID"

 

This is consistent with my profile, I believe?

 

I had tried that permutation.  To verify, I changed back.

 

Here’s my request unencrypted payment info now:

 

"accountNumber": "4957031028125015","name": "Bill Evans","cvv2": "123","expirationDate": {    "month": "10",    "year": "2016"},"billingAddress": {    "line1": "100 Queen Street",    "line2": null,    "city": "Brisbane",    "state": "QL",    "country": "AU",    "postalCode": "4001"}

 

Still getting the same error message response:

 {

  "errorResponse": {

    "status": 400,

    "message": "Input for encPaymentInstrument is invalid or inconsistent with the profile.",

    "reason": "invalidParameter",

    "details": [

      {

        "location": "encPaymentInstrument"

      }

    ]

  }

}

 

Full request body is:

{"clientAppID": "AppID","consumerEntryMode": "KEYENTERED","encPaymentInstrument": "eyJhbGciOiJBMjU2R0NNS1ciLCJlbmMiOiJBMjU2R0NNIiwia2lkIjoiNDdKVzRLTkJJU0s2WDFTME9HVlAyMTZMczNJbG95dm9Mc0laRllVencyMU5DVzRrVSIsImNoYW5uZWxTZWN1cml0eUNvbnRleHQiOiJTSEFSRURfU0VDUkVUIiwiaXYiOiJOeFVpSkluXzNieU10RlBRIiwidGFnIjoiV25GRnhsX1JlSllEUklBUDdZVV9QdyJ9.CGyVShpJEhw08Bz7AfnNoLUCghtEGzptFtymqYqbFBk.YT9sVs4QKLo2GsTZ.Z0vtJCIipOjrJFjF25HMA0FNl77lZADCRjuXLh51pTchDt0GRAa68MIOLPy5ysY7cD6gjLwMxmnsgsoe-jSrvvxRC73OV4yDZox0XlLZ6q76w5XGVlxZ3vU8WaUCR_APUMsKRE6QD6xwHDp_JRJ_eq1m_PnZID19fwwA8XeOZ8AWylvdodOjDQK-GjLv6q5cHhD41xXYxjhKo3d3eauu3lMKXqIi62slMfJHXflpJDv57HY-vB-i0We9USu3FuBSVsRAW125s7Ah_CQGCggYLNZiEouPIJn75s9CFh4TrasXj375FFB4RYyRY3uJ2EBFtBJfMuKb943z67Aa1vY1peqHIHVJo6y_tAoaEO7pZhwU_muWSZ4mfxmv_Q.T3QThSH1U18y2zlZqGU62g","locale": "en_US","panSource":"MANUALLYENTERED"}

Please assist with what's inconsistent.  Thanks.

ricardo_visa
Community Scholar

Re: Problem with calling /vts/panEnrollments API

Standby - working on getting you that answer!




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

Re: Problem with calling /vts/panEnrollments API

 Hi Mic,

Did you use the PAN number that was in the test data tab or did you use a different one?




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

Re: Problem with calling /vts/panEnrollments API

Yes.

 

There were 4 or 5 or so test PANs listed in the test data lab; I used one of them.

ricardo_visa
Community Scholar

Re: Problem with calling /vts/panEnrollments API

Ok, thanks - and the CVV? 




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

Re: Problem with calling /vts/panEnrollments API

There's no CVV2 in the Test Data page.

All there is is column Scenario: Success, and then Card Number column.

 

As mentioned previously, there's 5 rows (5 test card numbers) 

 

[but no CVV2's]

 

So, I just used one of those 5 test card numbers and a random CVV2.

 

artattack
Regular Visitor

Re: Problem with calling /vts/panEnrollments API

I have the same problem. Did you solve? Random CVV is the correct way?