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

# Preview Checkout Session

> Previews a checkout session from a QR token.



## OpenAPI

````yaml /api-reference/customer/openapi.json post /api/v1/customer/checkout-sessions/preview
openapi: 3.0.0
info:
  title: OABUS Customer API
  description: OABUS API
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/v1/customer/checkout-sessions/preview:
    post:
      tags:
        - CheckoutSession
      summary: Preview Checkout Session
      description: Previews a checkout session from a QR token.
      operationId: previewCheckoutSession
      parameters:
        - name: fields
          required: false
          in: query
          description: >-
            Comma-separated list of fields to include in the response. Supports
            dot notation for nested projection (e.g.
            `id,name,user.email,trips.route.id`). Unknown fields are silently
            dropped.
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/PreviewCheckoutSessionRequestBody'
      responses:
        '200':
          $ref: '#/components/responses/PreviewCheckoutSession200Response'
        '400':
          $ref: '#/components/responses/PreviewCheckoutSession400Response'
        '401':
          $ref: '#/components/responses/PreviewCheckoutSession401Response'
        '500':
          $ref: '#/components/responses/PreviewCheckoutSession500Response'
      security:
        - bearer: []
components:
  requestBodies:
    PreviewCheckoutSessionRequestBody:
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              qrToken:
                description: Raw QR token returned only on creation
                example: nL7m2oM5zMwdON44BpQ_WteULcSGMjQm53WJb5xVZC8
                nullable: true
                type: string
  responses:
    PreviewCheckoutSession200Response:
      content:
        application/json:
          schema:
            type: object
            properties:
              checkoutSessionId:
                type: string
                format: uuid
                description: Checkout session identifier
                example: 01981255-3c7a-7bd4-bb5f-8b47bc4dce91
              status:
                type: string
                enum:
                  - CREATED
                  - LINKED
                  - PREPARED
                  - CONFIRMED
                  - EXPIRED
                  - CANCELED
                description: Computed checkout session status
                example: CREATED
              paymentMethod:
                type: string
                enum:
                  - CASH
                  - CREDIT_GRANT
                description: Checkout payment method
                example: CASH
              expiresAt:
                type: string
                format: date-time
                description: Expiration date
                example: '2026-07-08T12:15:00.000Z'
              trip:
                type: object
                properties:
                  tripId:
                    type: string
                    format: uuid
                    description: Trip identifier
                    example: 0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a
                  status:
                    type: string
                    enum:
                      - SCHEDULED
                      - IN_PROGRESS
                      - COMPLETED
                      - CANCELLED
                    description: Trip status
                    example: SCHEDULED
                  departureAt:
                    type: string
                    format: date-time
                    description: Departure time
                    example: '2026-04-15T08:00:00.000Z'
                  estimatedArrivalAt:
                    type: string
                    format: date-time
                    description: Estimated arrival time
                    example: '2026-04-15T14:00:00.000Z'
                  itineraries:
                    type: array
                    items:
                      type: object
                      properties:
                        tripItineraryId:
                          type: string
                          format: uuid
                          description: Trip itinerary identifier
                          example: 0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a
                        tripId:
                          type: string
                          format: uuid
                          description: Trip identifier
                          example: 0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3b
                        price:
                          type: integer
                          description: Price in centavos
                          example: 15000
                        fromStop:
                          type: object
                          properties:
                            tripStopId:
                              type: string
                              format: uuid
                              description: Trip stop identifier
                              example: 0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a
                            stopOrder:
                              type: integer
                              description: Stop sequence order
                              example: 1
                            point:
                              type: object
                              properties:
                                description:
                                  description: Additional description
                                  example: Terminal Rodoviário Tietê
                                  nullable: true
                                  type: string
                                lat:
                                  description: Latitude
                                  example: -23.5155
                                  nullable: true
                                  type: number
                                  minimum: -90
                                  maximum: 90
                                lng:
                                  description: Longitude
                                  example: -46.6254
                                  nullable: true
                                  type: number
                                  minimum: -180
                                  maximum: 180
                                name:
                                  type: string
                                  description: Point name
                                  example: São Paulo
                                pointId:
                                  type: string
                                  format: uuid
                                  description: Point identifier
                                  example: 0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a
                              required:
                                - name
                                - pointId
                              additionalProperties: false
                              description: Stop point
                          required:
                            - tripStopId
                            - stopOrder
                            - point
                          additionalProperties: false
                          description: Origin stop
                        toStop:
                          type: object
                          properties:
                            tripStopId:
                              type: string
                              format: uuid
                              description: Trip stop identifier
                              example: 0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a
                            stopOrder:
                              type: integer
                              description: Stop sequence order
                              example: 1
                            point:
                              type: object
                              properties:
                                description:
                                  description: Additional description
                                  example: Terminal Rodoviário Tietê
                                  nullable: true
                                  type: string
                                lat:
                                  description: Latitude
                                  example: -23.5155
                                  nullable: true
                                  type: number
                                  minimum: -90
                                  maximum: 90
                                lng:
                                  description: Longitude
                                  example: -46.6254
                                  nullable: true
                                  type: number
                                  minimum: -180
                                  maximum: 180
                                name:
                                  type: string
                                  description: Point name
                                  example: São Paulo
                                pointId:
                                  type: string
                                  format: uuid
                                  description: Point identifier
                                  example: 0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a
                              required:
                                - name
                                - pointId
                              additionalProperties: false
                              description: Stop point
                          required:
                            - tripStopId
                            - stopOrder
                            - point
                          additionalProperties: false
                          description: Destination stop
                      required:
                        - tripItineraryId
                        - tripId
                        - price
                        - fromStop
                        - toStop
                      additionalProperties: false
                    description: Trip itineraries
                required:
                  - tripId
                  - status
                  - departureAt
                  - estimatedArrivalAt
                  - itineraries
                additionalProperties: false
                description: Session trip
            required:
              - checkoutSessionId
              - status
              - paymentMethod
              - expiresAt
              - trip
            additionalProperties: false
      description: OK
    PreviewCheckoutSession400Response:
      content:
        application/json:
          example:
            errors:
              - message: required
                path: name
            message: Bad Request Error
            statusCode: 400
          schema:
            properties:
              message:
                type: string
              statusCode:
                enum:
                  - 400
                type: number
              errors:
                items:
                  properties:
                    message:
                      type: string
                    path:
                      type: string
                  required:
                    - message
                    - path
                  type: object
                type: array
            required:
              - message
              - statusCode
            type: object
      description: Bad Request Error
    PreviewCheckoutSession401Response:
      content:
        application/json:
          example:
            message: Missing or invalid access token
            statusCode: 401
          schema:
            properties:
              message:
                type: string
              statusCode:
                enum:
                  - 401
                type: number
            required:
              - message
              - statusCode
            type: object
      description: Unauthorized
    PreviewCheckoutSession500Response:
      content:
        application/json:
          example:
            message: Internal Server Error
            statusCode: 500
          schema:
            properties:
              message:
                type: string
              statusCode:
                enum:
                  - 500
                type: number
            required:
              - message
              - statusCode
            type: object
      description: Internal Server Error
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````