{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://shopify.dev/ucp/shop-pay-handler/2026-04-08/shop_pay.json",
  "title": "Shop Pay Payment Instrument",
  "description": "Payment instrument structure for Shop Pay. Extends the base payment instrument with Shop Pay-specific credential types and wallet display metadata.",
  "allOf": [
    { "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/payment_instrument.json" }
  ],
  "properties": {
    "type": {
      "const": "shop_pay",
      "description": "The payment instrument type identifier for Shop Pay."
    },
    "credential": {
      "$ref": "shop_token.json"
    },
    "display": {
      "type": "object",
      "description": "Display metadata describing the wallet.",
      "properties": {
        "remaining_amount": {
          "type": "integer",
          "minimum": 0,
          "description": "The amount remaining on the wallet at discovery time, in the checkout's currency minor units."
        },
        "limit": {
          "type": "integer",
          "minimum": 0,
          "description": "The wallet's spending limit for the current period, in the checkout's currency minor units."
        },
        "renewal_type": {
          "type": "string",
          "enum": ["monthly"],
          "description": "How the wallet's spending limit renews. `monthly` means the limit resets each calendar month."
        },
        "renews_at": {
          "type": "string",
          "format": "date-time",
          "description": "The ISO 8601 timestamp at which the wallet's spending limit next renews."
        }
      }
    }
  }
}
