Required tools and accounts
VTEX account
You need a VTEX account with the appropriate permissions to develop and test payment connectors.Testing IO connectors: Your account must be explicitly allowed to test IO connectors. Contact VTEX support or use the “Allow Account to test” workflow in the
#provider-review Slack channel to request access.VTEX IO CLI
Install the VTEX IO command-line interface:Node.js and package manager
The framework requires:- Node.js: Version 12.x or higher
- Yarn or npm: For dependency management
TypeScript knowledge
The Payment Provider Framework is built with TypeScript. Familiarity with:- TypeScript syntax and type system
- Async/await patterns
- Object-oriented programming (classes and inheritance)
Git version control
Git is required for cloning the example repository and version control:Development environment setup
Create a development workspace
Required dependencies
Yournode/package.json must include these core dependencies:
node/package.json
Core packages
@vtex/payment-provider (required)
- Version:
^1.4.0or higher - Provides:
PaymentProviderclass, type definitions, helper functions, and protocol implementation - Listed in:
dependencies
@vtex/api (required)
- Version:
6.x - Provides: VTEX IO platform APIs, service framework, and VBase client
- Listed in:
devDependencies
Manifest configuration
Yourmanifest.json must include the required builders:
manifest.json
Builders
paymentProvider: 1.x - Automatically generates protocol routes (/manifest, /payment-methods) and exposes your connector to the VTEX Gateway.
node: 6.x - Runs your Node.js service with TypeScript support.
Required policies
Policies grant your app permissions to access VTEX platform services:| Policy | Purpose |
|---|---|
vbase-read-write | Read and write to VBase for persisting payment data |
colossus-fire-event | Emit events for monitoring and analytics |
colossus-write-logs | Write logs for debugging and audit trails |
outbound-access | Make HTTP requests to VTEX Payment Gateway for callbacks |
If your connector needs to call external payment gateway APIs, add additional
outbound-access policies with the gateway’s host.Payment gateway requirements
To integrate with an external payment gateway, you need:API credentials
Obtain API credentials from your payment gateway:- API keys or client ID
- Secret tokens or passwords
- OAuth client credentials (if using OAuth flow)
customFields in your paymentProvider/configuration.json.
API documentation
Familiarize yourself with your payment gateway’s API:- Authorization/payment creation endpoints
- Cancellation/void endpoints
- Capture/settlement endpoints
- Refund endpoints
- Webhook/callback mechanisms
PCI compliance (optional)
If your payment gateway is not PCI-certified:- Use VTEX Secure Proxy to route card data securely
- Your connector remains non-PCI compliant
- Card data is tokenized and encrypted
- Submit the gateway’s AOC (Attestation of Compliance) to VTEX
- Configure
usesSecureProxy: falsein your configuration - Handle raw card data directly
Testing requirements
Before deploying to production, ensure you have:Test environment
- Access to a VTEX test account
- A development workspace for isolated testing
- Test products configured in your store
Payment gateway sandbox
- Sandbox/test API credentials from your payment gateway
- Test card numbers provided by the gateway
- Understanding of the gateway’s test mode behavior
VTEX test suite
Your connector must pass the VTEX Payment Provider test suite. The test suite validates:- Protocol compliance
- Correct response formats
- Handling of different payment scenarios
- Async payment flows
Optional: Secure Proxy setup
If using Secure Proxy for PCI compliance:Configure usesSecureProxy
Set
usesSecureProxy: true in paymentProvider/configuration.json (this is the default)node/clients/gateway.ts
Secure Proxy only supports
application/json and application/x-www-form-urlencoded content types.Knowledge prerequisites
To successfully build a payment connector, you should understand:VTEX concepts
- VTEX IO: Platform for building and deploying VTEX apps
- Workspaces: Isolated development environments
- VBase: VTEX’s key-value database for state persistence
- Payment Gateway: VTEX’s payment orchestration system
Payment processing concepts
- Authorization: Reserving funds on a customer’s payment method
- Capture/Settlement: Actually charging the reserved funds
- Cancellation/Void: Releasing reserved funds before capture
- Refund: Returning captured funds to the customer
- Two-phase commit: Authorization → Capture workflow
- Payment splits: Dividing payment across multiple recipients
Protocol concepts
- Payment Provider Protocol: VTEX’s standardized interface for payment connectors
- Async payments: Payments that require callback/webhook confirmation
- Retry mechanism: Re-attempting requests for async payment resolution
- Idempotency: Handling duplicate requests safely
Common issues and solutions
TypeScript version conflicts
Problem: Type errors related to@vtex/api compatibility.
Solution:
Builder version mismatch
Problem: Manifest builder versions don’t match installed packages. Solution: Ensuremanifest.json builders match package versions:
paymentProvider: 1.x→@vtex/payment-provider: ^1.xnode: 6.x→@vtex/api: 6.x
Workspace linking errors
Problem: App fails to link in development workspace. Solution:Next steps
With your environment set up, you’re ready to build your first connector:Quick start guide
Build a working payment connector in under 10 minutes