{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asap-cool/json-schema/asap-cool-payment-method-view-schema.json",
  "title": "PaymentMethodView",
  "description": "One row in `GET /v1/billing/payment-methods`.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asap-cool-billing-api-openapi.yml#/components/schemas/PaymentMethodView",
  "type": "object",
  "required": [
    "id",
    "last4",
    "brand",
    "exp_month",
    "exp_year",
    "is_default"
  ],
  "properties": {
    "brand": {
      "type": "string",
      "description": "Brand (`visa`, `mastercard`, …)."
    },
    "exp_month": {
      "type": "integer",
      "format": "int32",
      "description": "Expiration month (1–12).",
      "minimum": 0
    },
    "exp_year": {
      "type": "integer",
      "format": "int32",
      "description": "Expiration year (four digits).",
      "minimum": 0
    },
    "id": {
      "type": "string",
      "description": "Stripe `pm_…` identifier."
    },
    "is_default": {
      "type": "boolean",
      "description": "Whether this method is the customer's default for invoices."
    },
    "last4": {
      "type": "string",
      "description": "Last four digits."
    }
  }
}