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

# checkout

> Checkout a trip — returns a checkout URL the user opens to pay, plus the Shared Payment Token params an agent can use to pay programmatically

Checkout a trip — returns a checkout URL the user opens to pay, plus the Shared Payment Token params an agent can use to pay programmatically


## OpenAPI

````yaml api-reference/public-api.yaml POST /v1/checkout
openapi: 3.0.0
info:
  title: Jinko Public API
  version: 0.1.0
  description: >-
    Curated public REST surface for Jinko. Authenticated with jnk_ API keys. See
    https://docs.gojinko.com for guides.
servers: []
security: []
paths:
  /v1/checkout:
    post:
      tags:
        - Pricing & booking
      summary: >-
        Checkout a trip — returns a checkout URL the user opens to pay, plus the
        Shared Payment Token params an agent can use to pay programmatically
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckoutRequest'
      responses:
        '200':
          description: Checkout session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: BAD_REQUEST
                  message: Malformed JSON in request body.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: AUTH_REQUIRED
                  message: Invalid or expired API key.
                  doc_url: https://docs.gojinko.com/api-reference/authentication
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: BAD_REQUEST
                  message: >-
                    origins: origins is required; trip_type: trip_type is
                    required
                  doc_url: https://docs.gojinko.com/concepts/errors
        '429':
          description: Rate limit or quota exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: RATE_LIMITED
                  message: Rate limit or quota exceeded.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '502':
          description: Upstream service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UPSTREAM_ERROR
                  message: Upstream travel provider returned an error. Please retry.
                  doc_url: https://docs.gojinko.com/concepts/errors
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    CheckoutRequest:
      type: object
      properties:
        trip_id:
          type: string
          example: trip_1048576
        intent:
          $ref: '#/components/schemas/IntentInput'
      required:
        - trip_id
    CheckoutResponse:
      type: object
      properties:
        session_id:
          type: string
          example: cs_1048576
        checkout_url:
          type: string
          example: https://book.gojinko.com/checkout?sid=1048576
        status:
          type: string
          example: pending_payment
        expires_at:
          type: string
          example: '2026-06-01T13:04:56Z'
        total_amount:
          type: object
          properties:
            amount:
              type: number
              example: 318.4
            value:
              type: number
            currency:
              type: string
              example: USD
            decimal_places:
              type: integer
              example: 2
        items:
          type: array
          items:
            nullable: true
        agent_spt_params:
          $ref: '#/components/schemas/AgentSPTParams'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            doc_url:
              type: string
          required:
            - code
            - message
      required:
        - error
    IntentInput:
      type: object
      properties:
        user_intent:
          type: string
          nullable: true
          description: >-
            The user's natural-language intent: the Alpic PII-stripped
            paraphrase when available, else a best-effort fallback to the
            client-provided NL query.
          example: find a cheap flight to Tokyo
    AgentSPTParams:
      type: object
      properties:
        max_amount:
          type: integer
          description: >-
            Locked cart total in the smallest currency unit — scope the Shared
            Payment Token to at most this.
          example: 259449
        currency:
          type: string
          example: EUR
        stripe_profile:
          type: string
          description: >-
            Stripe Agentic Commerce network_business_profile id the SPT is
            granted against. Empty until the preview account is provisioned.
        expires_at:
          type: string
          example: '2026-06-10T13:04:56Z'
      required:
        - max_amount
        - currency
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````