{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://shopify.dev/ucp/shop-pay-handler/2026-01-23/schema.json",
  "title": "Shop Pay Handler Schema",
  "description": "Schema for the dev.shopify.shop_pay payment handler.",
  "name": "dev.shopify.shop_pay",
  "version": "2026-01-23",
  "$defs": {
    "shop_token": { "$ref": "https://shopify.dev/ucp/shop-pay-handler/2026-01-23/shop_token.json" },
    "shop_pay": { "$ref": "https://shopify.dev/ucp/shop-pay-handler/2026-01-23/shop_pay.json" },
    "dev.shopify.shop_pay": {
      "payment_instrument": {
        "title": "Shop Pay Payment Instrument",
        "description": "Payment instrument for the Shop Pay handler.",
        "$ref": "#/$defs/shop_pay"
      },
      "business_schema": {
        "title": "Shop Pay Handler (Business)",
        "description": "Business-level handler configuration for discovery.",
        "allOf": [
          { "$ref": "https://ucp.dev/2026-01-23/schemas/payment_handler.json#/$defs/business_schema" },
          {
            "type": "object",
            "properties": {
              "config": {
                "$ref": "https://shopify.dev/ucp/shop-pay-handler/2026-01-23/business_config.json"
              }
            }
          }
        ]
      },
      "platform_schema": {
        "title": "Shop Pay Handler (Platform)",
        "description": "Platform-level handler configuration for discovery.",
        "allOf": [
          { "$ref": "https://ucp.dev/2026-01-23/schemas/payment_handler.json#/$defs/platform_schema" },
          {
            "type": "object",
            "properties": {
              "config": {
                "$ref": "https://shopify.dev/ucp/shop-pay-handler/2026-01-23/platform_config.json"
              }
            }
          }
        ]
      },
      "response_schema": {
        "title": "Shop Pay Handler (Response)",
        "description": "Runtime handler configuration in checkout responses.",
        "allOf": [
          { "$ref": "https://ucp.dev/2026-01-23/schemas/payment_handler.json#/$defs/response_schema" },
          {
            "type": "object",
            "properties": {
              "config": {
                "$ref": "https://shopify.dev/ucp/shop-pay-handler/2026-01-23/business_config.json"
              }
            }
          }
        ]
      }
    }
  }
}
