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

# Retrieve a client session

> This API call retrieves all the details associated with the client session corresponding to the client token that is provided in the request. The fields with empty values are excluded from the response.




## OpenAPI

````yaml https://api.schemas.primer.io/api-reference/v2.4/openapi.yaml get /client-session
openapi: 3.0.2
info:
  x-logo:
    url: https://apidocs.primer.io/docs/assets/images/primer-logo.svg
  title: Primer API
  version: '2.4'
  description: >-
    This API enforces a timeout of 90 seconds for all requests. A 504 response
    indicates a timeout has occurred.
servers:
  - url: https://api.sandbox.primer.io
  - url: https://api.primer.io
security:
  - ApiKeyAuth: []
tags:
  - name: Client Session API
  - name: Payments API
  - name: Payment Methods API
paths:
  /client-session:
    get:
      tags:
        - Client Session API
      summary: Retrieve a client session
      description: >
        This API call retrieves all the details associated with the client
        session corresponding to the client token that is provided in the
        request. The fields with empty values are excluded from the response.
      operationId: retrieve_client_side_token_client_session_get
      parameters:
        - description: Client token corresponding to the client session to retrieve
          schema:
            title: Client Token
            type: string
            description: Client token
          name: clientToken
          in: query
        - $ref: '#/components/parameters/ApiVersionHeader'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientSessionAPIResponse'
        '400':
          description: Error Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400ErrorResponse'
        '422':
          description: Error Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422ErrorResponse'
components:
  parameters:
    ApiVersionHeader:
      required: true
      schema:
        title: X-API-VERSION
        type: string
        example: '2.4'
      name: X-API-VERSION
      description: Specifies the version of the API to use. This must be set to `2.4`.
      in: header
  schemas:
    ClientSessionAPIResponse:
      title: ClientSessionAPIResponse
      required:
        - paymentMethod
      type: object
      properties:
        customerId:
          title: The ID of the customer using the checkout
          type: string
          description: A unique identifier for your customer.
          maxLength: 255
        orderId:
          title: Order ID
          type: string
          description: Your reference for the payment.
          maxLength: 255
        currencyCode:
          $ref: '#/components/schemas/Currency'
          title: Currency
          description: >
            The 3-letter currency code in [ISO 4217
            format](https://en.wikipedia.org/wiki/ISO_4217#Active_codes). e.g.
            use `USD` for US dollars.
        amount:
          title: Payment amount
          minimum: 0
          type: integer
          format: int64
          description: >-
            The amount you are going to charge the customer, in minor units.
            This amount is calculated from the line items, shipping and other
            amounts provided in the `order`. 

            If a top-level amount is provided, it would override any calculated
            amount.
        metadata:
          title: Payment Metadata
          type: object
          description: |
            Additional data to be used throughout the payment lifecycle.
        customer:
          $ref: '#/components/schemas/CustomerDetailsAPISchema'
          title: Customer Details
          description: More information associated with the customer.
        order:
          $ref: '#/components/schemas/OrderDetailsAPISchema'
          title: Order Details
          description: More information associated with the order.
        paymentMethod:
          $ref: '#/components/schemas/CheckoutResponsePaymentMethodOptionsAPISchema'
          title: Payment Method Options
          description: Enable certain options associated with the payment methods.
      example:
        customerId: customer-123
        orderId: order-abc
        currencyCode: GBP
        amount: 650
        metadata:
          productType: Clothing
        customer:
          emailAddress: john@primer.io
        order:
          lineItems:
            - itemId: t-shirt-1
              description: White T-Shirt
              amount: 500
              quantity: 1
          fees:
            - type: SURCHARGE
              amount: 100
          shipping:
            amount: 50
          paymentMethod:
            vaultOnSuccess: false
            vaultOn3DS: false
            options:
              GOOGLE_PAY:
                surcharge:
                  amount: 100
              PAYMENT_CARD:
                networks:
                  VISA:
                    surcharge:
                      amount: 10
                  MASTERCARD:
                    surcharge:
                      amount: 20
              PAY_NL_IDEAL:
                surcharge:
                  amount: 50
          authorizationType: ESTIMATED
    400ErrorResponse:
      title: 400ErrorResponse
      type: object
      required:
        - error
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ErrorObject'
            - type: object
              properties:
                paymentId:
                  title: Payment ID
                  type: string
                  description: Payment ID of the related pay
                paymentStatus:
                  title: Status
                  type: string
                  description: Status of the related payment
    422ErrorResponse:
      title: 422ErrorResponse
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
    Currency:
      title: Currency
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BOV
        - BRL
        - BSD
        - BTN
        - BWP
        - BYR
        - BYN
        - BZD
        - CAD
        - CDF
        - CHE
        - CHF
        - CHW
        - CLP
        - CNY
        - COP
        - COU
        - CRC
        - CUC
        - CUP
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ERN
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HRK
        - HTG
        - HUF
        - IDR
        - ILS
        - INR
        - IQD
        - IRR
        - ISK
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KPW
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MKD
        - MMK
        - MNT
        - MOP
        - MRO
        - MUR
        - MVR
        - MWK
        - MXN
        - MXV
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SDG
        - SEK
        - SGD
        - SHP
        - SOS
        - SRD
        - SSP
        - SVC
        - SYP
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VND
        - VUV
        - WST
        - XAF
        - XAG
        - XAU
        - XBA
        - XBB
        - XBC
        - XBD
        - XCD
        - XDR
        - XFU
        - XOF
        - XPD
        - XPF
        - XPT
        - XSU
        - XTS
        - XUA
        - YER
        - ZAR
        - ZMW
        - ZWL
      description: >
        3-letter currency code in <a
        href='https://en.wikipedia.org/wiki/ISO_4217#Active_codes'>ISO 4217</a>
        format, 

        e.g. <code>USD</code> for US dollars.
    CustomerDetailsAPISchema:
      title: CustomerDetailsAPISchema
      type: object
      properties:
        emailAddress:
          title: Email Address
          type: string
          description: >
            Customer email address.


            Note: It is recommended to include this field if a 3DS check will be
            performed
          format: email
        mobileNumber:
          title: Mobile Number
          type: string
          description: The customer's mobile number
          maxLength: 255
        firstName:
          title: First Name
          type: string
          description: The customer's first name
          maxLength: 255
        lastName:
          title: Last Name
          type: string
          description: The customer's last name
          maxLength: 255
        billingAddress:
          $ref: '#/components/schemas/OptionalAddressAPISchema'
          title: Billing Address
          description: >
            Customer billing address.


            Note: It is recommended to include this field if a 3DS check will be
            performed
        shippingAddress:
          $ref: '#/components/schemas/OptionalAddressAPISchema'
          title: Shipping Address
          description: Customer shipping address
        taxId:
          title: Tax ID
          type: string
          description: The customer's tax id number for tax exemptions
          maxLength: 255
        nationalDocumentId:
          title: National Document ID
          type: string
          description: The customer's national identification number
          maxLength: 255
    OrderDetailsAPISchema:
      title: OrderDetailsAPISchema
      type: object
      properties:
        lineItems:
          title: Line Items
          type: array
          items:
            $ref: '#/components/schemas/OrderLineItemsAPISchema'
          description: The details of the line items of the order.
        countryCode:
          $ref: '#/components/schemas/CountryCodeEnum'
          title: Country Code
          description: The country in which the order is created
        retailerCountryCode:
          $ref: '#/components/schemas/CountryCodeEnum'
          title: Retailer Country Code
          description: The country code of the retailer
        fees:
          title: Fee Details
          type: array
          items:
            $ref: '#/components/schemas/OrderFeesAPISchema'
          description: The details of fees charged.
        shipping:
          $ref: '#/components/schemas/OrderShippingAPISchema'
          title: Shipping Details
          description: The details of shipping charged.
    CheckoutResponsePaymentMethodOptionsAPISchema:
      title: CheckoutResponsePaymentMethodOptionsAPISchema
      required:
        - vaultOnSuccess
        - vaultOn3DS
        - vaultOnAgreement
        - orderedAllowedCardNetworks
      type: object
      properties:
        vaultOnSuccess:
          type: boolean
          description: >-
            Whether the payment method should be vaulted on a successful payment
            or not.
          default: false
        vaultOn3DS:
          type: boolean
          description: >-
            Whether the payment method should be vaulted after a successful 3DS
            authentication or not.
          default: false
        vaultOnAgreement:
          type: boolean
          description: >-
            Whether the payment method should be vaulted right when payment is
            created or not.
          default: false
        descriptor:
          title: Payment descriptor
          type: string
          description: >-
            A description of the payment, as it would typically appear on a bank
            statement.
          maxLength: 255
        paymentType:
          $ref: '#/components/schemas/RecurringPaymentTypeSchema'
        orderedAllowedCardNetworks:
          title: Allowed card networks
          type: array
          items:
            $ref: '#/components/schemas/CardNetworkEnum'
          description: >
            If provided, the checkout will run the validation on the entered
            card number and raise an error in case the card network is not
            supported.


            The order sets the default card network that should be used in the
            case of co-badged cards. 

            e.g. in the case of `["VISA", "CARTES_BANCAIRES", "MASTERCARD"]` -
            if the user enters a "Visa" / "Cartes Bancaires" card: the default
            is Visa.


            Values should be unique. 


            If `null` or nothing passed in the request, the following list with
            all card networks will be returned in the response:


            `["VISA", "MASTERCARD", "AMEX", "MAESTRO", "UNIONPAY",
            "CARTES_BANCAIRES", "DANKORT", "DINERS_CLUB", "DISCOVER", "EFTPOS",
            "ENROUTE", "ELO", "HIPER", "INTERAC", "JCB", "MIR", "OTHER"]`
        options:
          title: Payment Method Options
          type: object
          description: >
            Additional options for the payment methods represented as
            dictionary 

            with key of [available payment
            methods](/docs/connections/payment-methods/available-payment-methods)
            and value of corresponding options.
          properties:
            <PAYMENT_METHOD_TYPE>:
              $ref: '#/components/schemas/CheckoutPaymentMethodOptionAPISchema'
              type: object
            APPLE_PAY:
              $ref: >-
                #/components/schemas/CheckoutPaymentMethodApplePayOptionAPISchema
              type: object
            PAYMENT_CARD:
              $ref: '#/components/schemas/CheckoutPaymentMethodCardOptionAPISchema'
              type: object
        authorizationType:
          $ref: '#/components/schemas/AuthorizationTypeEnum'
          title: Authorization Type
          description: >
            Allows to adjust the authorized amount after the authorization, if
            supported by payment method.

            `FINAL` - the authorized amount is final and can not be adjusted.
            Adjusting the amount can be only done via canceling the payment and
            re-authorization with new amount.

            `ESTIMATED` - the amount can be adjusted after the authorization, if
            supported by payment method.
        firstPaymentReason:
          $ref: '#/components/schemas/FirstPaymentReasonEnum'
          title: First Payment Reason
          description: >
            The reason for the first payment. This is used for informing payment
            processors about the specific reason a payment method is being
            stored.

            Defaults to None if not provided.
    ErrorObject:
      title: Error
      type: object
      description: An object containing information about the error that occurred.
      required:
        - errorId
        - description
      properties:
        errorId:
          title: Error ID
          type: string
          description: An error ID
        description:
          title: Error description
          type: string
          description: A human readable description of the error
        recoverySuggestion:
          title: Recovery Suggestion
          type: string
          description: A suggestion on how to recover from the error.
        diagnosticsId:
          title: Error diagnostics ID
          type: string
          description: >-
            An ID that you can quote when contacting the Primer support team via
            our [Support
            Portal](https://primerapi.atlassian.net/servicedesk/customer/portal/11).
        validationErrors:
          title: Validation Errors
          type: array
          items:
            type: object
          description: Returned in case of a badly formed request
    OptionalAddressAPISchema:
      title: OptionalAddressAPISchema
      type: object
      properties:
        firstName:
          title: First Name
          type: string
          minLength: 1
          maxLength: 512
        lastName:
          title: Last Name
          type: string
          minLength: 1
          maxLength: 512
        addressLine1:
          title: Address Line 1
          type: string
          description: Street name, Company name or PO Box
          minLength: 1
          maxLength: 255
        addressLine2:
          title: Address Line 2
          type: string
          description: Apartment, Unit or Building number
          maxLength: 255
        city:
          title: City
          type: string
          description: Name of the city, district, town or village
          minLength: 1
          maxLength: 255
        state:
          title: State
          type: string
          description: State, County or Province
          minLength: 1
          maxLength: 255
        countryCode:
          $ref: '#/components/schemas/CountryCodeEnum'
          title: Country Code
          description: Two letter ISO country code
        postalCode:
          title: Postal Code
          type: string
          description: Postal or ZIP code
          minLength: 1
          maxLength: 255
    OrderLineItemsAPISchema:
      title: OrderLineItemsAPISchema
      description: |
        The details of the line items of the order.

        The total amount of a line item is calculated like so: 
        ````
          totalAmount = (amount * quantity) - discountAmount + taxAmount
        ```
      type: object
      required:
        - amount
      properties:
        itemId:
          title: Item ID
          type: string
          description: A unique identifier for the line item.
          minLength: 1
          maxLength: 255
        name:
          title: Name
          type: string
          description: A name of the item.
          maxLength: 255
        description:
          title: Item ID
          type: string
          description: A description of the item.
          maxLength: 255
        amount:
          minimum: 0
          type: integer
          format: int64
          description: >-
            The amount charged to the customer, in minor units. The minimum
            amount is 0. The maximum amount is the limit of `int64`.
        quantity:
          type: integer
          description: The number of the particular line item that is being ordered.
          default: 1
          format: int64
        discountAmount:
          title: Discount Amount
          minimum: 0
          type: integer
          format: int64
          description: >-
            Any discount applicable to this item, in minor units. This discount
            is applied for the entire line item, and not per `quantity`.
        taxAmount:
          title: Tax Amount
          minimum: 0
          type: integer
          format: int64
          description: >-
            The tax charged on this item, in minor units. This tax amount is
            applied for the entire line item, and not per `quantity`.
        taxCode:
          title: Tax Code
          type: string
          description: >-
            The tax code associated with this item, in minor units. This is
            required for Primer-initiated tax calculations.
          minLength: 1
          maxLength: 255
        productType:
          $ref: '#/components/schemas/ProductTypeEnum'
          title: Product Type
          description: An identifier for the product type.
        productData:
          $ref: '#/components/schemas/OrderLineItemsProductDataAPISchema'
          title: Product Data
          description: Details related to the product
    CountryCodeEnum:
      title: CountryCodeEnum
      enum:
        - AW
        - AF
        - AO
        - AI
        - AX
        - AL
        - AD
        - AE
        - AR
        - AM
        - AS
        - AQ
        - TF
        - AG
        - AU
        - AT
        - AZ
        - BI
        - BE
        - BJ
        - BQ
        - BF
        - BD
        - BG
        - BH
        - BS
        - BA
        - BL
        - BY
        - BZ
        - BM
        - BO
        - BR
        - BB
        - BN
        - BT
        - BV
        - BW
        - CF
        - CA
        - CC
        - CH
        - CL
        - CN
        - CI
        - CM
        - CD
        - CG
        - CK
        - CO
        - KM
        - CV
        - CR
        - CU
        - CW
        - CX
        - KY
        - CY
        - CZ
        - DE
        - DJ
        - DM
        - DK
        - DO
        - DZ
        - EC
        - EG
        - ER
        - EH
        - ES
        - EE
        - ET
        - FI
        - FJ
        - FK
        - FR
        - FO
        - FM
        - GA
        - GB
        - GE
        - GG
        - GH
        - GI
        - GN
        - GP
        - GM
        - GW
        - GQ
        - GR
        - GD
        - GL
        - GT
        - GF
        - GU
        - GY
        - HK
        - HM
        - HN
        - HR
        - HT
        - HU
        - ID
        - IM
        - IN
        - IO
        - IE
        - IR
        - IQ
        - IS
        - IL
        - IT
        - JM
        - JE
        - JO
        - JP
        - KZ
        - KE
        - KG
        - KH
        - KI
        - KN
        - KR
        - KW
        - LA
        - LB
        - LR
        - LY
        - LC
        - LI
        - LK
        - LS
        - LT
        - LU
        - LV
        - MO
        - MF
        - MA
        - MC
        - MD
        - MG
        - MV
        - MX
        - MH
        - MK
        - ML
        - MT
        - MM
        - ME
        - MN
        - MP
        - MZ
        - MR
        - MS
        - MQ
        - MU
        - MW
        - MY
        - YT
        - NA
        - NC
        - NE
        - NF
        - NG
        - NI
        - NU
        - NL
        - 'NO'
        - NP
        - NR
        - NZ
        - OM
        - PK
        - PA
        - PN
        - PE
        - PH
        - PW
        - PG
        - PL
        - PR
        - KP
        - PT
        - PY
        - PS
        - PF
        - QA
        - RE
        - RO
        - RU
        - RW
        - SA
        - SD
        - SN
        - SG
        - GS
        - SH
        - SJ
        - SB
        - SL
        - SV
        - SM
        - SO
        - PM
        - RS
        - SS
        - ST
        - SR
        - SK
        - SI
        - SE
        - SZ
        - SX
        - SC
        - SY
        - TC
        - TD
        - TG
        - TH
        - TJ
        - TK
        - TM
        - TL
        - TO
        - TT
        - TN
        - TR
        - TV
        - TW
        - TZ
        - UG
        - UA
        - UM
        - UY
        - US
        - UZ
        - VA
        - VC
        - VE
        - VG
        - VI
        - VN
        - VU
        - WF
        - WS
        - YE
        - ZA
        - ZM
        - ZW
      description: >
        2-letter country code in <a
        href='https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements'>ISO
        3166-1 alpha</a> format, 

        e.g. <code>FR</code> for France and <code>GB</code> for the United
        Kingdom.
    OrderFeesAPISchema:
      title: OrderFeesAPISchema
      type: object
      required:
        - amount
      properties:
        amount:
          minimum: 0
          type: integer
          format: int64
          description: >-
            The fee amount charged to the customer, in minor  units. e.g. for
            $7, use `700`.
        type:
          type: string
          description: The type of fee.
          minLength: 1
          maxLength: 255
        description:
          type: string
          description: A description of the fee, e.g. "Currency Conversion Fee".
          minLength: 1
          maxLength: 255
    OrderShippingAPISchema:
      title: OrderShippingAPISchema
      type: object
      properties:
        amount:
          minimum: 0
          type: integer
          format: int64
          description: >-
            The shipping amount charged to the customer, in minor units. e.g.
            for $7, use `700`.
        methodId:
          type: string
          description: >-
            Your unique identifier of the shipping method selected by the
            customer.
        methodName:
          type: string
          description: >-
            The display label for the selected shipping method (e.g. "Standard
            Shipping").
        methodDescription:
          type: string
          description: >-
            The descriptive text that is displayed alongside the shipping method
            name.
    RecurringPaymentTypeSchema:
      title: Recurring Payment Type
      type: string
      enum:
        - FIRST_PAYMENT
        - ECOMMERCE
        - SUBSCRIPTION
        - UNSCHEDULED
      description: >
        Payment types, primarily to be used for recurring payments.

        See the table below for all possible values. 


        Note: if no field is set, we will return a blank value and make a best
        effort

        to calculate the downstream fields required for processing the payment.


        | paymentType | Use case |

        | --- | --- |

        | `FIRST_PAYMENT` | a customer-initiated payment which is the first in a
        series of recurring payments or subscription, or a card on file
        scenario. |

        | `ECOMMERCE` | a customer-initiated payment using stored payment
        details where the cardholder is present. |

        | `SUBSCRIPTION` | a merchant-initiated payment as part of a series of
        payments on a fixed schedule and a set amount. |

        | `UNSCHEDULED` | a merchant-initiated payment using stored payment
        details with no fixed schedule or amount. |
    CardNetworkEnum:
      title: CardNetworkEnum
      enum:
        - AMEX
        - DANKORT
        - DINERS_CLUB
        - DISCOVER
        - ENROUTE
        - ELO
        - HIPER
        - INTERAC
        - JCB
        - MAESTRO
        - MASTERCARD
        - MIR
        - PRIVATE_LABEL
        - UNIONPAY
        - VISA
        - CARTES_BANCAIRES
        - OTHER
      type: string
      description: |
        The list of available card networks.
    CheckoutPaymentMethodOptionAPISchema:
      title: PaymentMethodOptionAPISchema
      type: object
      description: |
        Options for the payment method of type `PAYMENT_METHOD_TYPE`.
      required:
        - surcharge
      properties:
        surcharge:
          $ref: '#/components/schemas/CheckoutPaymentMethodOptionSurchargeAPISchema'
          title: Surcharge
          description: Surcharge information
        extraMerchantData:
          $ref: >-
            #/components/schemas/CheckoutPaymentMethodOptionExtraMerchantDataAPISchema
          title: Extra Merchant Data
          description: >
            For payments using the Klarna payment method, depending on the
            merchant segment and/or 

            the services available to consumers, Klarna may require additional
            information regarding 

            the customer, the merchant and/or the purchase. This information,
            referred to as extra merchant 

            data (EMD), consist of data that is typically not available at the
            checkout, but which enables 

            Klarna to complete an assertive risk assessment, enable new
            promotional products and improve 

            conversion rates for a boost in performance.
        merchantName:
          title: Merchant name
          type: string
          description: >
            For payments using the Apple Pay payment method, use this field to
            override the default merchant 

            name for the Primer account from showing on the Apple Pay flow. For
            example, if your merchant 

            name on your account is "Company X" but you want to display a
            specific store name on the Apple Pay 

            flow, you can set the `merchantName` to "Store name A".
    CheckoutPaymentMethodApplePayOptionAPISchema:
      title: ApplePayOptions
      type: object
      description: >-
        Apple Pay configuration used in a client session's payment method
        options.
      properties:
        merchantName:
          type: string
          description: Display name for the merchant shown in the Apple Pay sheet.
          minLength: 1
          maxLength: 1024
        recurringPaymentRequest:
          $ref: '#/components/schemas/ApplePayRecurringRequest'
        deferredPaymentRequest:
          $ref: '#/components/schemas/ApplePayDeferredRequest'
        automaticReloadRequest:
          $ref: '#/components/schemas/ApplePayAutomaticReloadRequest'
      example:
        merchantName: My Store
        recurringPaymentRequest:
          paymentDescription: Monthly Subscription
          billingAgreement: You agree to pay monthly until you cancel.
          managementUrl: https://example.com/manage
          regularBilling:
            label: Monthly Plan
            amount: 999
            recurringStartDate: '2025-06-09T00:00:00Z'
            recurringIntervalUnit: month
    CheckoutPaymentMethodCardOptionAPISchema:
      title: Payment Method Card Option
      type: object
      properties:
        networks:
          $ref: '#/components/schemas/CheckoutPaymentMethodOptionCardNetworkAPISchema'
          title: Card networks
          description: >-
            Dictionary of available card networks as a key with value of Payment
            Method Card Network Option.
        captureVaultedCardCvv:
          type: boolean
          description: Whether to capture CVV for vaulted card.
    AuthorizationTypeEnum:
      title: AuthorizationTypeEnum
      enum:
        - ESTIMATED
        - FINAL
      type: string
      description: Type of authorization for the payment.
    FirstPaymentReasonEnum:
      title: FirstPaymentReasonEnum
      enum:
        - CardOnFile
        - Recurring
        - Unscheduled
      type: string
      description: >
        The reason for the first payment. This is used for informing payment
        processors about the specific reason a payment method is being stored.

        Defaults to None if not provided.
    ProductTypeEnum:
      title: ProductTypeEnum
      enum:
        - PHYSICAL
        - DIGITAL
      type: string
      description: An enumeration
    OrderLineItemsProductDataAPISchema:
      title: OrderLineItemsProductDataAPISchema
      description: Details related to the product
      type: object
      properties:
        sku:
          title: SKU
          type: string
          description: The product SKU
          minLength: 1
          maxLength: 255
        brand:
          title: Brand
          type: string
          description: The product brand
          minLength: 1
          maxLength: 255
        color:
          title: Color
          type: string
          description: The product color
          minLength: 1
          maxLength: 255
        globalTradeItemNumber:
          title: Global Trade Item Number
          type: string
          description: The product Global Trade Item Number (e.g. ISBN)
          minLength: 1
          maxLength: 255
        manufacturerPartNumber:
          title: Manufacturer Part Number
          type: string
          description: The product Manufacturer Part Number
          minLength: 1
          maxLength: 255
        weight:
          title: Weight
          type: number
          description: The product weight
          minimum: 0
        weightUnit:
          title: Weight Unit
          type: string
          description: The product weight unit (e.g. kg, g)
          minLength: 1
          maxLength: 255
        pageUrl:
          title: Page URL
          type: string
          description: The product page URL
          minLength: 1
          maxLength: 1024
    CheckoutPaymentMethodOptionSurchargeAPISchema:
      title: CheckoutPaymentMethodOptionSurchargeAPISchema
      type: object
      properties:
        amount:
          type: integer
          minimum: 0
          format: int64
          description: >-
            The surcharge amount, in minor units. Surcharge amount must be used
            in conjunction with line item amounts, if a top level amount is
            passed then surcharge will not be calculated.
    CheckoutPaymentMethodOptionExtraMerchantDataAPISchema:
      title: CheckoutPaymentMethodOptionExtraMerchantDataAPISchema
      type: object
      additionalProperties: true
    ApplePayRecurringRequest:
      title: ApplePayRecurringRequest
      type: object
      required:
        - managementUrl
        - regularBilling
      properties:
        paymentDescription:
          $ref: '#/components/schemas/ApplePayPaymentDescription'
        billingAgreement:
          $ref: '#/components/schemas/ApplePayBillingAgreement'
        managementUrl:
          $ref: '#/components/schemas/ApplePayManagementUrl'
        regularBilling:
          $ref: '#/components/schemas/ApplePayRegularBilling'
        trialBilling:
          $ref: '#/components/schemas/ApplePayTrialBilling'
      example:
        paymentDescription: Subscription Service
        billingAgreement: >-
          You authorize us to charge your payment method monthly. You can cancel
          anytime.
        managementUrl: https://example.com/subscription
        regularBilling:
          label: Premium Plan
          amount: 1999
          recurringStartDate: '2024-06-03T00:00:00Z'
          recurringIntervalUnit: month
          recurringIntervalCount: 1
        trialBilling:
          label: Free Trial
          amount: 0
          recurringEndDate: '2024-06-09T00:00:00Z'
    ApplePayDeferredRequest:
      title: ApplePayDeferredRequest
      type: object
      required:
        - managementUrl
        - deferredBilling
      properties:
        paymentDescription:
          $ref: '#/components/schemas/ApplePayPaymentDescription'
        billingAgreement:
          $ref: '#/components/schemas/ApplePayBillingAgreement'
        managementUrl:
          $ref: '#/components/schemas/ApplePayManagementUrl'
        deferredBilling:
          $ref: '#/components/schemas/ApplePayDeferredBilling'
        freeCancellationDate:
          type: string
          format: date-time
          description: >
            End of billing cycle date and time (UTC) in [ISO 8601
            format](https://en.wikipedia.org/wiki/ISO_8601).
        freeCancellationTimeZone:
          type: string
          minLength: 3
          maxLength: 50
          description: Time zone for interpreting freeCancellationDate.
      example:
        paymentDescription: Deferred Payment
        billingAgreement: >-
          You will be charged when the item ships. Free cancellation until
          shipping.
        managementUrl: https://example.com/orders
        deferredBilling:
          label: Order Payment
          amount: 4999
          deferredPaymentDate: '2024-07-03T00:00:00Z'
        freeCancellationDate: '2024-07-02T00:00:00Z'
        freeCancellationTimeZone: UTC
    ApplePayAutomaticReloadRequest:
      title: ApplePayAutomaticReloadRequest
      type: object
      required:
        - managementUrl
        - automaticReloadBilling
      properties:
        paymentDescription:
          $ref: '#/components/schemas/ApplePayPaymentDescription'
        billingAgreement:
          $ref: '#/components/schemas/ApplePayBillingAgreement'
        managementUrl:
          $ref: '#/components/schemas/ApplePayManagementUrl'
        automaticReloadBilling:
          $ref: '#/components/schemas/ApplePayAutomaticReloadBilling'
      example:
        paymentDescription: Account Auto Reload
        billingAgreement: >-
          When your balance drops below the threshold, we'll automatically
          reload your account.
        managementUrl: https://example.com/account
        automaticReloadBilling:
          label: Auto Reload
          amount: 2500
          automaticReloadThresholdAmount: 500
    CheckoutPaymentMethodOptionCardNetworkAPISchema:
      title: Payment Method Card Network Option
      type: object
      properties:
        AMEX:
          $ref: >-
            #/components/schemas/CheckoutPaymentMethodOptionCardNetworkSurchargeAPISchema
        CARTES_BANCAIRES:
          $ref: >-
            #/components/schemas/CheckoutPaymentMethodOptionCardNetworkSurchargeAPISchema
        DANKORT:
          $ref: >-
            #/components/schemas/CheckoutPaymentMethodOptionCardNetworkSurchargeAPISchema
        DINERS_CLUB:
          $ref: >-
            #/components/schemas/CheckoutPaymentMethodOptionCardNetworkSurchargeAPISchema
        DISCOVER:
          $ref: >-
            #/components/schemas/CheckoutPaymentMethodOptionCardNetworkSurchargeAPISchema
        ENROUTE:
          $ref: >-
            #/components/schemas/CheckoutPaymentMethodOptionCardNetworkSurchargeAPISchema
        ELO:
          $ref: >-
            #/components/schemas/CheckoutPaymentMethodOptionCardNetworkSurchargeAPISchema
        HIPER:
          $ref: >-
            #/components/schemas/CheckoutPaymentMethodOptionCardNetworkSurchargeAPISchema
        INTERAC:
          $ref: >-
            #/components/schemas/CheckoutPaymentMethodOptionCardNetworkSurchargeAPISchema
        JCB:
          $ref: >-
            #/components/schemas/CheckoutPaymentMethodOptionCardNetworkSurchargeAPISchema
        MAESTRO:
          $ref: >-
            #/components/schemas/CheckoutPaymentMethodOptionCardNetworkSurchargeAPISchema
        MASTERCARD:
          $ref: >-
            #/components/schemas/CheckoutPaymentMethodOptionCardNetworkSurchargeAPISchema
        MIR:
          $ref: >-
            #/components/schemas/CheckoutPaymentMethodOptionCardNetworkSurchargeAPISchema
        PRIVATE_LABEL:
          $ref: >-
            #/components/schemas/CheckoutPaymentMethodOptionCardNetworkSurchargeAPISchema
        UNIONPAY:
          $ref: >-
            #/components/schemas/CheckoutPaymentMethodOptionCardNetworkSurchargeAPISchema
        VISA:
          $ref: >-
            #/components/schemas/CheckoutPaymentMethodOptionCardNetworkSurchargeAPISchema
        OTHER:
          $ref: >-
            #/components/schemas/CheckoutPaymentMethodOptionCardNetworkSurchargeAPISchema
      additionalProperties: false
    ApplePayPaymentDescription:
      type: string
      minLength: 1
      maxLength: 1024
      description: |
        Text shown to the user during Apple Pay authorization.
    ApplePayBillingAgreement:
      type: string
      minLength: 1
      maxLength: 1024
      description: >
        Terms and conditions the user agrees to when authorizing Apple Pay
        billing.
    ApplePayManagementUrl:
      type: string
      format: uri
      minLength: 1
      maxLength: 1024
      description: >
        URL where users can manage or cancel their Apple Pay billing agreements
        or subscriptions.
    ApplePayRegularBilling:
      title: ApplePayRegularBilling
      type: object
      required:
        - label
      properties:
        label:
          $ref: '#/components/schemas/ApplePayLabel'
        amount:
          $ref: '#/components/schemas/Amount'
        recurringStartDate:
          type: string
          format: date-time
          description: >
            Start of billing cycle date and time (UTC) in [ISO 8601
            format](https://en.wikipedia.org/wiki/ISO_8601). If not provided,
            Apple Pay defaults it to now().
        recurringEndDate:
          type: string
          format: date-time
          description: >
            End of billing cycle date and time (UTC) in [ISO 8601
            format](https://en.wikipedia.org/wiki/ISO_8601).
        recurringIntervalUnit:
          $ref: '#/components/schemas/ApplePayIntervalUnit'
        recurringIntervalCount:
          $ref: '#/components/schemas/ApplePayIntervalCount'
      example:
        label: Monthly Subscription
        amount: 999
        recurringStartDate: '2024-06-03T00:00:00Z'
        recurringIntervalUnit: month
    ApplePayTrialBilling:
      title: ApplePayTrialBilling
      type: object
      required:
        - label
      properties:
        label:
          $ref: '#/components/schemas/ApplePayLabel'
        amount:
          allOf:
            - $ref: '#/components/schemas/Amount'
          default: 0
        recurringStartDate:
          type: string
          format: date-time
          description: >
            Start of billing cycle date and time (UTC) in [ISO 8601
            format](https://en.wikipedia.org/wiki/ISO_8601). If not provided,
            Apple Pay defaults it to now().
        recurringEndDate:
          type: string
          format: date-time
          description: >
            End of billing cycle date and time (UTC) in [ISO 8601
            format](https://en.wikipedia.org/wiki/ISO_8601).
        recurringIntervalUnit:
          $ref: '#/components/schemas/ApplePayIntervalUnit'
        recurringIntervalCount:
          $ref: '#/components/schemas/ApplePayIntervalCount'
      example:
        label: Free Trial
        amount: 0
        recurringEndDate: '2024-06-09T00:00:00Z'
    ApplePayDeferredBilling:
      title: ApplePayDeferredBilling
      type: object
      required:
        - label
        - deferredPaymentDate
      properties:
        label:
          $ref: '#/components/schemas/ApplePayLabel'
        amount:
          $ref: '#/components/schemas/Amount'
        deferredPaymentDate:
          type: string
          format: date-time
          description: >
            Start of billing cycle date and time (UTC) in [ISO 8601
            format](https://en.wikipedia.org/wiki/ISO_8601).
      example:
        label: Product Payment
        amount: 4999
        deferredPaymentDate: '2024-07-03T00:00:00Z'
    ApplePayAutomaticReloadBilling:
      title: ApplePayAutomaticReloadBilling
      type: object
      required:
        - label
        - automaticReloadThresholdAmount
      properties:
        label:
          $ref: '#/components/schemas/ApplePayLabel'
        amount:
          $ref: '#/components/schemas/Amount'
        automaticReloadThresholdAmount:
          type: integer
          format: int64
          minimum: 0
          description: >-
            Balance threshold in minor units (e.g., 500 = $5.00) that triggers
            the reload.
      example:
        label: Auto Reload
        amount: 2500
        automaticReloadThresholdAmount: 500
    CheckoutPaymentMethodOptionCardNetworkSurchargeAPISchema:
      type: object
      properties:
        surcharge:
          $ref: '#/components/schemas/CheckoutPaymentMethodOptionSurchargeAPISchema'
          title: Surcharge
          description: Surcharge information
    ApplePayLabel:
      type: string
      minLength: 1
      maxLength: 1024
      description: >
        Display label shown in the Apple Pay sheet to describe this billing
        option.
    Amount:
      type: integer
      format: int64
      minimum: 0
      description: >
        Charge amount in minor units (e.g., 500 = $5.00). Some currencies, such
        as Japanese Yen, do not have minor units. In this case, use the value
        as-is (e.g., ¥100 = 100).
    ApplePayIntervalUnit:
      type: string
      enum:
        - minute
        - hour
        - day
        - month
        - year
      description: |
        Calendar unit representing part of a recurring billing interval.
    ApplePayIntervalCount:
      type: integer
      format: int64
      minimum: 1
      description: >
        Number of calendar units that make up the full recurring interval (e.g.,
        1 = monthly).
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````