Working examples demonstrating connectivity testing with the Visa Developer Platform (VDP) using the @visa/api-client package.
This package contains example code for:
- Testing VDP connectivity using
VdpApiClient(X-Pay token authentication) - Testing VDP connectivity using
VdpMutualTlsClient(Two-Way SSL / Mutual TLS authentication)
- Node.js >= 18.0.0
- Visa API credentials (see authentication methods below)
- Packages must be built first (see Building section below)
# From project root
npm run build:packages-
Copy the environment template:
cp .env.example .env
-
Edit
.envwith your actual Visa credentials
| Example | Command | Requires |
|---|---|---|
| X-Pay Token | npm run api:test-connection |
API key + shared secret in .env |
| Two-Way SSL | npm run api:test-connection-mutual-tls |
API key + shared secret in .env, client certificates in certs/ (see certs/README.md) |
See .env.example for all required environment variables. For details on obtaining certificates, see the Visa Two-Way SSL documentation.
- VIC API Examples: See VIC API Examples
- MCP Examples: See MCP Examples
- API Client Package: See @visa/api-client README
- Main Project: See Root README