# Visa Developer Center Playground

## Getting started with VDC Playground

**Visa Developer Center Playground** (VDC Playground) is a tool designed exclusively for testing and troubleshooting Visa APIs that are exposed through the Visa Developer Platform (VDP). It comes integrated with all required authentication methods to connect and get going with VDP APIs.

To access and download this tool, log in to **Visa Developer > Project dashboard > Asset Management**.

Key features include

- Support for all authentication methods, including [Message Level Encryption](https://developer.visa.com/pages/encryption_guide) and [Two-Way SSL](https://developer.visa.com/pages/working-with-visa-apis/two-way-ssl)
- Generate key stores (jks/p12).
- Save preferences and export details for reporting bug directly from the tool.

**Note**: VDC Playground is currently compatible with Windows only.

### Launch VDC Playground

Once you have downloaded the asset, launch the VDC Playground by double clicking on the executable jar file. If it doesn't open, perform the steps below in Windows and try again.

1. Start **Control Panel.**
2. Click **Default Programs**.
3. Click **Associate a file type or protocol with a specific program**.
4. Double click **.jar**.
5. Browse C:\Program Files\Java\jre\bin\javaw.exe.
6. Click the button **Open** and click the button **OK**.

To open in Command Line, type `java -jar vdpplayground.jar`

### Open a Project

Go to Visa Developer project dashboard and open the existing project. If you are creating a new project, begin on the [Create Project](https://developer.visa.com/portal/app/create) page.

### Select REST Method and Endpoint

1. In VDC Playground, select **Rest Method** (see _Figure 1_).
2. Populate the Visa API endpoint. You can get it from Code Explorer in API Reference Page for the particular API.
3. Provide appropriate proxy host and port if you are behind firewall.

_Figure 1_

### Authentication Settings

1. Select **Auth Method** (see _Figure 2_).
2. Provide appropriate proxy host and port if you are behind firewall.
3. Get the **User Id** and **Password** from VDP Project dashboard under **Credentials** Tab.

_Figure 2_

#### Settings for Two-Way SSL

1. Browse and select appropriate **Public Key** and **Private Key** (see _Figure 3_).
2. You can obtain the Private Key (PKCS12) at the time of creating a project in Sandbox and at the time of submitting CSR for higher environments ( _Figure 4_). Refer to [Configuring a Two-Way SSL Keystore Using an Auto-generated CSR](https://developer.visa.com/pages/working-with-visa-apis/two-way-ssl/#configuring_a_twoway_ssl_keystore_using_an_autogenerated_csr) for details.

_Figure 3_

_Figure 4_

#### Settings for X-Pay Token

1. Select Auth Method as X-Pay Token (see _Figure 5_).
2. Get the API Key and Shared Secret from VDP Dashboard > **Credentials** section.
3. Provide the API key as part of query parameter on the API End Point as shown to in _Figure 6_.
4. Provide the Shared Secret in the settings input field as seen in _Figure 5_.

_Figure 5_

_Figure 6_

#### Settings for Message Level Encryption

For APIs which require Message Level Encryption, please populate keyId, MLE Public and Private keys (PKCS12) as shown in _Figure 7_ **.**

Additionally, upload the “Server Encryption Certificate” for “MLE Public” key. You can locate it under the “Encryption/Decryption” section on Credentials tab in your project home page.

_Figure 7_

#### Settings for Proxy

Provide appropriate **Proxy Host** and **Port** if you are behind firewall (see _Figure 8_).

_Figure 8_

### Provide Request Payload

1. Paste the Request Payload in the Request text box ( _Figure 9_) and click **Run** button.
2. Make sure you have the request payload populated using the test data provided to you in Sandbox.

_Figure 9_

### Response Body and Header

You will get the Visa Response and corresponding Header in the respective sections as shown in _Figure 10_ **.**

_Figure 10_

### Examples

#### Two Way SSL

#### X-Pay Token

#### Visa Direct: Funds Transfer API with MLE

### Preferences & Projects

1. Save Functionality helps you to save complete configuration details on your local machine.
2. Load functionality helps you load the previously saved configuration back on to the tool.
3. Export Functionality copies Method, Endpoint, Request, Response and Response Header to Clipboard.
4. Reset will help clear all values on the tool.
5. Projects Section helps you to select a project previously saved or loaded on to the tool and just execute it.
6. You can also right click on the project to either remove it from the Project Panel temporarily or delete the saved configuration permanently based on the options shown.

### Generate Keystore

1. You can generate keystore in .jks or .p12 format from this tool.
2. Populate the Public and Private Keys and click either JKS or PKCS12 button to generate Key Store for the respective format.
3. Enter password to protect the keystore and confirm to save it to your local disk.
