Re: Token Validation Failed

Solved! Go to solution
myhoang
Regular Visitor

Token Validation Failed

Hello,

I would like to make queries to the Cybersource API. I get this result "Token Validation Failed". I checked the "x-pay-token" and it's correct.

Apparently someone has had the same problem here before:
https://community.developer.visa.com/t5/Connection-Security-Errors/Token-Validation-Failed/m-p/9198#...


I updated the groovy script as requested but the problem is still unresolved. Do you have any solution to it?

End Point: https://sandbox.api.visa.com

Request Body:
{
"clientReferenceInformation": {
"code": "TC50171_3"
},
"processingInformation": {
"commerceIndicator": "internet"
},
"aggregatorInformation": {
"subMerchant": {
"cardAcceptorID": "1234567890",
"country": "US",
"phoneNumber": "650-432-0000",
"address1": "900 Metro Center",
"postalCode": "94404-2775",
"locality": "Foster City",
"name": "Visa Inc",
"administrativeArea": "CA",
"region": "PEN",
"email": "test@cybs.com"
},
"name": "V-Internatio",
"aggregatorID": "123456789"
},
"orderInformation": {
"billTo": {
"country": "US",
"lastName": "VDP",
"address2": "Address 2",
"address1": "201 S. Division St.",
"postalCode": "48104-2201",
"locality": "Ann Arbor",
"administrativeArea": "MI",
"firstName": "RTS",
"phoneNumber": "999999999",
"district": "MI",
"buildingNumber": "123",
"company": "Visa",
"email": "test@cybs.com"
},
"amountDetails": {
"totalAmount": "102.21",
"currency": "USD"
}
},
"paymentInformation": {
"card": {
"expirationYear": "2031",
"number": "5555555555554444",
"securityCode": "123",
"expirationMonth": "12",
"type": "002"
}
}
}

Response header : x-vdp-normalized-url /cybersource/v2/payments/
Server nginx
X-Content-Type-Options nosniff
X-CORRELATION-ID 1589882468_338_1468146034_l73c016_VDP_WS
Connection keep-alive
X-SERVED-BY l73c016
Pragma no-cache
Date Tue, 19 May 2020 10:01:08 GMT
X-APP-STATUS 401
X-Frame-Options SAMEORIGIN
Strict-Transport-Security max-age=2592000;includeSubdomains
Cache-Control no-cache, no-store, must-revalidate
x-vdp-authn-api-visa-id CYBS.200
Expires -1
#status# HTTP/1.1 401
Content-Length 112
X-XSS-Protection 1; mode=block

 

Response.png

4 REPLIES 4
vkamboj
Community Moderator

Re: Token Validation Failed

Hello @myhoang

 

Do you have a merchant ID or have signed any merchant agreement with CyberSource team? 

 

Thanks, 

Vaibhav

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

Re: Token Validation Failed

Hello, yes i have a merchant id

API_Products
Visa Developer Support Specialist

Re: Token Validation Failed

Hey @myhoang,

 

We have an expert team that manages questions specific to CyberSource. Please reach out to the CyberSource team directly.

 

CyberSource Support
800-709-7779

 

 

 




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.

Nicholas
Helper

Re: Token Validation Failed

Hello @myhoang 

You can current make requests and testing from the cybersource website

follow the link to https://ebc2.cybersource.com/ebc2/registration/external and create an account with them

then you can test various APIs they offer using this link https://developer.cybersource.com/api-reference-assets/index.html#payments

Those are the steps I followed and everything worked fine...

Don't hesitate if your stack, i will help you further if you post