Re: vts/provisionTokens access

mcalleja
Regular Visitor

vts/provisionTokens access

Hi there

My organisation has granted me developer access to their VISA Tokenisation Project.

 

I've previously worked with VISA checkout/wallet and am familiar with the generation of the x-pay-token header.

 

Issue I having is that the exact same code I use to generate the x-paytoken header for making calls to the VISA checkout endpoint, do not work when making calls to the VTS service.

 

I'm correctly set the resourcePath to vts/provisionedTokens as mentioned on the developer website.

 

However I get a 401 error response each time I try and make a call

 

https://cert.api.visa.com/vts/provisionedTokens?apikey={{apikey}}

 

"responseStatus": {
"status": 401,
"code": "9159",
"severity": "ERROR",
"message": "Token validation failed",
"info": ""
}
}
 
Could there be an issue with the account privilege ?
 
Thanks
 
10 REPLIES 10
API_Products
Visa Developer Support Specialist

Re: vts/provisionTokens access

Hey @mcalleja,

 

I'd like to help you out with the issue your experiencing. Please provide the following information, so I can help troubleshoot the issue:

1. End Point
2. Request Header
3. Request Body
4. Response Header (include the x-correlation-id)
5. Response Body

Using SoapUI, you can find the x-correlation-id in the Raw Tab of the response header.

 




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.

mcalleja
Regular Visitor

Re: vts/provisionTokens access

Hi Diana

Here are the details as requested

1. End Point - 

https://cert.api.visa.com/vts/provisionedTokens

 

2. Request Header - 

POST /vts/provisionedTokens?apikey=K0V1BCTABYOIHFQ2VJ2C21dqh-EBMoiC6jSEZr0bq4Ni_P-FU%0A HTTP/1.1
x-pay-token: xv2:1568760205:3108941283e5734e08db33c3891a4484980f3d39374d5787d4558112a71f1029
Content-Type: application/json
x-request-id: 1568760205
User-Agent: PostmanRuntime/7.16.3
Accept: */*
Cache-Control: no-cache
Postman-Token: f6e4c841-32ef-45b7-866a-bf902bed7dd4
Host: cert.api.visa.com
Accept-Encoding: gzip, deflate
Content-Length: 721
Cookie: ak_bmsc=A7AE37C87DA0BA5E2BC76C23F10744CB1701F0D5017A00003459815DAD56CE7E~pll9PNtmfCqjhuu/x6k7O978OkpAB1gvLCA+YNBw2SPvz6xBsooA4a3qEsotbiqAFerYAwrz/XDNI69K42cL1TY/Cmvbs3Kz5sIrekzR97HK0FWSaWPwhz5OQ3kX7D9TspHZZE7uXqIa1noGED4cWPLgYIRkiYN3KOnetv1kPWFU4NOyXW9EUstZW1xerMNpuRAP6GFjLwWir+3s6XYkujvXlNkKpCO592Z7Tg8hQpx8U=; bm_sv=9C20D61414F6FEA5C54123CC71650AB4~efla2o6eICybdy5t/70FksrI1qOfBBDrhqiDGauEQGm5g7rEL1KGTSz4g5rU7ivs/h684QAzx8wp0Z0gHOxKv/PLIInNPlag57PwQlIKgywePMDp8RBWS9rDpLwVm9pnmq70zuHa/tMQNAXi2sy6oxqKeXcDpwTteRfuP6rH1rY=
Connection: keep-alive

 

3. Request Body - 

{
"clientWalletAccountID": "AiOiJBMjU2R0NNS1ciLCJiI6",
"protectionType": "SOFTWARE",
"clientWalletAccountEmailAddressHash": "DSJFLDSFJSDKNGJ234NSD2",
"accountType": "WALLET",
"clientWalletAccountEmailAddress": "janedoe@mail.com",
"encPaymentInstrument": {
"cvv2": "758",
"provider": {
"clientWalletAccountID": "AiOiJBMjU2R0NNS1ciLCJiI6",
"clientWalletProvider": "12345678901",
"clientDeviceID": "DEiOiJBMjU2R0NNS1ciLCJiI",
"Intent": "PUSH_PROV_MOBILE",
"clientAppID": "APP1",
"isIDnV": false
},
"name": "BillEvans",
"accountNumber": "4411059860000004",
"expirationDate": {
"month": "10",
"year": "2015"
}
},
"locale": "en_US",
"clientAppID": "APP1",
"presentationType": [
"NFC-HCE",
"NFC-SE",
"INAPP",
"MST",
"MSR",
"ECOM",
"QR_CONSUMER_CLOUD"
],
"panSource": "MANUALLYENTERED"
}

 


4. Response Header (include the x-correlation-id) 

HTTP/1.1 401 Unauthorized
Server: Apache
X-SERVED-BY: l55p161
X-CORRELATION-ID: 1568760205_312_96_l55p161_VDP_ARM
X-APP-STATUS: 401
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=2592000;includeSubdomains
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: -1
Content-Type: application/json;charset=UTF-8
Content-Length: 112
Date: Tue, 17 Sep 2019 22:43:25 GMT
Connection: close
Set-Cookie: bm_sv=9C20D61414F6FEA5C54123CC71650AB4~efla2o6eICybdy5t/70FksrI1qOfBBDrhqiDGauEQGm5g7rEL1KGTSz4g5rU7ivs/h684QAzx8wp0Z0gHOxKv/PLIInNPlag57PwQlIKgyyLZbyGXyv2fTpgZzUm3va8BxY8Si+u+T8ZB8TzZat

Content-Length : 112
Date : Tue, 17 Sep 2019 22:32:42 GMT
Connection : close

5. Response Body

{"responseStatus":{"status":401,"code":"9159","severity":"ERROR","message":"Token validation failed","info":""}}
}}

 

paul_earnest
Regular Contributor

Re: vts/provisionTokens access

Hi @mcalleja,

 

I am also facing same issue even though, i pass the right apikey, properly generated x-pay-token.

 

May you please share if you have got any resolution to the problem that you have mentioned. Appreciate your inputs

 

Thank You

Paul

 

API_Products
Visa Developer Support Specialist

Re: vts/provisionTokens access

Hey @paul_earnest,

 

Can you please provide details to the issue you're experiencing? Please provide the following information and x-correlation-id for us to further investigate:

1. Endpoint
2. Request Header
3. Request Body
4. Response Header (include the x-correlation-id)
5. Response Body

Using SoapUI, you can find the x-correlation-id in the Raw Tab of the response header.

 




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.

adamlee
Helper

Re: vts/provisionTokens access

I have the same error please help :

Request Headers
Content-Type
application/json
x-pay-token
xv2:1615110364:a3bb62c326aec68280e361d35aac9d7b71d0fcfd160898ceb41edee3ba640823
ex-correlation-id
HNA55X7E257L_SC
Accept
application/json
Request Params
apiKey
NT8CZMRHWT96Z23XXTGS212krSurD0plpzRTVbaHTRTUQGWCs
 
Body: 
{
 "locale" : "en_US",
 "clientAppID" : "ecomEnabler",
 "clientWalletAccountID" : "TEST042219512",
 "clientWalletAccountEmailAddress" : "test@visa.com",
 "clientWalletAccountEmailAddressHash" : "zmIoP0aEmZTgjK25dalVZcxxxxxsTp9czJAKYg",
 "location" : "123.12345678/-09878768761",
 "ip4address" : "10.240.2.123"
}
SLi
Visa Developer Support Specialist
Visa Developer Support Specialist

Re: vts/provisionTokens access

Hi @adamlee,

 

I can't tell from the above which API endpoint you are calling. 

 

Can you please provide the following information and x-correlation-id for us to further investigate:

1. Endpoint
2. Request Header
3. Request Body
4. Response Header (include the x-correlation-id)
5. Response Body

 

Thanks!


Best,
Stacey

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

Re: vts/provisionTokens access

Hi @paul_earnest 

 

Our issue was with the jwe encrypted payload not being encrypted properly. I'd suggest you reach out to Visa and request a working sample code snippet of how they create the payload.

 

Cheers

 

SLi
Visa Developer Support Specialist
Visa Developer Support Specialist

Re: vts/provisionTokens access

Hi @mcalleja,

I see that you are calling an endpoint in the certification environment. Can you please confirm that your project is currently in the certification stage?


Best,
Stacey

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

Re: vts/provisionTokens access

Hi SLi

 

Yes I can confirm our project is in certification stage