{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "PaymentInitiated.json",
  "title": "payment.initiated object",
  "description": "A checkout started.",
  "type": "object",
  "properties": {
    "reference": {
      "type": "string",
      "description": "Payment reference."
    },
    "invoiceId": {
      "type": "integer",
      "format": "int32",
      "description": "The invoice."
    },
    "invoiceNumber": {
      "type": "string",
      "description": "The invoice number."
    },
    "channel": {
      "type": "string",
      "description": "Always paystack."
    },
    "gateway": {
      "type": "string",
      "enum": [
        "platform",
        "custom",
        "legacy"
      ],
      "description": "Payment mode: platform (Flux's Paystack account), custom (the organization's own) or legacy (the organization hasn't set up payments)."
    },
    "platformFeeMinor": {
      "type": "integer",
      "format": "int64",
      "description": "Flux's platform fee added to the amount the payer pays, in minor units (kobo or cents). 0 when there's none."
    }
  },
  "required": [
    "reference",
    "invoiceId",
    "invoiceNumber",
    "channel",
    "gateway",
    "platformFeeMinor"
  ],
  "examples": [
    {
      "reference": "T12-MAX-2026-0042-K3P9QZ_1",
      "invoiceId": 5012,
      "invoiceNumber": "MAX-2026-0042",
      "channel": "paystack",
      "gateway": "platform",
      "platformFeeMinor": 96000
    }
  ]
}
