Overview
Builders transform your source code and configuration files into deployable VTEX IO applications. Each builder handles specific aspects of your connector: Location:manifest.json:7-11
The
docs builder is optional and used for including documentation in your app. Only paymentProvider and node are required for payment connectors.paymentProvider builder
ThepaymentProvider builder (version 1.x) is specialized for payment connector development.
What it does
The paymentProvider builder:Reads configuration
Parses your
paymentProvider/configuration.json file to understand supported payment methods and settings.Generates manifest endpoint
Automatically creates the
/manifest endpoint that returns your connector’s metadata to VTEX.Generates payment methods endpoint
Creates the
/payment-methods endpoint based on your configuration.Directory structure
The paymentProvider builder requires this folder structure:configuration.json structure
This file defines your payment connector’s capabilities. Location:paymentProvider/configuration.json
Payment methods configuration
Each payment method requires:| Field | Description | Values |
|---|---|---|
name | Payment method name | ”Visa”, “Mastercard”, “BankInvoice”, etc. |
allowsSplit | When split payments are processed | "onCapture" or "onAuthorize" |
- onCapture split
Custom fields configuration
Custom fields appear in the VTEX admin when merchants configure your connector.Text field
Password field
Select field
Additional configuration options
You can add advanced options toconfiguration.json:
- OAuth & authentication
- Security
- Features
implementsOAuth (default:
false)Set to true if your connector supports OAuth configuration flow.usesProviderHeadersName (default: true)true: Headers usex-provider-api-appKeyandx-provider-api-appTokenfalse: Headers usex-vtex-api-appKeyandx-vtex-api-appToken
Auto-generated routes
With the paymentProvider builder, you don’t need to implement these routes:GET /manifest- Returns connector metadataGET /payment-methods- Returns supported payment methods
configuration.json.
You can override these routes if needed, but it’s recommended to use the auto-generated versions.
node builder
Thenode builder (version 6.x) provides the runtime environment for your TypeScript/JavaScript code.
What it does
The node builder:- Compiles TypeScript: Converts your
.tsfiles to JavaScript - Bundles dependencies: Packages your
node_modulesfor deployment - Creates service: Sets up the Node.js service runtime
- Manages clients: Provides access to VTEX IO clients (VBase, HTTP, etc.)
- Handles scaling: Manages service replicas and resources
Required dependencies
Yournode/package.json must include:
PaymentProviderabstract classPaymentProviderServiceclass- Type definitions for requests and responses
- Helper methods for creating responses
- SecureExternalClient for secure proxy
- Core VTEX IO APIs
- Client classes (VBase, HTTP, etc.)
- Service infrastructure
- Type definitions
Service configuration
Optionally createnode/service.json to configure your service:
Policies
Both builders work with the policies system to grant your connector necessary permissions. Location:manifest.json:12-29
Essential policies
vbase-read-write
Allows your connector to read and write to VBase storage. Required for persisting authorization responses for the retry mechanism.
colossus-fire-event
Enables event firing for logging and monitoring. Useful for tracking payment flows and debugging.
colossus-write-logs
Permits writing application logs. Essential for troubleshooting production issues.
The paymentProvider builder automatically adds policies for Payment Gateway callbacks. You only need to add policies for calling external payment APIs.
Build and deployment process
When you runvtex link or vtex publish, the builders execute in this order:
paymentProvider builder runs
- Validates
configuration.json - Generates manifest and payment-methods routes
- Adds required policies
- Creates protocol route mappings
node builder runs
- Installs dependencies from
package.json - Compiles TypeScript to JavaScript
- Bundles code and dependencies
- Creates deployable service package
Best practices
- Use default routes: Avoid overriding routes unless absolutely necessary
- Minimal configuration: Only add configuration options you actually use
- Version carefully: Update builder versions cautiously; test thoroughly
- Document custom fields: Provide clear labels for merchant-facing configuration
- Request minimal policies: Only add outbound-access for domains you actually call
- Test configuration changes: Always test in a workspace before publishing
Common issues
Missing paymentProvider folder
Error: “Builder paymentProvider not found” Solution: EnsurepaymentProvider/configuration.json exists at the root level.
Invalid configuration.json
Error: Build fails during paymentProvider builder execution Solution: Validate your JSON syntax and ensure all required fields are present.Outbound access denied
Error: “Request forbidden to host” Solution: Add an outbound-access policy for the external domain inmanifest.json.
Route conflicts
Error: Routes not working as expected Solution: If overriding routes inservice.json, ensure you update serviceUrl in configuration.json.