{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "Payment.json",
  "title": "Payment attempt",
  "description": "An online payment attempt on an invoice.",
  "type": "object",
  "properties": {
    "reference": {
      "type": "string",
      "description": "The payment reference sent to Paystack."
    },
    "channel": {
      "type": "string",
      "description": "The payment channel, such as paystack."
    },
    "succeeded": {
      "type": "boolean",
      "description": "Whether Flux verified and accepted the payment."
    },
    "attemptedAt": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?$",
      "description": "When the attempt started. Server time, no offset."
    }
  },
  "required": [
    "reference",
    "channel",
    "succeeded",
    "attemptedAt"
  ]
}
