{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://developer.nomba.com/schemas/nomba/checkout-order.json",
  "title": "Nomba Checkout Order",
  "description": "Schema representing a Nomba online checkout order for processing payments through multiple channels including Visa, Verve, Mastercard, USSD, bank transfers, and QR payments.",
  "type": "object",
  "required": ["amount", "currency", "orderReference"],
  "properties": {
    "amount": {
      "type": "number",
      "description": "The payment amount for the checkout order.",
      "minimum": 1
    },
    "currency": {
      "type": "string",
      "description": "The ISO 4217 currency code for the payment.",
      "enum": ["NGN"]
    },
    "orderReference": {
      "type": "string",
      "description": "A unique merchant-provided reference for the order.",
      "minLength": 1,
      "maxLength": 100
    },
    "customerEmail": {
      "type": "string",
      "format": "email",
      "description": "The email address of the customer making the payment."
    },
    "callbackUrl": {
      "type": "string",
      "format": "uri",
      "description": "The URL to redirect the customer to after payment completion."
    },
    "tokenizeCard": {
      "type": "boolean",
      "description": "Whether to tokenize the customer card for future payments.",
      "default": false
    },
    "checkoutLink": {
      "type": "string",
      "format": "uri",
      "description": "The generated checkout URL to load in a browser for the customer to complete payment."
    },
    "status": {
      "type": "string",
      "description": "The current status of the checkout order.",
      "enum": ["pending", "successful", "failed", "cancelled"]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time the order was created."
    }
  }
}