{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/collectly/json-schema/collectly-payment-method-store-with-collectly-id-schema.json",
  "title": "PaymentMethodStoreWithCollectlyId",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/collectly-payment-methods-store-with-collectly-id-api-openapi.yml#/components/schemas/PaymentMethodStoreWithCollectlyId",
  "properties": {
    "collectly_patient_id": {
      "description": "Collectly patient id.",
      "type": "string"
    },
    "data": {
      "$ref": "#/$defs/CardStore"
    },
    "type": {
      "description": "Same as Stripe card type",
      "type": "string"
    }
  },
  "required": [
    "collectly_patient_id",
    "type"
  ],
  "type": "object",
  "$defs": {
    "CardStore": {
      "properties": {
        "auto_charge_enabled": {
          "default": false,
          "type": "boolean"
        },
        "card_type": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "exp_month": {
          "format": "int32",
          "type": "integer"
        },
        "exp_year": {
          "format": "int32",
          "type": "integer"
        },
        "is_credit_card": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "last4": {
          "maxLength": 4,
          "minLength": 4,
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "user_token": {
          "type": "string"
        }
      },
      "required": [
        "card_type",
        "exp_month",
        "exp_year",
        "last4",
        "user_token"
      ],
      "type": "object"
    }
  }
}