{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adadiamonds-com/json-schema/adadiamonds-com-checkout-link-schema.json",
  "title": "CheckoutLink",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adadiamonds-com-openapi.json#/components/schemas/CheckoutLink",
  "type": "object",
  "required": [
    "object",
    "id",
    "url",
    "simulated",
    "state",
    "totals"
  ],
  "properties": {
    "object": {
      "type": "string",
      "enum": [
        "checkout_link"
      ]
    },
    "id": {
      "type": "string",
      "description": "Session id, `link_<uuid>`."
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Stripe-hosted checkout URL; null while `state` is `needs_input`."
    },
    "simulated": {
      "type": "boolean",
      "description": "True in sandbox: nothing is payable."
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "state": {
      "type": "string",
      "enum": [
        "ready",
        "needs_input"
      ]
    },
    "currency": {
      "type": "string"
    },
    "totals": {
      "type": "object",
      "description": "All cents: items_base_amount, discount, subtotal, fulfillment, tax, total."
    },
    "line_items": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "messages": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "problems": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Blocking problems when `state` is `needs_input`."
    }
  }
}