{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ucp.dev/2026-01-11/schemas/shopping/types/payment_handler.json",
  "title": "Payment Handler",
  "type": "object",
  "required": [
    "id",
    "name",
    "version",
    "spec",
    "config_schema",
    "instrument_schemas",
    "config"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique identifier for this handler instance within the payment.handlers. Used by payment instruments to reference which handler produced them.",
      "ucp_request": "omit"
    },
    "name": {
      "type": "string",
      "description": "The specification name using reverse-DNS format. For example, dev.ucp.delegate_payment.",
      "ucp_request": "omit"
    },
    "version": {
      "$ref": "https://ucp.dev/2026-01-11/schemas/ucp.json#/$defs/version",
      "description": "Handler version in YYYY-MM-DD format.",
      "ucp_request": "omit"
    },
    "spec": {
      "type": "string",
      "description": "A URI pointing to the technical specification or schema that defines how this handler operates.",
      "format": "uri",
      "ucp_request": "omit"
    },
    "config_schema": {
      "type": "string",
      "description": "A URI pointing to a JSON Schema used to validate the structure of the config object.",
      "format": "uri",
      "ucp_request": "omit"
    },
    "instrument_schemas": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "A URI pointing to a schema definition (e.g., JSON Schema) used to validate the structure of the instrument object.",
        "format": "uri"
      },
      "ucp_request": "omit"
    },
    "config": {
      "type": "object",
      "description": "A dictionary containing provider-specific configuration details, such as merchant IDs, supported networks, or gateway credentials.",
      "additionalProperties": true,
      "ucp_request": "omit"
    }
  }
}