{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Pay",
  "type": "object",
  "additionalProperties": false,
  "description": "Analytics-v4 .. Pay object to capture payment information",
  "properties": {
    "log_context": {
      "$ref": "/resources/schema/analytics/client/v4/LogContext.json",
      "description": "Required Log Context Reference"
    },
    "event_name": {
      "type": "string",
      "enum": [
        "PAY"
      ]
    },
    "schema_definition": {
      "type": "string",
      "enum": [
        "Pay"
      ]
    },
    "transaction_id": {
      "type": "string",
      "description": "The payment transaction id"
    },
    "commerce_id": {
      "type": "string",
      "description": "The commerce id for the order"
    },
    "pay_event_type": {
      "type": "string",
      "enum": [
        "USER_EVENT",
        "SYSTEM_EVENT"
      ],
      "description": "To identify if the event is triggered by the system or by a user interaction"
    },
    "event_descriptor": {
      "$ref": "/resources/schema/analytics/client/v4/type/EventDescriptorValues.json",
      "description": "The identify the trigger of user interaction"
    },
    "event_zone": {
      "$ref": "/resources/schema/analytics/client/v4/type/EventZoneValues.json",
      "description": "The identify the zone from which user interaction happened"
    },
    "user_interaction": {
      "$ref": "/resources/schema/analytics/client/v4/type/UserInteractionValues.json",
      "description": "The identify the user interaction type"
    },
    "event_module": {
      "$ref": "/resources/schema/analytics/client/v4/type/EventModuleValues.json",
      "description": "The identify the screen position where the event occured"
    },
    "event_position": {
      "type": "integer",
      "description": "The position of the user selection in a list. Default value is 0 for events where list is not relevant."
    },
    "event_label": {
      "type": "string",
      "description": "The label of the button or the icon interacted with"
    },
    "order_total": {
      "type": "number",
      "description": "The total amount including taxes paid by the user in specified currency"
    },
    "taxes": {
      "type": "number",
      "description": "The taxes paid in specified currency"
    },
    "currency": {
      "type": "string",
      "enum": [
        "USD",
        "EUR"
      ],
      "description": "To identify the currency of the payment"
    },
    "merchant_name": {
      "$ref": "/resources/schema/analytics/client/v4/type/OrderMerchantValues.json",
      "description": "To identify the merchant at which order is placed"
    },
    "product_category": {
      "$ref": "/resources/schema/analytics/client/v4/type/CategoryType.json",
      "description": "The category of the product ordered"
    },
    "payment_status": {
      "$ref": "/resources/schema/analytics/client/v4/type/PaymentStatusValues.json",
      "description": "To identify the payment status"
    },
    "payment_type": {
      "$ref": "/resources/schema/analytics/client/v4/type/PaymentTypeValues.json",
      "description": "To identify the payment type like CREDIT, DEBIT, CASH and others"
    },
    "card_type": {
      "$ref": "/resources/schema/analytics/client/v4/type/CardTypeValues.json",
      "description": "To identify the card type"
    },
    "payment_provider": {
      "$ref": "/resources/schema/analytics/client/v4/type/PaymentProviderValues.json",
      "description": "To identify of the payment provider"
    }
  },
  "required": [
    "log_context",
    "event_name",
    "schema_definition",
    "transaction_id",
    "commerce_id",
    "pay_event_type",
    "event_zone",
    "event_module",
    "event_label",
    "order_total",
    "currency",
    "payment_status"
  ]
}