{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/super-payments/main/json-schema/super-payments-proceed-payment-via-checkout-session-response-dto-schema.json",
  "title": "ProceedPaymentViaCheckoutSessionResponseDto",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/super-payments-checkout-sessions-api-openapi.yml#/components/schemas/ProceedPaymentViaCheckoutSessionResponseDto",
  "type": "object",
  "properties": {
    "checkoutSessionId": {
      "description": "The unique identifier for the checkout session",
      "type": "string",
      "format": "uuid"
    },
    "paymentIntentId": {
      "description": "The unique identifier for the payment intent",
      "type": "string",
      "format": "uuid"
    },
    "redirectUrl": {
      "description": "URL to redirect the user to the payment provider",
      "type": "string",
      "format": "uri"
    },
    "shippingAddress": {
      "description": "The shipping address",
      "allOf": [
        {
          "$ref": "#/$defs/CheckoutSessionAddressResponseDto"
        }
      ]
    },
    "billingAddress": {
      "description": "The billing address",
      "allOf": [
        {
          "$ref": "#/$defs/CheckoutSessionAddressResponseDto"
        }
      ]
    },
    "lineItems": {
      "description": "Line items provided",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/LineItemDto"
      }
    }
  },
  "required": [
    "checkoutSessionId",
    "paymentIntentId",
    "redirectUrl"
  ],
  "$defs": {
    "AirlineLineItemDto": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "AIRLINE"
        },
        "data": {
          "type": "object",
          "properties": {
            "flightNumber": {
              "description": "The flight identifier",
              "type": "string"
            },
            "flightDate": {
              "description": "Date and time of the flight in ISO 8601 format with timezone (e.g., 2026-03-15T10:30:00+00:00)",
              "type": "string",
              "format": "date-time"
            },
            "travellers": {
              "description": "List of travellers",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ]
              }
            },
            "totalPrice": {
              "description": "Total price in minor units (e.g., pence for GBP)",
              "type": "number",
              "minimum": 0
            },
            "currency": {
              "description": "Currency code",
              "type": "string",
              "const": "GBP"
            }
          }
        }
      },
      "required": [
        "type",
        "data"
      ]
    },
    "CarRentalLineItemDto": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "CAR_RENTAL"
        },
        "data": {
          "type": "object",
          "properties": {
            "travellers": {
              "description": "List of travellers",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ]
              }
            },
            "checkInDate": {
              "description": "Pickup date and time in ISO 8601 format with timezone (e.g., 2026-03-15T15:00:00+00:00)",
              "type": "string",
              "format": "date-time"
            },
            "checkOutDate": {
              "description": "Return date and time in ISO 8601 format with timezone (e.g., 2026-03-22T11:00:00+00:00)",
              "type": "string",
              "format": "date-time"
            },
            "totalPrice": {
              "description": "Total price in minor units (e.g., pence for GBP)",
              "type": "number",
              "minimum": 0
            },
            "currency": {
              "description": "Currency code",
              "type": "string",
              "const": "GBP"
            }
          }
        }
      },
      "required": [
        "type",
        "data"
      ]
    },
    "CheckoutSessionAddressResponseDto": {
      "description": "Address with all fields present but nullable",
      "type": "object",
      "properties": {
        "addressLine1": {
          "type": [
            "string",
            "null"
          ]
        },
        "addressLine2": {
          "type": [
            "string",
            "null"
          ]
        },
        "addressLine3": {
          "type": [
            "string",
            "null"
          ]
        },
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "type": [
            "string",
            "null"
          ]
        },
        "postCode": {
          "type": [
            "string",
            "null"
          ]
        },
        "firstName": {
          "type": [
            "string",
            "null"
          ]
        },
        "lastName": {
          "type": [
            "string",
            "null"
          ]
        },
        "phone": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": [
            "string",
            "null"
          ],
          "format": "email"
        }
      }
    },
    "LineItemDto": {
      "description": "A line item, one of: airline, car rental, lodging, or product",
      "oneOf": [
        {
          "$ref": "#/$defs/AirlineLineItemDto"
        },
        {
          "$ref": "#/$defs/CarRentalLineItemDto"
        },
        {
          "$ref": "#/$defs/LodgingLineItemDto"
        },
        {
          "$ref": "#/$defs/ProductLineItemDto"
        }
      ]
    },
    "LodgingLineItemDto": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "LODGING"
        },
        "data": {
          "type": "object",
          "properties": {
            "travellers": {
              "description": "List of travellers",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ]
              }
            },
            "checkInDate": {
              "description": "Check-in date and time in ISO 8601 format with timezone (e.g., 2026-03-15T15:00:00+00:00)",
              "type": "string",
              "format": "date-time"
            },
            "checkOutDate": {
              "description": "Check-out date and time in ISO 8601 format with timezone (e.g., 2026-03-22T11:00:00+00:00)",
              "type": "string",
              "format": "date-time"
            },
            "totalPrice": {
              "description": "Total price in minor units (e.g., pence for GBP)",
              "type": "number",
              "minimum": 0
            },
            "currency": {
              "description": "Currency code",
              "type": "string",
              "const": "GBP"
            }
          }
        }
      },
      "required": [
        "type",
        "data"
      ]
    },
    "ProductLineItemDto": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "PRODUCT"
        },
        "data": {
          "type": "object",
          "properties": {
            "productDescription": {
              "description": "Description of the product",
              "type": "string"
            },
            "sku": {
              "description": "Stock Keeping Unit (SKU) identifier for the product",
              "type": "string"
            },
            "quantity": {
              "description": "Quantity of the product",
              "type": "number",
              "minimum": 1
            },
            "unitPrice": {
              "description": "Unit price in minor units (e.g., pence for GBP)",
              "type": "number",
              "minimum": 0
            },
            "currency": {
              "description": "Currency code",
              "type": "string",
              "const": "GBP"
            },
            "expectedDeliveryDate": {
              "description": "When delivery is expected to take place (YYYY-MM-DD)",
              "type": [
                "string",
                "null"
              ]
            }
          }
        }
      },
      "required": [
        "type",
        "data"
      ]
    }
  }
}