{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.fideliyapass.com/schemas/webhooks/2026-11/customer.created.json",
  "type": "object",
  "properties": {
    "customer_id": {
      "type": "string",
      "minLength": 1
    },
    "customer_pass_id": {
      "type": "string",
      "minLength": 1,
      "description": "The customer's card: one per customer per pass."
    },
    "pass_id": {
      "type": "string",
      "minLength": 1
    },
    "pass_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "full_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "email": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "phone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "platform": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "apple, google, or web."
    },
    "serial_number": {
      "type": "string"
    },
    "customer_deleted": {
      "description": "Present, and true, once the business deleted this customer: their name and contact details are removed from this event (null), and a resend carries none. Show \"Deleted customer\".",
      "type": "boolean",
      "const": true
    },
    "customer_deleted_at": {
      "description": "When the business deleted this customer. Present with the flag above.",
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    }
  },
  "required": [
    "customer_id",
    "customer_pass_id",
    "pass_id",
    "pass_name",
    "full_name",
    "email",
    "phone",
    "platform",
    "serial_number"
  ],
  "description": "A customer joined a card (added it to their wallet).",
  "examples": [
    {
      "customer_id": "c1f0e2d3-4b5a-4c6d-8e7f-9a0b1c2d3e4f",
      "customer_pass_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
      "pass_id": "7f1d5c1e-2b7a-4c1e-9d0e-0c6f3c2a9b10",
      "pass_name": "Café Lumière",
      "full_name": "Ana Ruiz",
      "email": "ana@example.com",
      "phone": null,
      "platform": "apple",
      "serial_number": "Zx81kq0LmP2a"
    }
  ]
}
