Skip to main content
Your payment provider app requires two main configuration files: manifest.json for app metadata and paymentProvider/configuration.json for payment-specific settings.

configuration.json

Defines your payment provider’s capabilities, supported payment methods, and custom configuration fields displayed in the VTEX Admin. Location: paymentProvider/configuration.json

Schema

name
string
required
Display name for your payment provider shown in VTEX Admin
"name": "TestSuitApprover"
paymentMethods
array
required
List of supported payment methods
customFields
array
Custom configuration fields shown in VTEX Admin for merchant setup

Example

Here’s a complete configuration.json example from the payment provider example app:
{
  "name": "TestSuitApprover",
  "paymentMethods": [
    {
      "name": "Visa",
      "allowsSplit": "onCapture"
    },
    {
      "name": "American Express",
      "allowsSplit": "onCapture"
    },
    {
      "name": "Diners",
      "allowsSplit": "onCapture"
    },
    {
      "name": "Elo",
      "allowsSplit": "onCapture"
    },
    {
      "name": "Hipercard",
      "allowsSplit": "onCapture"
    },
    {
      "name": "Mastercard",
      "allowsSplit": "onCapture"
    },
    {
      "name": "BankInvoice",
      "allowsSplit": "onAuthorize"
    }
  ],
  "customFields": [
    {
      "name": "Client ID",
      "type": "text"
    },
    {
      "name": "Secret Token",
      "type": "password"
    },
    {
      "name": "Currency",
      "type": "select",
      "options": [
        {
          "text": "BRL",
          "value": "1"
        },
        {
          "text": "USD",
          "value": "2"
        }
      ]
    }
  ]
}

Accessing custom fields

Custom fields are accessible via merchantSettings in all request types:
public async authorize(
  authorization: AuthorizationRequest
): Promise<AuthorizationResponse> {
  // Access custom fields by name
  const clientId = authorization.merchantSettings['Client ID']
  const secretToken = authorization.merchantSettings['Secret Token']
  const currency = authorization.merchantSettings['Currency']
  
  // Use credentials to authenticate with your payment provider
  await this.provider.authenticate(clientId, secretToken)
}
Custom field names are case-sensitive. Access them exactly as defined in configuration.json.

manifest.json

Defines your VTEX IO app’s metadata, builders, policies, and billing configuration. Location: manifest.json

Schema

name
string
required
App name (lowercase, hyphen-separated)
"name": "payment-provider-example"
vendor
string
required
VTEX account or vendor name
"vendor": "vtex"
version
string
required
Semantic version (MAJOR.MINOR.PATCH)
"version": "1.2.0"
title
string
required
Human-readable app title
"title": "Payment Provider Example"
description
string
required
Brief description of the app’s purpose
"description": "Reference app for Payment-Provider protocol implementers"
builders
object
required
VTEX IO builders and their versions
"builders": {
  "paymentProvider": "1.x",
  "node": "6.x",
  "docs": "0.x"
}
policies
array
required
Access policies required by your app
billingOptions
object
required
Billing configuration for the app
"billingOptions": {
  "type": "free"
}
$schema
string
JSON schema URL for manifest validation
"$schema": "https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema"

Example

Here’s a complete manifest.json example:
{
  "name": "payment-provider-example",
  "vendor": "vtex",
  "version": "1.2.0",
  "title": "Payment Provider Example",
  "description": "Reference app for Payment-Provider protocol implementers",
  "builders": {
    "paymentProvider": "1.x",
    "node": "6.x",
    "docs": "0.x"
  },
  "policies": [
    {
      "name": "vbase-read-write"
    },
    {
      "name": "colossus-fire-event"
    },
    {
      "name": "colossus-write-logs"
    },
    {
      "name": "outbound-access",
      "attrs": {
        "host": "heimdall.vtexpayments.com.br",
        "path": "/api/payment-provider/callback/*"
      }
    }
  ],
  "billingOptions": {
    "type": "free"
  },
  "$schema": "https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema"
}

Adding external API access

To call your payment provider’s API, add outbound-access policies:
{
  "name": "outbound-access",
  "attrs": {
    "host": "api.your-payment-provider.com",
    "path": "*"
  }
}
You need separate outbound-access policies for each external host. The callback endpoint to heimdall.vtexpayments.com.br is required for all payment providers.

Environment variables

While not strictly configuration files, you can use environment variables for sensitive data that shouldn’t be in configuration.json.

Setting variables

Use VTEX CLI to set environment variables:
vtex settings set vtex.payment-provider-example apiEndpoint "https://api.provider.com"

Accessing variables

const settings = await this.context.clients.apps.getAppSettings(
  '[email protected]'
)

const apiEndpoint = settings.apiEndpoint
Environment variables are account-specific, while customFields in configuration.json are per-merchant-affiliation.

Build docs developers (and LLMs) love