Overview
The protocol enables payment providers to integrate with VTEX without requiring deep knowledge of the platform’s internal architecture. By implementing the required endpoints, your connector can:- Process payment authorizations
- Handle settlements (captures)
- Process refunds
- Cancel transactions
- Receive inbound notifications
This feature is in BETA stage. For production use, ensure your rollout date is at least 3 months away to allow time for testing and issue resolution.
Protocol endpoints
The Payment Provider Protocol defines several required endpoints:Manifest endpoint
Provides metadata about your payment provider, including supported payment methods and configuration fields.This endpoint is automatically generated by the
paymentProvider builder based on your configuration.json file.Payment methods endpoint
Returns the list of payment methods your connector supports.Also automatically generated from
configuration.json.Authorization endpoint
Processes payment authorization requests.This is the core endpoint where payment processing logic is implemented.
Request and response flow
The protocol uses a request-response pattern where VTEX sends payment requests to your connector and expects structured responses.Authorization request example
Authorization response example
Payment status values
Your connector must return one of these status values:| Status | Description |
|---|---|
approved | Payment was approved immediately |
denied | Payment was rejected |
pending | Payment is being processed asynchronously |
undefined | Payment status cannot be determined |
Retry mechanism
Unlike traditional callbacks, VTEX IO connectors use a retry mechanism instead of callbacks. When your connector needs more time to process a payment, it:- Returns a
pendingstatus immediately - Calls the retry function with the final result when processing completes
- VTEX then calls your authorization endpoint again to get the updated status
Example from flow.ts
The retry flow ensures your connector responds consistently when VTEX requests the payment status again.
Secure proxy
For non-PCI-certified providers, VTEX offers a Secure Proxy to communicate with PCI-certified endpoints.Testing your connector
The protocol includes a test suite to validate your implementation. Your connector must:- Handle different card numbers that trigger specific flows
- Persist authorization responses to respond consistently on retry
- Implement all required endpoints correctly