{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aisle-wedding/json-schema/aisle-wedding-checkout-schema.json",
  "title": "Checkout",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aisle-wedding-payments-api-openapi.yml#/components/schemas/Checkout",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "payment_id": {
      "type": "string",
      "pattern": "^pay_.+$"
    },
    "client_secret": {
      "type": [
        "string",
        "null"
      ],
      "description": "Pass it to Stripe Elements in the browser. Do not store it as ledger state."
    },
    "stripe_publishable_key": {
      "type": "string",
      "pattern": "^pk_",
      "description": "Aisle's Stripe publishable key, for loadStripe() in the browser. It is public, and it is the only key that confirms this client_secret."
    },
    "amount": {
      "type": "string",
      "pattern": "^\\d+(?:\\.\\d{2})$",
      "description": "A decimal currency amount serialized as a string."
    },
    "base_amount": {
      "type": "string",
      "pattern": "^\\d+(?:\\.\\d{2})$",
      "description": "A decimal currency amount serialized as a string."
    },
    "service_fee": {
      "type": "string",
      "pattern": "^\\d+(?:\\.\\d{2})$",
      "description": "A decimal currency amount serialized as a string."
    },
    "currency": {
      "type": "string"
    },
    "instalment": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "deposit",
            "balance"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "charge_total": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^\\d+(?:\\.\\d{2})$",
          "description": "A decimal currency amount serialized as a string."
        },
        {
          "type": "null"
        }
      ]
    },
    "share": {
      "type": "boolean"
    }
  },
  "required": [
    "payment_id",
    "client_secret",
    "stripe_publishable_key",
    "amount",
    "base_amount",
    "service_fee",
    "currency",
    "instalment",
    "charge_total",
    "share"
  ]
}