> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gr4vy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create checkout session

> Create a new checkout session.

This endpoint requires the `checkout-sessions.write` scope.


## OpenAPI

````yaml /openapi.speakeasy.json POST /checkout/sessions
openapi: 3.1.0
info:
  title: Gr4vy
  description: The Gr4vy API.
  version: 1.0.0
servers:
  - url: https://api.sandbox.{id}.gr4vy.app
    x-speakeasy-server-id: sandbox
    variables:
      id:
        default: example
        description: The subdomain for your Gr4vy instance.
  - url: https://api.{id}.gr4vy.app
    x-speakeasy-server-id: production
    variables:
      id:
        default: example
        description: The subdomain for your Gr4vy instance.
security:
  - bearerAuth: []
tags:
  - name: 3DS scenarios
    description: Manage and create 3DS scenarios in sandbox.
  - name: Account updater
    description: Schedule stored cards for an account update.
  - name: Audit logs
    description: Query user activity.
  - name: Buyers
    description: Manage buyers.
  - name: Buyers - Gift cards
    description: Query gift cards for buyers.
  - name: Buyers - Payment methods
    description: Query payment methods for buyers.
  - name: Buyers - Shipping details
    description: Manage shipping details for buyers.
  - name: Card details
    description: Returns information about a card.
  - name: Card scheme definitions
    description: List definitions for card schemes.
  - name: Checkout sessions
    description: Manage checkout sessions.
  - name: Digital wallets - Sessions
    description: Create sessions for digital wallets like Apple Pay and Google Pay.
  - name: Digital wallets - Setup
    description: Manage digital wallets like Apple Pay and Google Pay.
  - name: Gift cards
    description: Manage stored gift cards.
  - name: Insights
    description: Retrieve Insights data.
  - name: Insights - Presets
    description: Manage presets for Insights.
  - name: Merchant accounts
    description: Manage merchant accounts in an instance.
  - name: Merchant accounts - 3DS configuration
    description: Manage 3DS profiles for merchant accounts.
  - name: Monitoring
    description: Manage monitoring and alerting.
  - name: Payment links
    description: Manage payment links.
  - name: Payment methods
    description: Manage stored payment methods.
  - name: Payment methods - Definitions
    description: Manage payment method definitions.
  - name: Payment methods - Network tokens
    description: Manage network tokens for stored payment methods.
  - name: Payment methods - Payment service tokens
    description: Manage payment service tokens for stored payment methods.
  - name: Payment options
    description: Fetch a list of payment options to display at checkout.
  - name: Payment service definitions
    description: Fetch info about the definition of each payment service.
  - name: Payment services
    description: Manage configured payment services.
  - name: Payouts
    description: Payout API.
  - name: Refunds
    description: Manage transaction refunds.
  - name: Reports
    description: Manage one-off and scheduled reports.
  - name: Reports - Executions
    description: Manage executions of reports.
  - name: Transactions
    description: Manage transaction.
  - name: Transactions - Actions
    description: Read Flow actions triggered for a transaction.
  - name: Transactions - Chargebacks
    description: Read transaction chargeback data.
  - name: Transactions - Chargeback reversals
    description: Read transaction chargeback reversal data.
  - name: Transactions - Settlements
    description: Read transaction settlement data.
  - name: Transactions - Sessions
    description: Manage transaction session data.
  - name: Webhook subscriptions
    description: Manage webhook subscriptions.
paths:
  /checkout/sessions:
    post:
      tags:
        - Checkout sessions
      summary: Create checkout session
      description: Create a new checkout session.
      operationId: create_checkout_session
      parameters:
        - name: x-gr4vy-merchant-account-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: The ID of the merchant account to use for this request.
            examples:
              - default
            title: X-Gr4Vy-Merchant-Account-Id
          description: The ID of the merchant account to use for this request.
          x-speakeasy-name-override: merchantAccountId
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckoutSessionCreate'
              anyOf:
                - $ref: '#/components/schemas/CheckoutSessionCreate'
                - type: array
                  items:
                    $ref: '#/components/schemas/GenericModel'
                - type: 'null'
              title: Body
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutSession'
        '400':
          description: The request was invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: The request was unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '403':
          description: >-
            The credentials were invalid or the caller did not have permission
            to act on the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '404':
          description: The resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '405':
          description: The request method was not allowed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error405'
        '409':
          description: A duplicate record was found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '425':
          description: The request was too early.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error425'
        '429':
          description: Too many requests were made.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error429'
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
        '502':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error502'
        '504':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error504'
      x-codeSamples:
        - lang: javascript
          label: TypeScript
          source: |-
            import { Gr4vy, withToken } from "@gr4vy/sdk";
            import fs from "fs";

            const gr4vy = new Gr4vy({
                id: "example",
                server: "sandbox",
                merchantAccountId: "default",
                bearerAuth: withToken({
                  privateKey: fs.readFileSync("private_key.pem", "utf8"),
                }),
            });

            async function run() {
              const result = await gr4vy.checkoutSessions.create();

              console.log(result);
            }

            run();
        - lang: python
          label: Python
          source: |-
            from datetime import date
            from gr4vy import Gr4vy, models
            from gr4vy.utils import parse_datetime
            import os


            with Gr4vy(
                id="example",
                server="sandbox",
                merchant_account_id="default",
                bearer_auth=auth.with_token(open("./private_key.pem").read())
            ) as g_client:

                res = g_client.checkout_sessions.create(checkout_session_create=models.CheckoutSessionCreate(
                    cart_items=[
                        models.CartItem(
                            name="GoPro HD",
                            quantity=2,
                            unit_amount=1299,
                            discount_amount=0,
                            tax_amount=0,
                            external_identifier="goprohd",
                            sku="GPHD1078",
                            product_url="https://example.com/catalog/go-pro-hd",
                            image_url="https://example.com/images/go-pro-hd.jpg",
                            categories=[
                                "camera",
                                "travel",
                                "gear",
                            ],
                            product_type="physical",
                            seller_country="GB",
                        ),
                        models.CartItem(
                            name="GoPro HD",
                            quantity=2,
                            unit_amount=1299,
                            discount_amount=0,
                            tax_amount=0,
                            external_identifier="goprohd",
                            sku="GPHD1078",
                            product_url="https://example.com/catalog/go-pro-hd",
                            image_url="https://example.com/images/go-pro-hd.jpg",
                            categories=[
                                "camera",
                                "travel",
                                "gear",
                            ],
                            product_type="physical",
                            seller_country="GB",
                        ),
                        models.CartItem(
                            name="GoPro HD",
                            quantity=2,
                            unit_amount=1299,
                            discount_amount=0,
                            tax_amount=0,
                            external_identifier="goprohd",
                            sku="GPHD1078",
                            product_url="https://example.com/catalog/go-pro-hd",
                            image_url="https://example.com/images/go-pro-hd.jpg",
                            categories=[
                                "camera",
                                "travel",
                                "gear",
                            ],
                            product_type="physical",
                            seller_country="GB",
                        ),
                    ],
                    metadata={
                        "cohort": "cohort-a",
                        "order_id": "order-12345",
                    },
                    buyer=models.GuestBuyer(
                        display_name="John Doe",
                        external_identifier="buyer-12345",
                        billing_details=models.BillingDetails(
                            first_name="John",
                            last_name="Doe",
                            email_address="john@example.com",
                            phone_number="+1234567890",
                            address=models.Address(
                                city="San Jose",
                                country="US",
                                postal_code="94560",
                                state="California",
                                state_code="US-CA",
                                house_number_or_name="10",
                                line1="Stafford Appartments",
                                line2="29th Street",
                                organization="Gr4vy",
                            ),
                            tax_id=models.TaxID(
                                value="12345678931",
                                kind="ar.cuit",
                            ),
                        ),
                        shipping_details=models.ShippingDetailsCreate(
                            first_name="John",
                            last_name="Doe",
                            email_address="john@example.com",
                            phone_number="+1234567890",
                            address=models.Address(
                                city="San Jose",
                                country="US",
                                postal_code="94560",
                                state="California",
                                state_code="US-CA",
                                house_number_or_name="10",
                                line1="Stafford Appartments",
                                line2="29th Street",
                                organization="Gr4vy",
                            ),
                        ),
                    ),
                    airline=models.Airline(
                        booking_code="X36Q9C",
                        is_cardholder_traveling=True,
                        issued_address="123 Broadway, New York",
                        issued_at=parse_datetime("2013-07-16T19:23:00.000+00:00"),
                        issuing_carrier_code="649",
                        issuing_carrier_name="Air Transat A.T. Inc",
                        issuing_iata_designator="TS",
                        issuing_icao_code="TSC",
                        legs=[
                            models.AirlineLeg(
                                arrival_airport="LAX",
                                arrival_at=parse_datetime("2013-07-16T19:23:00.000+00:00"),
                                arrival_city="Los Angeles",
                                arrival_country="US",
                                carrier_code="649",
                                carrier_name="Air Transat A.T. Inc",
                                iata_designator="TS",
                                icao_code="TSC",
                                coupon_number="15885566",
                                departure_airport="LHR",
                                departure_at=parse_datetime("2013-07-16T19:23:00.000+00:00"),
                                departure_city="London",
                                departure_country="GB",
                                departure_tax_amount=1200,
                                fare_amount=129900,
                                fare_basis_code="FY",
                                fee_amount=1200,
                                flight_class="E",
                                flight_number="101",
                                route_type="round_trip",
                                seat_class="F",
                                stop_over=False,
                                tax_amount=1200,
                            ),
                            models.AirlineLeg(
                                arrival_airport="LAX",
                                arrival_at=parse_datetime("2013-07-16T19:23:00.000+00:00"),
                                arrival_city="Los Angeles",
                                arrival_country="US",
                                carrier_code="649",
                                carrier_name="Air Transat A.T. Inc",
                                iata_designator="TS",
                                icao_code="TSC",
                                coupon_number="15885566",
                                departure_airport="LHR",
                                departure_at=parse_datetime("2013-07-16T19:23:00.000+00:00"),
                                departure_city="London",
                                departure_country="GB",
                                departure_tax_amount=1200,
                                fare_amount=129900,
                                fare_basis_code="FY",
                                fee_amount=1200,
                                flight_class="E",
                                flight_number="101",
                                route_type="round_trip",
                                seat_class="F",
                                stop_over=False,
                                tax_amount=1200,
                            ),
                            models.AirlineLeg(
                                arrival_airport="LAX",
                                arrival_at=parse_datetime("2013-07-16T19:23:00.000+00:00"),
                                arrival_city="Los Angeles",
                                arrival_country="US",
                                carrier_code="649",
                                carrier_name="Air Transat A.T. Inc",
                                iata_designator="TS",
                                icao_code="TSC",
                                coupon_number="15885566",
                                departure_airport="LHR",
                                departure_at=parse_datetime("2013-07-16T19:23:00.000+00:00"),
                                departure_city="London",
                                departure_country="GB",
                                departure_tax_amount=1200,
                                fare_amount=129900,
                                fare_basis_code="FY",
                                fee_amount=1200,
                                flight_class="E",
                                flight_number="101",
                                route_type="round_trip",
                                seat_class="F",
                                stop_over=False,
                                tax_amount=1200,
                            ),
                        ],
                        passenger_name_record="JOHN L",
                        passengers=[
                            models.AirlinePassenger(
                                age_group="adult",
                                date_of_birth=date.fromisoformat("2013-07-16"),
                                email_address="john@example.com",
                                first_name="John",
                                frequent_flyer_number="15885566",
                                last_name="Luhn",
                                passport_number="11117700225",
                                phone_number="+1234567890",
                                ticket_number="BA1236699999",
                                title="Mr.",
                                country_code="US",
                            ),
                            models.AirlinePassenger(
                                age_group="adult",
                                date_of_birth=date.fromisoformat("2013-07-16"),
                                email_address="john@example.com",
                                first_name="John",
                                frequent_flyer_number="15885566",
                                last_name="Luhn",
                                passport_number="11117700225",
                                phone_number="+1234567890",
                                ticket_number="BA1236699999",
                                title="Mr.",
                                country_code="US",
                            ),
                        ],
                        reservation_system="Amadeus",
                        restricted_ticket=False,
                        ticket_delivery_method="electronic",
                        ticket_number="123-1234-151555",
                        travel_agency_code="12345",
                        travel_agency_invoice_number="EG15555155",
                        travel_agency_name="ACME Agency",
                        travel_agency_plan_name="B733",
                    ),
                ))

                # Handle response
                print(res)
        - lang: go
          label: Go
          source: "package main\n\nimport(\n\t\"context\"\n\t\"os\"\n\tgr4vygo \"github.com/gr4vy/gr4vy-go\"\n\t\"github.com/gr4vy/gr4vy-go/models/components\"\n\t\"github.com/gr4vy/gr4vy-go/types\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := gr4vygo.New(\n        gr4vygo.WithMerchantAccountID(\"default\"),\n        gr4vygo.WithSecurity(os.Getenv(\"GR4VY_BEARER_AUTH\")),\n    )\n\n    res, err := s.CheckoutSessions.Create(ctx, &components.CheckoutSessionCreate{\n        CartItems: []components.CartItem{\n            components.CartItem{\n                Name: \"GoPro HD\",\n                Quantity: 2,\n                UnitAmount: 1299,\n                DiscountAmount: gr4vygo.Pointer[int64](0),\n                TaxAmount: gr4vygo.Pointer[int64](0),\n                ExternalIdentifier: gr4vygo.Pointer(\"goprohd\"),\n                Sku: gr4vygo.Pointer(\"GPHD1078\"),\n                ProductURL: gr4vygo.Pointer(\"https://example.com/catalog/go-pro-hd\"),\n                ImageURL: gr4vygo.Pointer(\"https://example.com/images/go-pro-hd.jpg\"),\n                Categories: []string{\n                    \"camera\",\n                    \"travel\",\n                    \"gear\",\n                },\n                ProductType: components.ProductTypePhysical.ToPointer(),\n                SellerCountry: gr4vygo.Pointer(\"US\"),\n            },\n            components.CartItem{\n                Name: \"GoPro HD\",\n                Quantity: 2,\n                UnitAmount: 1299,\n                DiscountAmount: gr4vygo.Pointer[int64](0),\n                TaxAmount: gr4vygo.Pointer[int64](0),\n                ExternalIdentifier: gr4vygo.Pointer(\"goprohd\"),\n                Sku: gr4vygo.Pointer(\"GPHD1078\"),\n                ProductURL: gr4vygo.Pointer(\"https://example.com/catalog/go-pro-hd\"),\n                ImageURL: gr4vygo.Pointer(\"https://example.com/images/go-pro-hd.jpg\"),\n                Categories: []string{\n                    \"camera\",\n                    \"travel\",\n                    \"gear\",\n                },\n                ProductType: components.ProductTypePhysical.ToPointer(),\n                SellerCountry: gr4vygo.Pointer(\"US\"),\n            },\n        },\n        Metadata: map[string]string{\n            \"cohort\": \"cohort-a\",\n            \"order_id\": \"order-12345\",\n        },\n        Buyer: nil,\n        Airline: &components.Airline{\n            BookingCode: gr4vygo.Pointer(\"X36Q9C\"),\n            IsCardholderTraveling: gr4vygo.Pointer(true),\n            IssuedAddress: gr4vygo.Pointer(\"123 Broadway, New York\"),\n            IssuedAt: types.MustNewTimeFromString(\"2013-07-16T19:23:00.000+00:00\"),\n            IssuingCarrierCode: gr4vygo.Pointer(\"649\"),\n            IssuingCarrierName: gr4vygo.Pointer(\"Air Transat A.T. Inc\"),\n            IssuingIataDesignator: gr4vygo.Pointer(\"TS\"),\n            IssuingIcaoCode: gr4vygo.Pointer(\"TSC\"),\n            Legs: []components.AirlineLeg{\n                components.AirlineLeg{\n                    ArrivalAirport: gr4vygo.Pointer(\"LAX\"),\n                    ArrivalAt: types.MustNewTimeFromString(\"2013-07-16T19:23:00.000+00:00\"),\n                    ArrivalCity: gr4vygo.Pointer(\"Los Angeles\"),\n                    ArrivalCountry: gr4vygo.Pointer(\"US\"),\n                    CarrierCode: gr4vygo.Pointer(\"649\"),\n                    CarrierName: gr4vygo.Pointer(\"Air Transat A.T. Inc\"),\n                    IataDesignator: gr4vygo.Pointer(\"TS\"),\n                    IcaoCode: gr4vygo.Pointer(\"TSC\"),\n                    CouponNumber: gr4vygo.Pointer(\"15885566\"),\n                    DepartureAirport: gr4vygo.Pointer(\"LHR\"),\n                    DepartureAt: types.MustNewTimeFromString(\"2013-07-16T19:23:00.000+00:00\"),\n                    DepartureCity: gr4vygo.Pointer(\"London\"),\n                    DepartureCountry: gr4vygo.Pointer(\"GB\"),\n                    DepartureTaxAmount: gr4vygo.Pointer[int64](1200),\n                    FareAmount: gr4vygo.Pointer[int64](129900),\n                    FareBasisCode: gr4vygo.Pointer(\"FY\"),\n                    FeeAmount: gr4vygo.Pointer[int64](1200),\n                    FlightClass: gr4vygo.Pointer(\"E\"),\n                    FlightNumber: gr4vygo.Pointer(\"101\"),\n                    RouteType: components.RouteTypeRoundTrip.ToPointer(),\n                    SeatClass: gr4vygo.Pointer(\"F\"),\n                    StopOver: gr4vygo.Pointer(false),\n                    TaxAmount: gr4vygo.Pointer[int64](1200),\n                },\n            },\n            PassengerNameRecord: gr4vygo.Pointer(\"JOHN L\"),\n            Passengers: []components.AirlinePassenger{\n                components.AirlinePassenger{\n                    AgeGroup: components.AgeGroupAdult.ToPointer(),\n                    DateOfBirth: types.MustNewDateFromString(\"2013-07-16\"),\n                    EmailAddress: gr4vygo.Pointer(\"john@example.com\"),\n                    FirstName: gr4vygo.Pointer(\"John\"),\n                    FrequentFlyerNumber: gr4vygo.Pointer(\"15885566\"),\n                    LastName: gr4vygo.Pointer(\"Luhn\"),\n                    PassportNumber: gr4vygo.Pointer(\"11117700225\"),\n                    PhoneNumber: gr4vygo.Pointer(\"+1234567890\"),\n                    TicketNumber: gr4vygo.Pointer(\"BA1236699999\"),\n                    Title: gr4vygo.Pointer(\"Mr.\"),\n                    CountryCode: gr4vygo.Pointer(\"US\"),\n                },\n                components.AirlinePassenger{\n                    AgeGroup: components.AgeGroupAdult.ToPointer(),\n                    DateOfBirth: types.MustNewDateFromString(\"2013-07-16\"),\n                    EmailAddress: gr4vygo.Pointer(\"john@example.com\"),\n                    FirstName: gr4vygo.Pointer(\"John\"),\n                    FrequentFlyerNumber: gr4vygo.Pointer(\"15885566\"),\n                    LastName: gr4vygo.Pointer(\"Luhn\"),\n                    PassportNumber: gr4vygo.Pointer(\"11117700225\"),\n                    PhoneNumber: gr4vygo.Pointer(\"+1234567890\"),\n                    TicketNumber: gr4vygo.Pointer(\"BA1236699999\"),\n                    Title: gr4vygo.Pointer(\"Mr.\"),\n                    CountryCode: gr4vygo.Pointer(\"US\"),\n                },\n            },\n            ReservationSystem: gr4vygo.Pointer(\"Amadeus\"),\n            RestrictedTicket: gr4vygo.Pointer(false),\n            TicketDeliveryMethod: components.TicketDeliveryMethodElectronic.ToPointer(),\n            TicketNumber: gr4vygo.Pointer(\"123-1234-151555\"),\n            TravelAgencyCode: gr4vygo.Pointer(\"12345\"),\n            TravelAgencyInvoiceNumber: gr4vygo.Pointer(\"EG15555155\"),\n            TravelAgencyName: gr4vygo.Pointer(\"ACME Agency\"),\n            TravelAgencyPlanName: gr4vygo.Pointer(\"B733\"),\n        },\n    })\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res != nil {\n        // handle response\n    }\n}"
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Brick\DateTime\LocalDate;
            use Gr4vy;
            use Gr4vy\Utils;

            $sdk = Gr4vy\SDK::builder()
                ->setId('example')
                ->setServer('sandbox')
                ->setSecuritySource(Auth::withToken($privateKey))
                ->setMerchantAccountId('default')
                ->build();

            $checkoutSessionCreate = new Gr4vy\CheckoutSessionCreate(
                cartItems: [
                    new Gr4vy\CartItem(
                        name: 'GoPro HD',
                        quantity: 2,
                        unitAmount: 1299,
                        discountAmount: 0,
                        taxAmount: 0,
                        externalIdentifier: 'goprohd',
                        sku: 'GPHD1078',
                        productUrl: 'https://example.com/catalog/go-pro-hd',
                        imageUrl: 'https://example.com/images/go-pro-hd.jpg',
                        categories: [
                            'camera',
                            'travel',
                            'gear',
                        ],
                        productType: 'physical',
                        sellerCountry: 'US',
                    ),
                    new Gr4vy\CartItem(
                        name: 'GoPro HD',
                        quantity: 2,
                        unitAmount: 1299,
                        discountAmount: 0,
                        taxAmount: 0,
                        externalIdentifier: 'goprohd',
                        sku: 'GPHD1078',
                        productUrl: 'https://example.com/catalog/go-pro-hd',
                        imageUrl: 'https://example.com/images/go-pro-hd.jpg',
                        categories: [
                            'camera',
                            'travel',
                            'gear',
                        ],
                        productType: 'physical',
                        sellerCountry: 'US',
                    ),
                ],
                metadata: [
                    'cohort' => 'cohort-a',
                    'order_id' => 'order-12345',
                ],
                buyer: new Gr4vy\GuestBuyer(
                    displayName: 'John Doe',
                    externalIdentifier: 'buyer-12345',
                    billingDetails: new Gr4vy\BillingDetails(
                        firstName: 'John',
                        lastName: 'Doe',
                        emailAddress: 'john@example.com',
                        phoneNumber: '+1234567890',
                        address: new Gr4vy\Address(
                            city: 'San Jose',
                            country: 'US',
                            postalCode: '94560',
                            state: 'California',
                            stateCode: 'US-CA',
                            houseNumberOrName: '10',
                            line1: 'Stafford Appartments',
                            line2: '29th Street',
                            organization: 'Gr4vy',
                        ),
                        taxId: new Gr4vy\TaxId(
                            value: '12345678931',
                            kind: 'my.frp',
                        ),
                    ),
                    shippingDetails: new Gr4vy\ShippingDetailsCreate(
                        firstName: 'John',
                        lastName: 'Doe',
                        emailAddress: 'john@example.com',
                        phoneNumber: '+1234567890',
                        address: null,
                    ),
                ),
                airline: new Gr4vy\Airline(
                    bookingCode: 'X36Q9C',
                    isCardholderTraveling: true,
                    issuedAddress: '123 Broadway, New York',
                    issuedAt: Utils\Utils::parseDateTime('2013-07-16T19:23:00.000+00:00'),
                    issuingCarrierCode: '649',
                    issuingCarrierName: 'Air Transat A.T. Inc',
                    issuingIataDesignator: 'TS',
                    issuingIcaoCode: 'TSC',
                    legs: [
                        new Gr4vy\AirlineLeg(
                            arrivalAirport: 'LAX',
                            arrivalAt: Utils\Utils::parseDateTime('2013-07-16T19:23:00.000+00:00'),
                            arrivalCity: 'Los Angeles',
                            arrivalCountry: 'US',
                            carrierCode: '649',
                            carrierName: 'Air Transat A.T. Inc',
                            iataDesignator: 'TS',
                            icaoCode: 'TSC',
                            couponNumber: '15885566',
                            departureAirport: 'LHR',
                            departureAt: Utils\Utils::parseDateTime('2013-07-16T19:23:00.000+00:00'),
                            departureCity: 'London',
                            departureCountry: 'GB',
                            departureTaxAmount: 1200,
                            fareAmount: 129900,
                            fareBasisCode: 'FY',
                            feeAmount: 1200,
                            flightClass: 'E',
                            flightNumber: '101',
                            routeType: 'round_trip',
                            seatClass: 'F',
                            stopOver: false,
                            taxAmount: 1200,
                        ),
                        new Gr4vy\AirlineLeg(
                            arrivalAirport: 'LAX',
                            arrivalAt: Utils\Utils::parseDateTime('2013-07-16T19:23:00.000+00:00'),
                            arrivalCity: 'Los Angeles',
                            arrivalCountry: 'US',
                            carrierCode: '649',
                            carrierName: 'Air Transat A.T. Inc',
                            iataDesignator: 'TS',
                            icaoCode: 'TSC',
                            couponNumber: '15885566',
                            departureAirport: 'LHR',
                            departureAt: Utils\Utils::parseDateTime('2013-07-16T19:23:00.000+00:00'),
                            departureCity: 'London',
                            departureCountry: 'GB',
                            departureTaxAmount: 1200,
                            fareAmount: 129900,
                            fareBasisCode: 'FY',
                            feeAmount: 1200,
                            flightClass: 'E',
                            flightNumber: '101',
                            routeType: 'round_trip',
                            seatClass: 'F',
                            stopOver: false,
                            taxAmount: 1200,
                        ),
                        new Gr4vy\AirlineLeg(
                            arrivalAirport: 'LAX',
                            arrivalAt: Utils\Utils::parseDateTime('2013-07-16T19:23:00.000+00:00'),
                            arrivalCity: 'Los Angeles',
                            arrivalCountry: 'US',
                            carrierCode: '649',
                            carrierName: 'Air Transat A.T. Inc',
                            iataDesignator: 'TS',
                            icaoCode: 'TSC',
                            couponNumber: '15885566',
                            departureAirport: 'LHR',
                            departureAt: Utils\Utils::parseDateTime('2013-07-16T19:23:00.000+00:00'),
                            departureCity: 'London',
                            departureCountry: 'GB',
                            departureTaxAmount: 1200,
                            fareAmount: 129900,
                            fareBasisCode: 'FY',
                            feeAmount: 1200,
                            flightClass: 'E',
                            flightNumber: '101',
                            routeType: 'round_trip',
                            seatClass: 'F',
                            stopOver: false,
                            taxAmount: 1200,
                        ),
                    ],
                    passengerNameRecord: 'JOHN L',
                    passengers: [
                        new Gr4vy\AirlinePassenger(
                            ageGroup: 'adult',
                            dateOfBirth: LocalDate::parse('2013-07-16'),
                            emailAddress: 'john@example.com',
                            firstName: 'John',
                            frequentFlyerNumber: '15885566',
                            lastName: 'Luhn',
                            passportNumber: '11117700225',
                            phoneNumber: '+1234567890',
                            ticketNumber: 'BA1236699999',
                            title: 'Mr.',
                            countryCode: 'US',
                        ),
                        new Gr4vy\AirlinePassenger(
                            ageGroup: 'adult',
                            dateOfBirth: LocalDate::parse('2013-07-16'),
                            emailAddress: 'john@example.com',
                            firstName: 'John',
                            frequentFlyerNumber: '15885566',
                            lastName: 'Luhn',
                            passportNumber: '11117700225',
                            phoneNumber: '+1234567890',
                            ticketNumber: 'BA1236699999',
                            title: 'Mr.',
                            countryCode: 'US',
                        ),
                    ],
                    reservationSystem: 'Amadeus',
                    restrictedTicket: false,
                    ticketDeliveryMethod: 'electronic',
                    ticketNumber: '123-1234-151555',
                    travelAgencyCode: '12345',
                    travelAgencyInvoiceNumber: 'EG15555155',
                    travelAgencyName: 'ACME Agency',
                    travelAgencyPlanName: 'B733',
                ),
            );

            $response = $sdk->checkoutSessions->create(
                checkoutSessionCreate: $checkoutSessionCreate
            );

            if ($response->checkoutSession !== null) {
                // handle response
            }
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.gr4vy.sdk.Gr4vy;

            import com.gr4vy.sdk.models.components.*;

            import com.gr4vy.sdk.models.errors.*;

            import
            com.gr4vy.sdk.models.operations.CreateCheckoutSessionResponse;

            import java.lang.Exception;

            import java.time.LocalDate;

            import java.time.OffsetDateTime;

            import java.util.List;

            import java.util.Map;

            import org.openapitools.jackson.nullable.JsonNullable;


            public class Application {

                public static void main(String[] args) throws Exception {

                    Gr4vy sdk = Gr4vy.builder()
                            .merchantAccountId("default")
                            .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
                        .build();

                    CreateCheckoutSessionResponse res = sdk.checkoutSessions().create()
                            .checkoutSessionCreate(CheckoutSessionCreate.builder()
                                .cartItems(List.of(
                                    CartItem.builder()
                                        .name("GoPro HD")
                                        .quantity(2L)
                                        .unitAmount(1299L)
                                        .discountAmount(0L)
                                        .taxAmount(0L)
                                        .externalIdentifier("goprohd")
                                        .sku("GPHD1078")
                                        .productUrl("https://example.com/catalog/go-pro-hd")
                                        .imageUrl("https://example.com/images/go-pro-hd.jpg")
                                        .categories(List.of(
                                            "camera",
                                            "travel",
                                            "gear"))
                                        .productType(ProductType.PHYSICAL)
                                        .sellerCountry("US")
                                        .build(),
                                    CartItem.builder()
                                        .name("GoPro HD")
                                        .quantity(2L)
                                        .unitAmount(1299L)
                                        .discountAmount(0L)
                                        .taxAmount(0L)
                                        .externalIdentifier("goprohd")
                                        .sku("GPHD1078")
                                        .productUrl("https://example.com/catalog/go-pro-hd")
                                        .imageUrl("https://example.com/images/go-pro-hd.jpg")
                                        .categories(List.of(
                                            "camera",
                                            "travel",
                                            "gear"))
                                        .productType(ProductType.PHYSICAL)
                                        .sellerCountry("US")
                                        .build()))
                                .metadata(Map.ofEntries(
                                    Map.entry("cohort", "cohort-a"),
                                    Map.entry("order_id", "order-12345")))
                                .buyer(JsonNullable.of(null))
                                .airline(Airline.builder()
                                    .bookingCode("X36Q9C")
                                    .isCardholderTraveling(true)
                                    .issuedAddress("123 Broadway, New York")
                                    .issuedAt(OffsetDateTime.parse("2013-07-16T19:23:00.000+00:00"))
                                    .issuingCarrierCode("649")
                                    .issuingCarrierName("Air Transat A.T. Inc")
                                    .issuingIataDesignator("TS")
                                    .issuingIcaoCode("TSC")
                                    .legs(List.of(
                                        AirlineLeg.builder()
                                            .arrivalAirport("LAX")
                                            .arrivalAt(OffsetDateTime.parse("2013-07-16T19:23:00.000+00:00"))
                                            .arrivalCity("Los Angeles")
                                            .arrivalCountry("US")
                                            .carrierCode("649")
                                            .carrierName("Air Transat A.T. Inc")
                                            .iataDesignator("TS")
                                            .icaoCode("TSC")
                                            .couponNumber("15885566")
                                            .departureAirport("LHR")
                                            .departureAt(OffsetDateTime.parse("2013-07-16T19:23:00.000+00:00"))
                                            .departureCity("London")
                                            .departureCountry("GB")
                                            .departureTaxAmount(1200L)
                                            .fareAmount(129900L)
                                            .fareBasisCode("FY")
                                            .feeAmount(1200L)
                                            .flightClass("E")
                                            .flightNumber("101")
                                            .routeType(RouteType.ROUND_TRIP)
                                            .seatClass("F")
                                            .stopOver(false)
                                            .taxAmount(1200L)
                                            .build()))
                                    .passengerNameRecord("JOHN L")
                                    .passengers(List.of(
                                        AirlinePassenger.builder()
                                            .ageGroup(AgeGroup.ADULT)
                                            .dateOfBirth(LocalDate.parse("2013-07-16"))
                                            .emailAddress("john@example.com")
                                            .firstName("John")
                                            .frequentFlyerNumber("15885566")
                                            .lastName("Luhn")
                                            .passportNumber("11117700225")
                                            .phoneNumber("+1234567890")
                                            .ticketNumber("BA1236699999")
                                            .title("Mr.")
                                            .countryCode("US")
                                            .build(),
                                        AirlinePassenger.builder()
                                            .ageGroup(AgeGroup.ADULT)
                                            .dateOfBirth(LocalDate.parse("2013-07-16"))
                                            .emailAddress("john@example.com")
                                            .firstName("John")
                                            .frequentFlyerNumber("15885566")
                                            .lastName("Luhn")
                                            .passportNumber("11117700225")
                                            .phoneNumber("+1234567890")
                                            .ticketNumber("BA1236699999")
                                            .title("Mr.")
                                            .countryCode("US")
                                            .build()))
                                    .reservationSystem("Amadeus")
                                    .restrictedTicket(false)
                                    .ticketDeliveryMethod(TicketDeliveryMethod.ELECTRONIC)
                                    .ticketNumber("123-1234-151555")
                                    .travelAgencyCode("12345")
                                    .travelAgencyInvoiceNumber("EG15555155")
                                    .travelAgencyName("ACME Agency")
                                    .travelAgencyPlanName("B733")
                                    .build())
                                .build())
                            .call();

                    if (res.checkoutSession().isPresent()) {
                        System.out.println(res.checkoutSession().get());
                    }
                }
            }
        - lang: csharp
          label: C#
          source: >-
            using Gr4vy;

            using Gr4vy.Models.Components;

            using NodaTime;

            using System;

            using System.Collections.Generic;


            var sdk = new Gr4vySDK(
                id: "example",
                server: SDKConfig.Server.Sandbox,
                bearerAuthSource: Auth.WithToken(privateKey),
                merchantAccountId: "default"
            );


            var res = await
            sdk.CheckoutSessions.CreateAsync(checkoutSessionCreate: new
            CheckoutSessionCreate() {
                CartItems = new List<CartItem>() {
                    new CartItem() {
                        Name = "GoPro HD",
                        Quantity = 2,
                        UnitAmount = 1299,
                        DiscountAmount = 0,
                        TaxAmount = 0,
                        ExternalIdentifier = "goprohd",
                        Sku = "GPHD1078",
                        ProductUrl = "https://example.com/catalog/go-pro-hd",
                        ImageUrl = "https://example.com/images/go-pro-hd.jpg",
                        Categories = new List<string>() {
                            "camera",
                            "travel",
                            "gear",
                        },
                        ProductType = "physical",
                        SellerCountry = "GB",
                    },
                    new CartItem() {
                        Name = "GoPro HD",
                        Quantity = 2,
                        UnitAmount = 1299,
                        DiscountAmount = 0,
                        TaxAmount = 0,
                        ExternalIdentifier = "goprohd",
                        Sku = "GPHD1078",
                        ProductUrl = "https://example.com/catalog/go-pro-hd",
                        ImageUrl = "https://example.com/images/go-pro-hd.jpg",
                        Categories = new List<string>() {
                            "camera",
                            "travel",
                            "gear",
                        },
                        ProductType = "physical",
                        SellerCountry = "GB",
                    },
                    new CartItem() {
                        Name = "GoPro HD",
                        Quantity = 2,
                        UnitAmount = 1299,
                        DiscountAmount = 0,
                        TaxAmount = 0,
                        ExternalIdentifier = "goprohd",
                        Sku = "GPHD1078",
                        ProductUrl = "https://example.com/catalog/go-pro-hd",
                        ImageUrl = "https://example.com/images/go-pro-hd.jpg",
                        Categories = new List<string>() {
                            "camera",
                            "travel",
                            "gear",
                        },
                        ProductType = "physical",
                        SellerCountry = "US",
                    },
                },
                Metadata = new Dictionary<string, string>() {
                    { "cohort", "cohort-a" },
                    { "order_id", "order-12345" },
                },
                Buyer = new GuestBuyer() {
                    DisplayName = "John Doe",
                    ExternalIdentifier = "buyer-12345",
                    BillingDetails = new BillingDetails() {
                        FirstName = "John",
                        LastName = "Doe",
                        EmailAddress = "john@example.com",
                        PhoneNumber = "+1234567890",
                        Address = new Address() {
                            City = "San Jose",
                            Country = "US",
                            PostalCode = "94560",
                            State = "California",
                            StateCode = "US-CA",
                            HouseNumberOrName = "10",
                            Line1 = "Stafford Appartments",
                            Line2 = "29th Street",
                            Organization = "Gr4vy",
                        },
                        TaxId = new TaxId() {
                            Value = "12345678931",
                            Kind = "ar.cuit",
                        },
                    },
                    ShippingDetails = new ShippingDetailsCreate() {
                        FirstName = "John",
                        LastName = "Doe",
                        EmailAddress = "john@example.com",
                        PhoneNumber = "+1234567890",
                        Address = new Address() {
                            City = "San Jose",
                            Country = "US",
                            PostalCode = "94560",
                            State = "California",
                            StateCode = "US-CA",
                            HouseNumberOrName = "10",
                            Line1 = "Stafford Appartments",
                            Line2 = "29th Street",
                            Organization = "Gr4vy",
                        },
                    },
                },
                Airline = new Airline() {
                    BookingCode = "X36Q9C",
                    IsCardholderTraveling = true,
                    IssuedAddress = "123 Broadway, New York",
                    IssuedAt = System.DateTime.Parse("2013-07-16T19:23:00.000+00:00").ToUniversalTime(),
                    IssuingCarrierCode = "649",
                    IssuingCarrierName = "Air Transat A.T. Inc",
                    IssuingIataDesignator = "TS",
                    IssuingIcaoCode = "TSC",
                    Legs = new List<AirlineLeg>() {
                        new AirlineLeg() {
                            ArrivalAirport = "LAX",
                            ArrivalAt = System.DateTime.Parse("2013-07-16T19:23:00.000+00:00").ToUniversalTime(),
                            ArrivalCity = "Los Angeles",
                            ArrivalCountry = "US",
                            CarrierCode = "649",
                            CarrierName = "Air Transat A.T. Inc",
                            IataDesignator = "TS",
                            IcaoCode = "TSC",
                            CouponNumber = "15885566",
                            DepartureAirport = "LHR",
                            DepartureAt = System.DateTime.Parse("2013-07-16T19:23:00.000+00:00").ToUniversalTime(),
                            DepartureCity = "London",
                            DepartureCountry = "GB",
                            DepartureTaxAmount = 1200,
                            FareAmount = 129900,
                            FareBasisCode = "FY",
                            FeeAmount = 1200,
                            FlightClass = "E",
                            FlightNumber = "101",
                            RouteType = "round_trip",
                            SeatClass = "F",
                            StopOver = false,
                            TaxAmount = 1200,
                        },
                        new AirlineLeg() {
                            ArrivalAirport = "LAX",
                            ArrivalAt = System.DateTime.Parse("2013-07-16T19:23:00.000+00:00").ToUniversalTime(),
                            ArrivalCity = "Los Angeles",
                            ArrivalCountry = "US",
                            CarrierCode = "649",
                            CarrierName = "Air Transat A.T. Inc",
                            IataDesignator = "TS",
                            IcaoCode = "TSC",
                            CouponNumber = "15885566",
                            DepartureAirport = "LHR",
                            DepartureAt = System.DateTime.Parse("2013-07-16T19:23:00.000+00:00").ToUniversalTime(),
                            DepartureCity = "London",
                            DepartureCountry = "GB",
                            DepartureTaxAmount = 1200,
                            FareAmount = 129900,
                            FareBasisCode = "FY",
                            FeeAmount = 1200,
                            FlightClass = "E",
                            FlightNumber = "101",
                            RouteType = "round_trip",
                            SeatClass = "F",
                            StopOver = false,
                            TaxAmount = 1200,
                        },
                        new AirlineLeg() {
                            ArrivalAirport = "LAX",
                            ArrivalAt = System.DateTime.Parse("2013-07-16T19:23:00.000+00:00").ToUniversalTime(),
                            ArrivalCity = "Los Angeles",
                            ArrivalCountry = "US",
                            CarrierCode = "649",
                            CarrierName = "Air Transat A.T. Inc",
                            IataDesignator = "TS",
                            IcaoCode = "TSC",
                            CouponNumber = "15885566",
                            DepartureAirport = "LHR",
                            DepartureAt = System.DateTime.Parse("2013-07-16T19:23:00.000+00:00").ToUniversalTime(),
                            DepartureCity = "London",
                            DepartureCountry = "GB",
                            DepartureTaxAmount = 1200,
                            FareAmount = 129900,
                            FareBasisCode = "FY",
                            FeeAmount = 1200,
                            FlightClass = "E",
                            FlightNumber = "101",
                            RouteType = "round_trip",
                            SeatClass = "F",
                            StopOver = false,
                            TaxAmount = 1200,
                        },
                    },
                    PassengerNameRecord = "JOHN L",
                    Passengers = new List<AirlinePassenger>() {
                        new AirlinePassenger() {
                            AgeGroup = "adult",
                            DateOfBirth = LocalDate.FromDateTime(System.DateTime.Parse("2013-07-16")),
                            EmailAddress = "john@example.com",
                            FirstName = "John",
                            FrequentFlyerNumber = "15885566",
                            LastName = "Luhn",
                            PassportNumber = "11117700225",
                            PhoneNumber = "+1234567890",
                            TicketNumber = "BA1236699999",
                            Title = "Mr.",
                            CountryCode = "US",
                        },
                        new AirlinePassenger() {
                            AgeGroup = "adult",
                            DateOfBirth = LocalDate.FromDateTime(System.DateTime.Parse("2013-07-16")),
                            EmailAddress = "john@example.com",
                            FirstName = "John",
                            FrequentFlyerNumber = "15885566",
                            LastName = "Luhn",
                            PassportNumber = "11117700225",
                            PhoneNumber = "+1234567890",
                            TicketNumber = "BA1236699999",
                            Title = "Mr.",
                            CountryCode = "US",
                        },
                    },
                    ReservationSystem = "Amadeus",
                    RestrictedTicket = false,
                    TicketDeliveryMethod = "electronic",
                    TicketNumber = "123-1234-151555",
                    TravelAgencyCode = "12345",
                    TravelAgencyInvoiceNumber = "EG15555155",
                    TravelAgencyName = "ACME Agency",
                    TravelAgencyPlanName = "B733",
                },
            });


            // handle response
components:
  schemas:
    CheckoutSessionCreate:
      properties:
        cart_items:
          anyOf:
            - items:
                $ref: '#/components/schemas/CartItem'
              type: array
            - type: 'null'
          title: Cart Items
          description: >-
            An array of cart items that represents the line items of a
            transaction.
        metadata:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Metadata
          description: >-
            Any additional information about the transaction that you would like
            to store as key-value pairs. This data is passed to payment service
            providers that support it.
          examples:
            - cohort: cohort-a
              order_id: order-12345
        buyer:
          anyOf:
            - $ref: '#/components/schemas/GuestBuyer'
            - type: 'null'
          description: >-
            Provide buyer details for the transaction. No buyer resource will be
            created on Gr4vy when used.
        airline:
          anyOf:
            - $ref: '#/components/schemas/Airline'
            - type: 'null'
          description: >-
            The airline addendum data which describes the airline booking
            associated with this transaction.
        expires_in:
          type: number
          maximum: 86400
          minimum: 3600
          title: Expires In
          description: The time in seconds when this checkout session expires.
          default: 3600
      additionalProperties: false
      type: object
      title: CheckoutSessionUpdate
    CheckoutSession:
      properties:
        cart_items:
          anyOf:
            - items:
                $ref: '#/components/schemas/CartItem'
              type: array
            - type: 'null'
          title: Cart Items
          description: >-
            An array of cart items that represents the line items of a
            transaction.
        metadata:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Metadata
          description: >-
            Any additional information about the transaction that you would like
            to store as key-value pairs. This data is passed to payment service
            providers that support it.
          examples:
            - cohort: cohort-a
              order_id: order-12345
        buyer:
          anyOf:
            - $ref: '#/components/schemas/GuestBuyer'
            - type: 'null'
          description: >-
            Provide buyer details for the transaction. No buyer resource will be
            created on Gr4vy when used.
        airline:
          anyOf:
            - $ref: '#/components/schemas/Airline'
            - type: 'null'
          description: >-
            The airline addendum data which describes the airline booking
            associated with this transaction.
        type:
          type: string
          const: checkout-session
          title: Type
          description: Always `checkout-session`
          default: checkout-session
          examples:
            - checkout-session
        id:
          type: string
          format: uuid
          title: Id
          description: The ID for the checkout session.
          examples:
            - 4137b1cf-39ac-42a8-bad6-1c680d5dab6b
        expires_at:
          type: string
          format: date-time
          title: Expires At
          description: The date and time when this checkout session expires.
          examples:
            - '2013-07-16T19:23:00.000+00:00'
        payment_method:
          anyOf:
            - $ref: '#/components/schemas/CheckoutSessionPaymentMethod'
            - type: 'null'
          description: Information about the payment method stored on the checkout session.
      additionalProperties: false
      type: object
      required:
        - id
        - expires_at
      title: CheckoutSession
    Error400:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `bad_request`
          default: bad_request
          examples:
            - bad_request
        status:
          type: integer
          title: Status
          description: Always `400`.
          default: 400
          examples:
            - 400
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: Generic error
          examples:
            - Request failed validation
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error400
    Error401:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `unauthorized`
          default: unauthorized
          examples:
            - unauthorized
        status:
          type: integer
          title: Status
          description: Always `401`.
          default: 401
          examples:
            - 401
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: No valid API authentication found
          examples:
            - No valid API authentication found
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error401
    Error403:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `forbidden`
          default: forbidden
          examples:
            - forbidden
        status:
          type: integer
          title: Status
          description: Always `403`.
          default: 403
          examples:
            - 403
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: Generic error
          examples:
            - Request failed validation
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error403
    Error404:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `not_found`
          default: not_found
          examples:
            - not_found
        status:
          type: integer
          title: Status
          description: Always `404`.
          default: 404
          examples:
            - 404
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: The resource could not be found
          examples:
            - The resource could not be found
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error404
    Error405:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `method_not_allowed`
          default: method_not_allowed
          examples:
            - method_not_allowed
        status:
          type: integer
          title: Status
          description: Always `405`.
          default: 405
          examples:
            - 405
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: Method Not Allowed
          examples:
            - Method Not Allowed
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error405
    Error409:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `duplicate_record`
          default: duplicate_record
          examples:
            - duplicate_record
        status:
          type: integer
          title: Status
          description: Always `409`.
          default: 409
          examples:
            - 409
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: Generic error
          examples:
            - Request failed validation
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
          description: The ID of the conflicting resource.
          examples:
            - cdc70639-cb9c-4222-a73f-b8ce39f7821b
      additionalProperties: false
      type: object
      title: Error409
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Error425:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `too_early`
          default: too_early
          examples:
            - too_early
        status:
          type: integer
          title: Status
          description: Always `425`.
          default: 425
          examples:
            - 425
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: Generic error
          examples:
            - Request failed validation
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error425
    Error429:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `too_many_requests`
          default: too_many_requests
          examples:
            - too_many_requests
        status:
          type: integer
          title: Status
          description: Always `429`.
          default: 429
          examples:
            - 429
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: Generic error
          examples:
            - Request failed validation
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error429
    Error500:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `server_error`
          default: server_error
          examples:
            - server_error
        status:
          type: integer
          title: Status
          description: Always `500`.
          default: 500
          examples:
            - 500
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: Request could not be processed
          examples:
            - Request could not be processed
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error500
    Error502:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `bad_gateway`
          default: bad_gateway
          examples:
            - bad_gateway
        status:
          type: integer
          title: Status
          description: Always `502`.
          default: 502
          examples:
            - 502
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: Request could not be processed
          examples:
            - Request could not be processed
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error502
    Error504:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `gateway_timeout`
          default: gateway_timeout
          examples:
            - gateway_timeout
        status:
          type: integer
          title: Status
          default: 504
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: Request could not be processed
          examples:
            - Request could not be processed
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error504
    CartItem:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
          description: >-
            The name of the cart item. The value you set for this property may
            be truncated if the maximum length accepted by a payment service
            provider is less than 255 characters.
          examples:
            - GoPro HD
        quantity:
          type: integer
          maximum: 99999999
          exclusiveMinimum: 0
          title: Quantity
          description: >-
            The quantity of this item in the cart. This value cannot be negative
            or zero.
          examples:
            - 2
        unit_amount:
          type: integer
          maximum: 99999999
          minimum: 0
          title: Unit Amount
          description: >-
            The amount for an individual item represented as a monetary amount
            in the smallest currency unit for the given currency, for example
            `1299` USD cents represents `$12.99`. The amount sent through to the
            payment processor as unitary amount will be calculated to include
            the discount and tax values sent as part of this cart item.
          examples:
            - 1299
        discount_amount:
          anyOf:
            - type: integer
              maximum: 99999999
              minimum: 0
            - type: 'null'
          title: Discount Amount
          description: >-
            The amount discounted for this item represented as a monetary amount
            in the smallest currency unit for the given currency, for example
            `1299` USD cents represents `$12.99`.
          default: 0
          examples:
            - 0
        tax_amount:
          anyOf:
            - type: integer
              maximum: 99999999
              minimum: 0
            - type: 'null'
          title: Tax Amount
          description: >-
            The tax amount for this item represented as a monetary amount in the
            smallest currency unit for the given currency, for example `1299`
            USD cents represents `$12.99`.
          default: 0
          examples:
            - 0
        external_identifier:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: External Identifier
          description: >-
            An external identifier for the cart item. This can be set to any
            value and is not sent to the payment service.
          examples:
            - goprohd
        sku:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: Sku
          description: The SKU or product code for the item.
          examples:
            - GPHD1078
        upc:
          anyOf:
            - type: string
              maxLength: 50
              minLength: 1
            - type: 'null'
          title: Upc
          description: The UPC for the item.
          examples:
            - '012345678905'
        product_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Url
          description: The product URL for the item.
          examples:
            - https://example.com/catalog/go-pro-hd
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
          description: The URL for the image of the item.
          examples:
            - https://example.com/images/go-pro-hd.jpg
        categories:
          anyOf:
            - items:
                type: string
                maxLength: 50
                minLength: 1
              type: array
            - type: 'null'
          title: Categories
          description: A list of strings containing product categories for the item.
          examples:
            - - camera
              - travel
              - gear
        product_type:
          anyOf:
            - type: string
              enum:
                - physical
                - discount
                - shipping_fee
                - sales_tax
                - digital
                - gift_card
                - store_credit
                - surcharge
              title: ProductType
              x-speakeasy-unknown-values: allow
              overlay: 1.0.0
            - type: 'null'
          description: The product type of the cart item.
          examples:
            - physical
        seller_country:
          anyOf:
            - type: string
              pattern: ^[A-Z]{2}$
              examples:
                - DE
                - GB
                - US
            - type: 'null'
          title: Seller Country
          description: The seller country of the cart item.
          examples:
            - US
            - GB
        tax_exempt:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Tax Exempt
          description: Whether the item is exempt of tax.
          examples:
            - false
        unit_of_measure:
          anyOf:
            - type: string
              maxLength: 50
              minLength: 1
            - type: 'null'
          title: Unit Of Measure
          description: The unit of measure or the unit of measure code.
          examples:
            - feet
            - kg
        commodity_code:
          anyOf:
            - type: string
              maxLength: 50
              minLength: 1
            - type: 'null'
          title: Commodity Code
          description: Item commodity code. Generally a UNSPSC code.
          examples:
            - '43211503'
            - '84111502'
        description:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Description
          description: Brief item description.
          examples:
            - A brief description of an interesting item.
        duty_amount:
          anyOf:
            - type: integer
              maximum: 99999999
              minimum: 0
            - type: 'null'
          title: Duty Amount
          description: >-
            Item import or export duties represented as a monetary amount in the
            smallest currency unit for the given currency, for example `1299`
            cents to create an authorization for `$12.99`
          examples:
            - 1299
        shipping_amount:
          anyOf:
            - type: integer
              maximum: 99999999
              minimum: 0
            - type: 'null'
          title: Shipping Amount
          description: >-
            Freight/shipping amount represented as a monetary amount in the
            smallest currency unit for the given currency, for example `1299`
            cents to create an authorization for `$12.99`
          examples:
            - 1299
      additionalProperties: false
      type: object
      required:
        - name
        - quantity
        - unit_amount
      title: CartItem
    GuestBuyer:
      properties:
        display_name:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: Display Name
          description: The display name for the buyer.
          examples:
            - John Doe
        external_identifier:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: External Identifier
          description: The merchant identifier for this buyer.
          examples:
            - buyer-12345
        billing_details:
          anyOf:
            - $ref: '#/components/schemas/BillingDetails'
            - type: 'null'
          description: The billing name, address, email, and other fields for this buyer.
        account_number:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: Account Number
          description: The buyer account number
        shipping_details:
          anyOf:
            - $ref: '#/components/schemas/ShippingDetailsCreate'
            - type: 'null'
          description: The optional shipping details for this buyer.
      additionalProperties: false
      type: object
      title: GuestBuyer
    Airline:
      properties:
        booking_code:
          anyOf:
            - type: string
              maxLength: 50
              minLength: 1
            - type: 'null'
          title: Booking Code
          description: >-
            The unique identifier of the reservation in the global distribution
            system.
          examples:
            - X36Q9C
        is_cardholder_traveling:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Cardholder Traveling
          description: Indicates whether the cardholder is traveling.
          examples:
            - true
        issued_address:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Issued Address
          description: The address of the place/agency that issued the ticket.
          examples:
            - 123 Broadway, New York
        issued_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Issued At
          description: >-
            The date that the ticket was last issued in the airline reservation
            system.
          examples:
            - '2013-07-16T19:23:00.000+00:00'
        issuing_carrier_code:
          anyOf:
            - type: string
              maxLength: 3
              minLength: 2
            - type: 'null'
          title: Issuing Carrier Code
          description: >-
            For airline aggregators, three-character IATA code of the airline
            issuing the ticket.
          examples:
            - '649'
        issuing_carrier_name:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Issuing Carrier Name
          description: For airline aggregators, name of the airline issuing the ticket.
          examples:
            - Air Transat A.T. Inc
        issuing_iata_designator:
          anyOf:
            - type: string
              maxLength: 2
              minLength: 2
            - type: 'null'
          title: Issuing Iata Designator
          description: >-
            For airline aggregators, two-character IATA code of the airline
            issuing the ticket.
          examples:
            - TS
        issuing_icao_code:
          anyOf:
            - type: string
              maxLength: 3
              minLength: 3
            - type: 'null'
          title: Issuing Icao Code
          description: >-
            For airline aggregators, three-character ICAO code of the airline
            issuing the ticket.
          examples:
            - TSC
        legs:
          anyOf:
            - items:
                $ref: '#/components/schemas/AirlineLeg'
              type: array
              maxItems: 20
            - type: 'null'
          title: Legs
          description: >-
            An array of separate trip segments. Each leg contains detailed
            itinerary information.
        passenger_name_record:
          anyOf:
            - type: string
              maxLength: 50
              minLength: 1
            - type: 'null'
          title: Passenger Name Record
          description: The Passenger Name Record (PNR) in the airline reservation system.
          examples:
            - JOHN L
        passengers:
          anyOf:
            - items:
                $ref: '#/components/schemas/AirlinePassenger'
              type: array
              maxItems: 20
            - type: 'null'
          title: Passengers
          description: An array of the travelling passengers.
        reservation_system:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: Reservation System
          description: The name of the reservation system.
          examples:
            - Amadeus
        restricted_ticket:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Restricted Ticket
          description: Indicates whether the ticket is restricted (refundable).
          examples:
            - false
        ticket_delivery_method:
          anyOf:
            - type: string
              enum:
                - electronic
                - other
              x-speakeasy-unknown-values: allow
              overlay: 1.0.0
            - type: 'null'
          title: Ticket Delivery Method
          description: The delivery method of the ticket.
          default: electronic
          examples:
            - electronic
        ticket_number:
          anyOf:
            - type: string
              maxLength: 50
              minLength: 1
            - type: 'null'
          title: Ticket Number
          description: The airline's unique ticket number.
          examples:
            - 123-1234-151555
        travel_agency_code:
          anyOf:
            - type: string
              maxLength: 50
              minLength: 1
            - type: 'null'
          title: Travel Agency Code
          description: The IATA travel agency code.
          examples:
            - '12345'
        travel_agency_invoice_number:
          anyOf:
            - type: string
              maxLength: 50
              minLength: 1
            - type: 'null'
          title: Travel Agency Invoice Number
          description: >-
            The reference number of the invoice that was issued by the travel
            agency.
          examples:
            - EG15555155
        travel_agency_name:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: Travel Agency Name
          description: The name of the travel agency.
          examples:
            - ACME Agency
        travel_agency_plan_name:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: Travel Agency Plan Name
          description: The name of the travel agency plan.
          examples:
            - B733
      additionalProperties: false
      type: object
      title: Airline
      description: Information about an airline travel.
    CheckoutSessionPaymentMethod:
      properties:
        type:
          type: string
          const: payment-method
          title: Type
          description: Always `payment-method`
          default: payment-method
          examples:
            - payment-method
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: The ID of the payment method.
          examples:
            - ef9496d8-53a5-4aad-8ca2-00eb68334389
        details:
          anyOf:
            - $ref: '#/components/schemas/CheckoutSessionPaymentMethodDetails'
            - type: 'null'
          description: Details for credit or debit card payment method.
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
          description: The last 4 digits of the the card.
          examples:
            - '1234'
        method:
          type: string
          const: card
          title: Method
          description: Always `card`
          default: card
          examples:
            - card
        scheme:
          anyOf:
            - type: string
              enum:
                - accel
                - amex
                - bancontact
                - carte-bancaire
                - cirrus
                - culiance
                - dankort
                - diners-club
                - discover
                - eftpos-australia
                - elo
                - hipercard
                - jcb
                - maestro
                - mastercard
                - mir
                - nyce
                - other
                - pulse
                - qcard
                - rupay
                - star
                - uatp
                - unionpay
                - visa
              title: CardScheme
              x-speakeasy-unknown-values: allow
              overlay: 1.0.0
            - type: 'null'
          description: The scheme of the card.
          examples:
            - visa
        fingerprint:
          anyOf:
            - type: string
            - type: 'null'
          title: Fingerprint
          description: The unique hash derived from the card number.
          examples:
            - a50b85c200ee0795d6fd33a5c66f37a4564f554355c5b46a756aac485dd168a4
      additionalProperties: false
      type: object
      title: CheckoutSessionPaymentMethod
    ErrorDetail:
      properties:
        location:
          description: >-
            The part of the request where the property can be found that caused
            the error.
          examples:
            - body
          type: string
          enum:
            - query
            - body
            - path
            - header
            - unknown
          title: ErrorLocation
          x-speakeasy-unknown-values: allow
          overlay: 1.0.0
        pointer:
          anyOf:
            - type: string
              format: json-pointer
            - type: string
          title: Pointer
          description: A JSON pointer for the particular property that caused the error.
          examples:
            - /currency
        message:
          type: string
          title: Message
          description: A human-readdable explanation of the error.
          examples:
            - 'Unknown ISO 4217 currency code: USX'
        type:
          type: string
          title: Type
          description: The type of error that was raised for this property.
          examples:
            - value_error
      additionalProperties: false
      type: object
      required:
        - location
        - pointer
        - message
        - type
      title: ErrorDetail
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    BillingDetails:
      properties:
        first_name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: First Name
          description: The first name(s) or given name for the buyer.
          examples:
            - John
        last_name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Last Name
          description: The last name, or family name, of the buyer.
          examples:
            - Doe
        email_address:
          anyOf:
            - type: string
              maxLength: 320
              minLength: 1
            - type: 'null'
          title: Email Address
          description: The email address for the buyer.
          examples:
            - john@example.com
        phone_number:
          anyOf:
            - type: string
              pattern: ^\+[1-9]\d{1,14}$
              examples:
                - '+14155552671'
                - '+442071838750'
            - type: 'null'
          title: Phone Number
          description: >-
            The phone number for the buyer which should be formatted according
            to the E164 number standard.
          examples:
            - '+1234567890'
        address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
          description: The billing address for the buyer.
        tax_id:
          anyOf:
            - $ref: '#/components/schemas/TaxId'
            - type: 'null'
          description: The tax ID information associated with the billing details.
      additionalProperties: false
      type: object
      title: BillingDetails
    ShippingDetailsCreate:
      properties:
        first_name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: First Name
          description: The first name(s) or given name for the buyer.
          examples:
            - John
        last_name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Last Name
          description: The last name, or family name, of the buyer.
          examples:
            - Doe
        email_address:
          anyOf:
            - type: string
              maxLength: 320
              minLength: 1
            - type: 'null'
          title: Email Address
          description: The email address for the buyer.
          examples:
            - john@example.com
        phone_number:
          anyOf:
            - type: string
              pattern: ^\+[1-9]\d{1,14}$
              examples:
                - '+14155552671'
                - '+442071838750'
            - type: 'null'
          title: Phone Number
          description: >-
            The phone number for the buyer which should be formatted according
            to the E164 number standard.
          examples:
            - '+1234567890'
        address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
          description: The billing address for the buyer.
      additionalProperties: false
      type: object
      title: ShippingDetailsCreate
    AirlineLeg:
      properties:
        arrival_airport:
          anyOf:
            - type: string
              maxLength: 3
              minLength: 3
            - type: 'null'
          title: Arrival Airport
          description: >-
            Arrival airport code of leg. 3-letter ISO code according to IATA
            official directory.
          examples:
            - LAX
        arrival_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Arrival At
          description: The date and time of travel in local time at the arrival airport.
          examples:
            - '2013-07-16T19:23:00.000+00:00'
        arrival_city:
          anyOf:
            - type: string
              maxLength: 100
              minLength: 1
            - type: 'null'
          title: Arrival City
          description: Arrival city name.
          examples:
            - Los Angeles
        arrival_country:
          anyOf:
            - type: string
              pattern: ^[A-Z]{2}$
              examples:
                - DE
                - GB
                - US
            - type: 'null'
          title: Arrival Country
          description: Arrival country code in ISO 3166 format.
          examples:
            - US
        carrier_code:
          anyOf:
            - type: string
              maxLength: 3
              minLength: 2
            - type: 'null'
          title: Carrier Code
          description: 3 character airline code as set by IATA.
          examples:
            - '649'
        carrier_name:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Carrier Name
          description: Name of the airline.
          examples:
            - Air Transat A.T. Inc
        iata_designator:
          anyOf:
            - type: string
              maxLength: 2
              minLength: 2
            - type: 'null'
          title: Iata Designator
          description: Two-character IATA code of the airline.
          examples:
            - TS
        icao_code:
          anyOf:
            - type: string
              maxLength: 3
              minLength: 3
            - type: 'null'
          title: Icao Code
          description: Three-character ICAO code of the airline.
          examples:
            - TSC
        coupon_number:
          anyOf:
            - type: string
              maxLength: 50
              minLength: 1
            - type: 'null'
          title: Coupon Number
          description: Coupon number associated with the leg.
          examples:
            - '15885566'
        departure_airport:
          anyOf:
            - type: string
              maxLength: 3
              minLength: 3
            - type: 'null'
          title: Departure Airport
          description: >-
            Departure airport code of leg. 3-letter ISO code according to IATA
            official directory.
          examples:
            - LHR
        departure_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Departure At
          description: The date and time of travel in local time at the departure airport.
          examples:
            - '2013-07-16T19:23:00.000+00:00'
        departure_city:
          anyOf:
            - type: string
              maxLength: 100
              minLength: 1
            - type: 'null'
          title: Departure City
          description: Departure city name.
          examples:
            - London
        departure_country:
          anyOf:
            - type: string
              pattern: ^[A-Z]{2}$
              examples:
                - DE
                - GB
                - US
            - type: 'null'
          title: Departure Country
          description: >-
            Departure airport code of leg. 3-letter ISO code according to IATA
            official directory.
          examples:
            - GB
        departure_tax_amount:
          anyOf:
            - type: integer
              maximum: 99999999
              minimum: 0
            - type: 'null'
          title: Departure Tax Amount
          description: >-
            Departure tax amount charged by a country when a person is leaving
            the country.
          examples:
            - 1200
        fare_amount:
          anyOf:
            - type: integer
              maximum: 99999999
              minimum: 0
            - type: 'null'
          title: Fare Amount
          description: >-
            Amount of the ticket, for current leg of the trip, excluding taxes
            and fees.
          examples:
            - 129900
        fare_basis_code:
          anyOf:
            - type: string
              maxLength: 8
              minLength: 1
            - type: 'null'
          title: Fare Basis Code
          description: The alphanumeric code for the booking class of a ticket.
          examples:
            - FY
        fee_amount:
          anyOf:
            - type: integer
              maximum: 99999999
              minimum: 0
            - type: 'null'
          title: Fee Amount
          description: Fee amount for current leg of the trip.
          examples:
            - 1200
        flight_class:
          anyOf:
            - type: string
              maxLength: 5
              minLength: 1
            - type: 'null'
          title: Flight Class
          description: Indicates service class (first class, business class, etc.).
          examples:
            - E
        flight_number:
          anyOf:
            - type: string
              maxLength: 6
              minLength: 3
            - type: 'null'
          title: Flight Number
          description: Unique identifier of the flight number.
          examples:
            - '101'
        route_type:
          anyOf:
            - type: string
              enum:
                - round_trip
                - one_way
              x-speakeasy-unknown-values: allow
              overlay: 1.0.0
            - type: 'null'
          title: Route Type
          description: The route type of the flight.
          examples:
            - round_trip
        seat_class:
          anyOf:
            - type: string
              maxLength: 5
              minLength: 1
            - type: 'null'
          title: Seat Class
          description: Indicates seat class (first class, business class, etc.).
          examples:
            - F
        stop_over:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Stop Over
          description: Indicates whether a stopover is allowed on this ticket.
          examples:
            - false
        tax_amount:
          anyOf:
            - type: integer
              maximum: 99999999
              minimum: 0
            - type: 'null'
          title: Tax Amount
          description: Amount of the taxes for current leg of the trip.
          examples:
            - 1200
      additionalProperties: false
      type: object
      title: AirlineLeg
    AirlinePassenger:
      properties:
        age_group:
          anyOf:
            - type: string
              enum:
                - adult
                - infant
              x-speakeasy-unknown-values: allow
              overlay: 1.0.0
            - type: 'null'
          title: Age Group
          description: The age group for the passenger.
          examples:
            - adult
        date_of_birth:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Date Of Birth
          description: The passenger's date of birth in YYYY-MM-YY format.
          examples:
            - '2013-07-16'
        email_address:
          anyOf:
            - type: string
              maxLength: 320
              minLength: 1
            - type: 'null'
          title: Email Address
          description: The email address of the passenger.
          examples:
            - john@example.com
        first_name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: First Name
          description: The first name(s) or given name of the passenger.
          examples:
            - John
        frequent_flyer_number:
          anyOf:
            - type: string
              maxLength: 50
              minLength: 5
            - type: 'null'
          title: Frequent Flyer Number
          description: The passenger's frequent flyer number.
          examples:
            - '15885566'
        last_name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Last Name
          description: The last name, or family name, of the passenger.
          examples:
            - Luhn
        passport_number:
          anyOf:
            - type: string
              maxLength: 50
              minLength: 1
            - type: 'null'
          title: Passport Number
          description: The passenger's unique passport number.
          examples:
            - '11117700225'
        phone_number:
          anyOf:
            - type: string
              pattern: ^\+[1-9]\d{1,14}$
              examples:
                - '+14155552671'
                - '+442071838750'
            - type: 'null'
          title: Phone Number
          description: >-
            The phone number of the passenger. This number is formatted
            according to the E164 number standard.
          examples:
            - '+1234567890'
        ticket_number:
          anyOf:
            - type: string
              maxLength: 50
              minLength: 1
            - type: 'null'
          title: Ticket Number
          description: The ticket number for a flight.
          examples:
            - BA1236699999
        title:
          anyOf:
            - type: string
              maxLength: 50
              minLength: 1
            - type: 'null'
          title: Title
          description: Title of the passenger.
          examples:
            - Mr.
        country_code:
          anyOf:
            - type: string
              pattern: ^[A-Z]{2}$
              examples:
                - DE
                - GB
                - US
            - type: 'null'
          title: Country Code
          description: The country of residence of the passenger
          examples:
            - US
      additionalProperties: false
      type: object
      title: AirlinePassenger
    CheckoutSessionPaymentMethodDetails:
      properties:
        bin:
          anyOf:
            - type: string
            - type: 'null'
          title: Bin
          description: The first 6 digit of the card.
          examples:
            - '411111'
        card_country:
          anyOf:
            - type: string
              pattern: ^[A-Z]{2}$
              examples:
                - DE
                - GB
                - US
            - type: 'null'
          title: Card Country
          description: The country of the card issuer.
          examples:
            - US
        card_type:
          anyOf:
            - type: string
              enum:
                - credit
                - debit
                - prepaid
              title: CardType
              x-speakeasy-unknown-values: allow
              overlay: 1.0.0
            - type: 'null'
          description: The payment scheme of the card.
          examples:
            - credit
        card_issuer_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Card Issuer Name
          description: The card issuer.
          examples:
            - Bank of America NA
      additionalProperties: false
      type: object
      title: CheckoutSessionPaymentMethodDetails
    Address:
      properties:
        city:
          anyOf:
            - type: string
              maxLength: 100
              minLength: 1
            - type: 'null'
          title: City
          description: The city for the address.
          examples:
            - San Jose
        country:
          anyOf:
            - type: string
              pattern: ^[A-Z]{2}$
              examples:
                - DE
                - GB
                - US
            - type: 'null'
          title: Country
          description: The country for the address in ISO 3166 format.
          examples:
            - US
        postal_code:
          anyOf:
            - type: string
              maxLength: 50
              minLength: 1
            - type: 'null'
          title: Postal Code
          description: The postal code or zip code for the address.
          examples:
            - '94560'
        state:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: State
          description: The state, county, or province for the address.
          examples:
            - California
        state_code:
          anyOf:
            - type: string
              pattern: ^[A-Z]{2}-[A-Z0-9]{1,3}$
              examples:
                - GB-LND
                - US-CA
            - type: 'null'
          title: State Code
          description: >-
            The code of state, county, or province for the address in ISO 3166-2
            format.
          examples:
            - US-CA
        house_number_or_name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: House Number Or Name
          description: >-
            The house number or name for the address. Not all payment services
            use this field but some do.
          examples:
            - '10'
        line1:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Line1
          description: The first line of the address.
          examples:
            - Stafford Appartments
        line2:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Line2
          description: The second line of the address.
          examples:
            - 29th Street
        organization:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Organization
          description: >-
            The optional name of the company or organisation to add to the
            address.
          examples:
            - Gr4vy
      additionalProperties: false
      type: object
      title: Address
    TaxId:
      properties:
        value:
          type: string
          maxLength: 50
          minLength: 1
          title: Value
          description: The tax ID for the buyer.
          examples:
            - '12345678931'
        kind:
          description: The kind of tax ID
          examples:
            - us.ein
          type: string
          enum:
            - ae.trn
            - au.abn
            - ar.dni
            - ar.cuil
            - ar.cuit
            - br.cnpj
            - br.cpf
            - ca.bn
            - ca.gst_hst
            - ca.pst_bc
            - ca.pst_mb
            - ca.pst_sk
            - ca.qst
            - ch.vat
            - cl.tin
            - co.itin
            - co.nit
            - co.cc
            - co.ce
            - co.de
            - co.rc
            - co.ti
            - co.passport
            - es.cif
            - eu.vat
            - gb.vat
            - hk.br
            - id.nik
            - id.npwp
            - in.gst
            - in.pan
            - jp.cn
            - jp.rn
            - kr.brn
            - li.uid
            - mx.curp
            - mx.rfc
            - my.frp
            - my.itn
            - my.nric
            - my.sst
            - no.vat
            - nz.gst
            - pe.ruc
            - ph.tin
            - ru.inn
            - ru.kpp
            - sa.vat
            - sg.gst
            - sg.uen
            - th.id
            - th.vat
            - tw.vat
            - us.ein
            - za.vat
            - bo.ci
            - uy.rut
            - uy.ci
          title: TaxIdKind
          x-speakeasy-unknown-values: allow
          overlay: 1.0.0
      additionalProperties: false
      type: object
      required:
        - value
        - kind
      title: TaxId
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````