Unable to Register Card in VISA Transaction Control

Tholkappiyan
Regular Visitor

Unable to Register Card in VISA Transaction Control

Hi,
I am new to the VISA developer APIs. I started trying out the "Transaction Conrols" API
 
Steps done:
1. Registered an account in developer portal : tholkappiyan@hypto.in
2. Added a new project (Hypto-Test) with "Visa Transaction Controls"
3. Downloaded the key on creating the project and certificate from "Credentials" page
4. Hit the VISA API with the cert, key, base64 encoded uname:pwd as follows

curl -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic base64-encoded-userID:Password" --key <VISA-key>.pem --cert <VISA-cert>.pem -X POST "https://sandbox.api.visa.com/vctc/customerrules/v1/consumertransactioncontrols" -d '{"primaryAccountNumber": "<VISA Card number>"}'

I tried with multiple valid VISA card numbers, but still getting the following error:
{"metainfo":{"Description":"Invalid Data","Code":422},"error":["Unable to process due to invalid data."]}
 
I tried '49132098504XXXX' (given in Test data section) as the primaryAccountNumber and got the following error:
{"metainfo":{"Description":"Bad Request","Code":400},"error":["primaryAccountNumber can only have numeric digit.","The length of primaryAccountNumber is between 16 and 19"]}
 
Am I missing something here? Is there any test card number which will work in the sandbox environment?
 
Regards,
Tholkappiyan
2 REPLIES 2
API_Products
Visa Developer Support Specialist

Re: Unable to Register Card in VISA Transaction Control

Hi @Tholkappiyan,

 

I have received the email you submitted to developer@visa.com for this same query and I have requested that you provide additional information to me using email. I'll work on resolving this query through our email communications.

 

Finally, don't forget to click on "Accept as Solution" after your query is resolved in the community forum. Thanks!                            




Thanks,

Diana



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

API_Products
Visa Developer Support Specialist

Re: Unable to Register Card in VISA Transaction Control

Hi @Tholkappiyan,

 

I'd like to post the answer for you in the community forum as well. When you create a test App in our sandbox you will receive Test Data in your App (refer to screenshot below). The test data for your Visa Developer application is available in the Dashboard under test data in the left navigation, this will ensure that you are using valid data that has been provisioned for specific scenarios. You will basically have a table per API that is split into the Request and Response sections and the values on the Request section are meant to be populated in the payload with the intention of obtaining results specified in the Response section.

 

Sandbox data is limited to what is provided in the Test Data tables and is not integrated to the Visa Network and you cannot test real data in sandbox.

 

20190521 Test Data.jpg

 

In your prior email, you mentioned that you tried '49132098504XXXX' (given in Test data section) as the primaryAccountNumber and got an error. Please substitute the XXXX with numeric digits. For example, in my Test Data Request, I can set the primaryAccountNumber as {"primaryAccountNumber": "4255255591740001"}, which has only numeric digits (refer to screenshot below). Please let us know if you have other questions.

 

20190521 Dashboard Test Data.jpg

 

 




Thanks,

Diana



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