Test cards for web services testing

Solved! Go to solution
abatarseh
Regular Visitor

Test cards for web services testing

Hello all,

I am new to this community and I got here after searching for a solution to my project testing needs.

In short, I am testing a web service and need a credit card to complete end to end scenarios. I have used real credit cards so far, but need a better scalable automatable solution.

If it supported, can anyone guide to how to get a test credit card that I can use with a real webservice and go through the whole payment process as if it was a real credit card, but no charges will take affect.

I need credit cards that:

1- Can be used internationally (North America, Europe for now)

2- Support for Multi-factor authentication (MFA) 

 

Thank you

2 REPLIES 2
jenn_kh
Community Moderator

Re: Test cards for web services testing

Hi @abatarsehThank you for reaching out. An agent will get back to you as soon as possible. Until then, if any community member has information that may be helpful, please feel free to reply.

API_Products
Visa Developer Support Specialist

Re: Test cards for web services testing

Hey @abatarseh,

 

For testing purposes, the Visa Developer Platform provides sandbox environments and test credit card numbers that simulate real transactions without incurring actual charges. This is ideal for creating scalable and automatable end-to-end testing solutions.

 

Steps to Obtain and Use Visa Test Credit Cards

1. Sign Up for Visa Developer Portal: Create an account on the Visa Developer at Portal (https://developer.visa.com/).

2. Access Sandbox Environment: Once registered, you can access the sandbox environment where you can use test credit card numbers using the Test Data from your project app (refer to sample screenshot below)

20190905 Test Data.png

 

20191203 Test Data VPP Authorization.png

3. Obtain Test Credit Card Numbers: Visa provides test card numbers that can be used in the sandbox environment to simulate transactions.

4. Configure Multi-Factor Authentication (MFA): Visa Developer Platform supports MFA. You can configure and test MFA scenarios using the provided test card numbers.

 

Example: Using Visa Developer Platform for Testing

1. Sign Up for Visa Developer Portal
- Go to the [Visa Developer Portal](https://developer.visa.com/) and sign up for an account.

2. Access Sandbox Environment
- After signing up, navigate to the "Projects" section, create a new project, and select the APIs you wish to test. This will grant you access to the sandbox environment for these APIs.

3. Obtain Test Credit Card Numbers
- Visa provides test card numbers in their [API documentation](https://developer.visa.com/pages/working-with-visa-apis/testing-cards). These are placeholder values and do not result in real charges.

4. Configure Multi-Factor Authentication (MFA)
- Ensure your testing setup supports MFA if required. Visa's sandbox environment provides scenarios to test MFA.

 

Example API Request Using Visa Test Card

Here’s an example of how to make an API request to the Visa sandbox:

```http
POST /vdp/helloworld HTTP/1.1
Host: sandbox.api.visa.com
Content-Type: application/json
Authorization: Basic [Your-Base64-Encoded-Credentials]

{
"message": "Hello, World!"
}
```

 

For payment transactions, you would use the test credit card details provided by Visa in the sandbox environment.

 

Example of a Test Card with MFA

Visa provides specific test card numbers that trigger authentication flows. Refer to their documentation for MFA scenarios.

 

By using the Visa Developer Platform's sandbox environment and test credit card numbers, you can simulate international transactions and MFA without incurring real charges. This approach is scalable and automatable, making it ideal for thorough end-to-end testing.

 




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.