{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "Links.json",
  "title": "Signed links",
  "description": "Public, signed URLs you can show to end customers.",
  "type": "object",
  "properties": {
    "pdfUrl": {
      "type": "string",
      "description": "Opens the PDF. No API key needed."
    },
    "payUrl": {
      "type": [
        "string",
        "null"
      ],
      "description": "Redirects to Paystack checkout. null when the invoice is paid or voided, and always on receipt links."
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time",
      "description": "When the links stop working. UTC, with Z."
    }
  },
  "required": [
    "pdfUrl",
    "payUrl",
    "expiresAt"
  ],
  "examples": [
    {
      "pdfUrl": "https://api.flux.example/public/invoices/NDIuNTAxMi5pcC4xNzk2MTE2NDAw.mJb2Kc0r1oB7yWq4sZ0eD9xVh3tLnA6uPfRkGiE8ScQ/pdf",
      "payUrl": "https://api.flux.example/public/invoices/NDIuNTAxMi5wYXkuMTc5NjExNjQwMA.Q2pXv8nTz1sLcR0aB4yHk7uWm3eJd6gFoNiV5qYtKxE/pay",
      "expiresAt": "2026-12-01T10:00:00.5236411Z"
    }
  ]
}
