Primer Client Session API API

The Client Session API API from Primer — 1 operation(s) for client session api.

Operations 3

POST /client-session Create a client session #
GET /client-session Retrieve a client session #
PATCH /client-session Update client session #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/primer-client-session-api-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

primer-client-session-api-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  x-logo:
    url: https://apidocs.primer.io/docs/assets/images/primer-logo.svg
  title: Primer Client Session API
  version: '2.4'
  description: This API enforces a timeout of 90 seconds for all requests. A 504 response indicates a timeout occurred.
servers:
- url: https://api.sandbox.primer.io
- url: https://api.primer.io
security:
- ApiKeyAuth: []
tags:
- name: Client Session API
paths:
  /client-session:
    post:
      tags:
      - Client Session API
      summary: Create a client session
      description: "Creating a client session generates a client token: a temporary key used to initialize [Universal Checkout](/docs/get-started/set-up-a-checkout) and authenticate it against your account.\n\nUniversal Checkout automatically retrieves all the settings from the client session and the Dashboard to configure the payment methods and the checkout experience.\n\n<b>Note:</b>\nWhen creating a Client Session, please make sure to provide `currencyCode`, `orderId`, and at least one of `amount` or `lineItems`. \nIf any of these are not yet available, you can provide them when making the payment request.\n\n<code>POST /client-session</code> does not have required fields as all fields are not always known when a client session is created. \nUse <code>PATCH /client-session</code> to update the parameters throughout the checkout session.\n\nClient tokens expire after 24 hours.\n"
      operationId: create_client_side_token_client_session_post
      parameters:
      - $ref: '#/components/parameters/ApiVersionHeader'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientSessionAPIRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientSessionWithTokenAPIResponse'
        '400':
          description: Error Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400ErrorResponse'
              examples:
                ClientSessionValidationError:
                  summary: The client token is invalid.
                  value:
                    error:
                      errorId: ClientSessionValidationError
                      description: The client token is invalid.
                      recoverySuggestion: Please provide a valid client token.
                      diagnosticsId: '1234567898'
                MetadataContainsEmptyKey:
                  summary: Metadata field contains empty string key.
                  value:
                    error:
                      errorId: MetadataContainsEmptyKey
                      description: Metadata field contains empty string key.
                      recoverySuggestion: Either remove empty string keys or provide non-empty string instead.
                      diagnosticsId: '1234567898'
        '422':
          description: Error Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422ErrorResponse'
              example:
                error:
                  errorId: RequestValidationError
                  description: We were unable to validate your request, please check your payload against /docs/api
                  diagnosticsId: '1234567898'
                  validationErrors:
                  - model: ClientSessionAPIRequest
                    errors:
                    - path: $.customerId
                      description: Value must be a valid string
    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'
    patch:
      tags:
      - Client Session API
      summary: Update client session
      description: 'You can update a clients session created earlier with the `PATCH /client-session` [API call](#operation/create_client_side_token_client_session_post).


        The only required field for the request is `clientToken`. Other supported request fields are same as for the `POST /client-session` [API call](#operation/create_client_side_token_client_session_post).


        You need to specify only the fields you wish to update. However, if the items to be updated are arrays (e.g.`lineItems`), you need to provide the entire array, including any new or modified items. Primer will replace the full array with whatever is sent in the request. If you want to keep existing items, make sure to include them in your request, anything omitted will be removed.


        If you wish to update nested fields on the client session, such as the customer `emailAddress` field, you can pass the `customer` object with only one field, `emailAddress`, to update.


        If you simply wish to clear the value of the field, pass `null` as your input.


        You can update `paymentMethod.vaultOnSuccess` field but updating of the `paymentMethod.options` field through `PATCH /client-session` is not supported.


        The response will contain all the fields of the client session including the ones that were changed.

        '
      operationId: update_client_side_token_client_session_patch
      parameters:
      - $ref: '#/components/parameters/ApiVersionHeader'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientSessionUpdateAPIRequest'
              title: Request
      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'
              examples:
                ClientSessionValidationError:
                  summary: The client token is invalid.
                  value:
                    error:
                      errorId: ClientSessionValidationError
                      description: The client token is invalid.
                      recoverySuggestion: Please provide a valid client token.
                      diagnosticsId: '1234567898'
                MetadataContainsEmptyKey:
                  summary: Metadata field contains empty string key.
                  value:
                    error:
                      errorId: MetadataContainsEmptyKey
                      description: Metadata field contains empty string key.
                      recoverySuggestion: Either remove empty string keys or provide non-empty string instead.
                      diagnosticsId: '1234567898'
        '422':
          description: Error Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422ErrorResponse'
components:
  schemas:
    OrderLineItemsAPISchema:
      title: OrderLineItemsAPISchema
      description: "The details of the line items of the order.\n\nThe total amount of a line item is calculated like so: \n````\n  totalAmount = (amount * quantity) - discountAmount + taxAmount\n```\n"
      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.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.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.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
    ProductTypeEnum:
      title: ProductTypeEnum
      enum:
      - PHYSICAL
      - DIGITAL
      type: string
      description: An enumeration
    ClientSessionAPIRequest:
      title: ClientSessionAPIRequest
      type: object
      properties:
        orderId:
          title: Order identifier
          type: string
          description: Your reference for the payment.
          minLength: 1
          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.0
          type: integer
          format: int64
          description: 'The amount you would like to charge the customer, in minor units. e.g. for $7, use `700`.


            Some currencies, such as Japanese Yen, do not have minor units. In this case you should use the value as it is, without any formatting. For example for ¥100, use `100`.


            If the amount is provided on this level, it would override any amount calculated from the provided line items, shipping and other amounts.'
        order:
          $ref: '#/components/schemas/OrderDetailsAPISchema'
          title: Order Details
          description: More information associated with the order.
        customerId:
          title: The ID of the customer using the checkout
          type: string
          description: 'A unique identifier for your customer.

            Create a client session token with a `customerId` to enable the client-side SDK to retrieve and manage your customer''s saved payment methods. A client session token also enables saving payment methods against this customer id.'
          minLength: 1
          maxLength: 255
        customer:
          $ref: '#/components/schemas/CheckoutCustomerDetailsAPISchema'
          title: Customer Details
          description: More information associated with the customer.
        metadata:
          title: Payment Metadata
          type: object
          description: 'Additional data to be used throughout the payment lifecycle.


            A dictionary of key-value pairs where the values can only be strings or

            integers.


            e.g. `{"productId": 1001, "merchantId": "a13bsd62s"}`

            '
        paymentMethod:
          $ref: '#/components/schemas/CheckoutPaymentMethodOptionsAPISchema'
          title: Payment Method Options
          description: Enable certain options associated with the payment method.
      additionalProperties: false
      example:
        orderId: order-abc
        currencyCode: GBP
        amount: 1000
        order:
          countryCode: FR,
          lineItems:
          - itemId: shoe-123
            description: Blue Shoe
            amount: 100
            quantity: 10
        customerId: customer-123
        customer:
          emailAddress: john@primer.io
        metadata:
          productType: Shoes
        paymentMethod:
          descriptor: 'Purchase: Shoes'
          paymentMethodType: PAYMENT_CARD
          vaultOnSuccess: true
          vaultOn3DS: false
          options:
            PAYMENT_CARD:
              networks:
                VISA:
                  surcharge:
                    amount: 10
            GOOGLE_PAY:
              surcharge:
                amount: 20
          authorizationType: ESTIMATED
    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.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
    ApplePayLabel:
      type: string
      minLength: 1
      maxLength: 1024
      description: 'Display label shown in the Apple Pay sheet to describe this billing option.

        '
    ClientSessionWarningsAPIResponse:
      title: ClientSessionWarningsAPIResponse
      type: object
      properties:
        type:
          type: string
          description: The type of the connection involved
          example: TAXJAR
        code:
          type: string
          description: A unique code describing the particular issue
          example: MISSING_DATA
        message:
          type: string
          description: More information as to the reason for the warning
    RecurringTransactionTypeEnum:
      title: RecurringTransactionTypeEnum
      enum:
      - FIRST_PAYMENT
      - ECOMMERCE
      - SUBSCRIPTION
      - UNSCHEDULED
      type: string
      description: An enumeration.
    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
    AuthorizationTypeEnum:
      title: AuthorizationTypeEnum
      enum:
      - ESTIMATED
      - FINAL
      type: string
      description: Type of authorization for the payment.
    CheckoutPaymentMethodOptionsAPISchema:
      title: PaymentMethodOptionsAPISchema
      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.\n\nThe order sets the default card network that should be used in the case of co-badged cards. \ne.g. in the case of `[\"VISA\", \"CARTES_BANCAIRES\", \"MASTERCARD\"]` - if the user enters a \"Visa\" / \"Cartes Bancaires\" card: the default is Visa.\n\nValues should be unique. \n\nIf `null` or nothing passed in the request, the following list with all card networks will be returned in the response:\n\n`[\"VISA\", \"MASTERCARD\", \"AMEX\", \"MAESTRO\", \"UNIONPAY\", \"CARTES_BANCAIRES\", \"DANKORT\", \"DINERS_CLUB\", \"DISCOVER\", \"EFTPOS\", \"ENROUTE\", \"ELO\", \"HIPER\", \"INTERAC\", \"JCB\", \"MIR\", \"OTHER\"]`\n"
        options:
          title: Payment Method Options
          type: object
          description: "Additional options for the payment methods represented as dictionary \nwith key of [available payment methods](/docs/connections/payment-methods/available-payment-methods) and value of corresponding options.\n"
          properties:
            <PAYMENT_METHOD_TYPE>:
              type: object
              $ref: '#/components/schemas/CheckoutPaymentMethodOptionAPISchema'
            APPLE_PAY:
              type: object
              $ref: '#/components/schemas/CheckoutPaymentMethodApplePayOptionAPISchema'
            PAYMENT_CARD:
              type: object
              $ref: '#/components/schemas/CheckoutPaymentMethodCardOptionAPISchema'
        authorizationType:
          title: Authorization Type
          $ref: '#/components/schemas/AuthorizationTypeEnum'
          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:
          title: First Payment Reason
          $ref: '#/components/schemas/FirstPaymentReasonEnum'
          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.

            '
    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
    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'
    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
    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.

        '
    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'
    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
    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'
    ApplePayManagementUrl:
      type: string
      format: uri
      minLength: 1
      maxLength: 1024
      description: 'URL where users can manage or cancel their Apple Pay billing agreements or subscriptions.

        '
    ApplePayIntervalCount:
      type: integer
      format: int64
      minimum: 1
      description: 'Number of calendar units that make up the full recurring interval (e.g., 1 = monthly).

        '
    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).

        '
    ClientSessionUpdateAPIRequest:
      title: ClientSessionUpdateAPIRequest
      type: object
      properties:
        clientToken:
          title: Client token
          type: string
          description: Client token for use in the Primer-JS SDK obtained via `POST` /client-session API call.
        customerId:
          title: The ID of the customer using the checkout.
          type: string
          description: A unique identifier for your customer.
        orderId:
          title: Order ID
          type: string
          description: Your reference for the order.
        currencyCode:
          title: Currency
          type: string
          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.0
          type: integer
          format: int64
          description: 'The amount you would like to charge the customer, in minor units. e.g. for $7, use `700`.


            Some currencies, such as Japanese Yen, do not have minor units. In this case you should use the value as it is, without any formatting. For example for ¥100, use `100`.


            If the amount is provided on this level, it would override any amount calculated from the provided line items, shipping and other amounts.'
        metadata:
          title: Payment Metadata
          type: object
          description: 'Additional data to be used throughout the payment lifecycle.


            Provide the entire object to update it. Anything provided previously will be overwritten.

            '
        customer:
          $ref: '#/components/schemas/CheckoutCustomerDetailsAPISchema'
          title: Customer Details
          description: 'More information associated with the customer.


            Each of the fields in this object must be updated in its entirety, i.e. provide the entire object to update it. Anything provided previously will be overwritten.

            '
        order:
          $ref: '#/components/schemas/OrderDetailsAPISchema'
          title: Order Details
          description: 'More information associated with the order.


            Each of the fields in this object must be updated in its entirety, i.e. provide the entire object to update it. Anything provided previously will be overwritten.

            '
        paymentMethod:
          $ref: '#/components/schemas/CheckoutPaymentMethodOptionsAPISchema'
          title: Payment Method Options
          description: Enable certain options associated with the payment method. Provide the entire object to update it. Anything provided previously will be overwritten.
      additionalProperties: false
      example:
        clientToken: client-session-token
        customerId: customer-123
        orderId: order-abc
        customer:
          emailAddress: john@primer.io
        amount: 500
        paymentMethod:
          authorizationType: FINAL
        order:
          lineItems:
          - itemId: shoe-123
            description: Blue Shoe
            amount: 100
            quantity: 10
          countryCode: FR
    CheckoutCustomerDetailsAPISchema:
      title: CustomerDetailsAPISchema
      type: object
      properties:
        emailAddress:
          title: Email Address
          type: string
          descri

# --- truncated at 32 KB (59 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/primer/refs/heads/main/openapi/primer-client-session-api-api-openapi.yml