Sandbox testing

supriya7768
Occasional Visitor

Sandbox testing

I want to test the New Card Api in sandbox. But in Header part the X-App-Id is required can you guide me from where I can get that value.

And also how to do this sandbox testing. I am not able to get it. I am testing this from the postman. 

2 REPLIES 2
jenn_kh
Community Moderator

Re: Sandbox testing

Hi @supriya7768Thank you for reaching out. An agent will look into this and get back to you shortly. Until then, if any community member knows a solution, please feel free to reply in this thread. 

API_Products
Visa Developer Support Specialist

Re: Sandbox testing

hey @supriya7768,

 

To test the New Card API in the sandbox environment and obtain the X-App-Id value, follow these steps based on the Visa Developer Platform documentation:

 

1. Obtain X-App-Id:
- Log in to your Visa Developer account.
- Navigate to your project dashboard.
- Select the project you are working on.
- In the project details, you will find the API key and other credentials. The X-App-Id is usually listed under the project credentials or settings. It is a unique identifier for your application.

 

2. Sandbox Testing with Postman:
- Ensure you have the Postman application installed and set up.
- Create a new request in Postman.
- Set the request type (GET, POST, etc.) as required by the New Card API.
- Enter the sandbox URL for the New Card API endpoint.
```
Example URL: https://sandbox.api.visa.com/newcard/endpoint
```
- In the Headers section of your request, add the following headers:
```
X-App-Id: <Your X-App-Id>
Authorization: Basic <Your Base64 Encoded Credentials>
Content-Type: application/json
```
- To obtain the Base64 Encoded Credentials, encode your API key and secret in the format apikey:secret and then Base64 encode this string.
- In the Body section, provide the necessary JSON payload as required by the New Card API.
```json
{
"exampleField1": "value1",
"exampleField2": "value2"
}
```
- Send the request and analyze the response.

 

3. Troubleshooting:
- Ensure that your API key and secret are correct and have the necessary permissions for the New Card API.
- Verify that your sandbox environment is correctly set up and that you are using the correct endpoint URL.
- Check the API documentation for any specific requirements or additional headers that may be needed.

 

If you encounter issues or need further assistance, you can refer to the official Visa Developer documentation.




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.