{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-commerce-cloud/json-schema/salesforce-commerce-cloud-payment-configuration-schema.json",
  "title": "PaymentConfiguration",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-commerce-cloud-shopper-payments-api-openapi.yml#/components/schemas/PaymentConfiguration",
  "type": "object",
  "properties": {
    "zoneId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The unique identifier for a Payments zone.",
      "pattern": "^[a-zA-Z0-9\\-_]{1,100}$",
      "minLength": 1,
      "maxLength": 100
    },
    "paymentMethodSetAccounts": {
      "type": "array",
      "description": "List of payment method set accounts",
      "items": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "description": "Account identifier",
            "minLength": 1,
            "maxLength": 100
          },
          "config": {
            "type": "object",
            "description": "Account configuration",
            "properties": {
              "key": {
                "type": "string",
                "description": "API key for the payment processor",
                "maxLength": 200
              },
              "bnCode": {
                "type": "string",
                "description": "Account BN code (optional, null if not a PayPal account)",
                "maxLength": 100
              },
              "country": {
                "type": "string",
                "description": "The country associated with this payment account configuration",
                "maxLength": 256
              },
              "paymentMethods": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Available payment methods from gateway (optional, null if not an Adyen account)",
                "additionalProperties": true
              }
            },
            "additionalProperties": true
          },
          "live": {
            "type": "boolean",
            "description": "Whether the account is in live mode"
          },
          "vendor": {
            "type": "string",
            "description": "Payment vendor name"
          }
        },
        "required": [
          "accountId",
          "live",
          "vendor"
        ]
      }
    },
    "paymentMethods": {
      "type": "array",
      "description": "Configured payment methods",
      "items": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "description": "Associated account identifier",
            "minLength": 1
          },
          "paymentMethodType": {
            "type": "string",
            "description": "Type of payment method"
          },
          "paymentModes": {
            "type": "array",
            "description": "Supported payment modes",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "accountId",
          "paymentMethodType",
          "paymentModes"
        ]
      }
    }
  },
  "required": [
    "paymentMethodSetAccounts",
    "paymentMethods"
  ]
}