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

> ## Agent Instructions
> Test in the sandbox first: base URL https://api-sandbox.y.uno (Test Mode in the Dashboard). Production is https://api.y.uno (Live Mode).
> Every API request needs the public-api-key and private-secret-key headers. Get them in the Dashboard at https://dashboard.y.uno/developers (Developers > Credentials); sandbox and production keys are different.
> Send an X-Idempotency-Key (a UUID) when creating payments, refunds and cancels, so retries do not create duplicates.
> Start with the Quickstart (https://docs.y.uno/docs/quickstart.md) and the agent guide (https://docs.y.uno/agents.md). To search these docs from a coding agent, connect the docs MCP server at https://docs.y.uno/mcp.

# Recuperar sessão de checkout

> Obtém os detalhes de uma sessão de checkout usando o seu identificador único

Esta requisição recupera uma sessão de checkout usando o identificador único dela.


## OpenAPI

````yaml openapi/pt-br/checkout-sessions/retrieve-checkout-session.json GET /checkout/sessions/{id}
openapi: 3.1.0
info:
  title: checkout-api
  version: 1.0.2
servers:
  - url: https://api-sandbox.y.uno/v1
    description: Sandbox
  - url: https://api.y.uno/v1
    description: Production (US)
security:
  - sec0: []
    sec1: []
paths:
  /checkout/sessions/{id}:
    get:
      summary: Consultar sessão de checkout
      operationId: get-checkout-session
      parameters:
        - name: id
          in: path
          description: O identificador único da sessão de checkout (UUID, 36 caracteres).
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    merchant_order_id: '1752072398'
                    country: AR
                    payment_description: Test Cards
                    customer_id: e937e18e-a684-4d7b-a1a1-ab64c10a941d
                    callback_url: >-
                      https://google.com/?checkoutSession=02caeb08-45c0-4670-9736-5bdee1b311f8
                    amount:
                      currency: ARS
                      value: 520
                    created_at: '2025-07-09T14:46:39.515251Z'
                    metadata: null
                    workflow: SDK_CHECKOUT
                    installments:
                      plan_id: null
                      plan: null
                    used: true
                    checkout_id: 6822f80c-684e-41a3-8628-78963d3d60f7
                    checkout_session: 87749bc1-1ce4-47f3-8745-72602bb6bcea
                    recurring_payment:
                      description: Monthly subscription
                      management_url: https://example.com/manage
                      billing_agreement: BA-123
                      regular_billing:
                        label: Monthly
                        amount: 9.99
                        interval_unit: month
                        interval_count: 1
                      trial_billing:
                        label: Free trial
                        amount: 0
                        interval_unit: month
                        interval_count: 1
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: >-
                      O identificador único da sessão de checkout (MAX 64; MIN
                      36).
                    example: 02caeb08-45c0-4670-9736-5bdee1b311f8
                  merchant_order_id:
                    type: string
                    description: >-
                      O identificador único do pedido do cliente (MAX 255; MIN
                      3).
                    example: '1752072398'
                  country:
                    type: string
                    description: >-
                      País onde a transação deve ser processada (MAX 2; MIN 2;
                      ISO 3166-1).
                    example: AR
                  payment_description:
                    type: string
                    description: A descrição do pagamento (MAX 255; MIN 3).
                    example: Test Cards
                  customer_id:
                    type: string
                    description: O identificador único do cliente (MAX 64; MIN 36).
                    example: e937e18e-a684-4d7b-a1a1-ab64c10a941d
                  callback_url:
                    type:
                      - string
                      - 'null'
                    description: >-
                      A URL para onde redirecionar o cliente após o pagamento
                      (MAX 526; MIN 3).
                    example: >-
                      https://google.com/?checkoutSession=02caeb08-45c0-4670-9736-5bdee1b311f8
                  amount:
                    type: object
                    description: >-
                      Especifica o objeto de valor do pagamento, com o valor e a
                      moeda.
                    properties:
                      currency:
                        type: string
                        description: >-
                          A moeda usada para fazer o pagamento (MAX 3; MIN 3;
                          ISO 4217).
                        example: ARS
                      value:
                        type: number
                        description: O valor do pagamento (múltiplo de 0.0001).
                        example: 520
                  created_at:
                    type: string
                    description: >-
                      Data e hora de criação da sessão de checkout (MAX 27; MIN
                      27; ISO 8601).
                    example: '2025-07-09T14:46:39.515251Z'
                  metadata:
                    type:
                      - array
                      - 'null'
                    description: >-
                      Especifica uma lista de objetos de metadados. Você pode
                      adicionar até 50 objetos de metadados.
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                          description: Especifica uma chave de metadados.
                          example: age
                        value:
                          type: string
                          description: Especifica o valor da chave de metadados definida.
                          example: '28'
                  workflow:
                    type: string
                    description: >-
                      O tipo de fluxo de pagamento que especifica como a sessão
                      de checkout será processada.
                    example: SDK_CHECKOUT
                  installments:
                    type: object
                    description: >-
                      O objeto para enviar o plano de parcelamento criado na
                      Yuno, para mostrar aos seus clientes e deixá-los escolher.
                    properties:
                      plan_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Especifica o id de um plano criado na Yuno para
                          mostrar ao seu cliente na sessão de checkout (MAX 64;
                          MIN 64).
                      plan:
                        type:
                          - array
                          - 'null'
                        description: >-
                          Parcelas a mostrar ao cliente com a sessão de
                          checkout.
                        items:
                          type: object
                          properties:
                            installment:
                              type: integer
                              description: >-
                                O número de parcelas mensais que os compradores
                                podem escolher.
                              example: 3
                            rate:
                              type: number
                              description: >-
                                A taxa que será aplicada pelo provedor de
                                pagamento ao valor final da transação ao usar
                                parcelas.
                              example: 1.5
                  used:
                    type: boolean
                    description: >-
                      Especifica se uma sessão de checkout já foi usada
                      anteriormente ou não.
                    example: true
                  checkout_id:
                    type: string
                    example: 6822f80c-684e-41a3-8628-78963d3d60f7
                  wallet_card_acceptance:
                    type: object
                    description: >-
                      Regras de aceitação de cartão enviadas quando a sessão de
                      checkout foi criada. Retornadas somente quando a sessão
                      foi criada com elas.
                    properties:
                      supported_countries:
                        type: array
                        description: >-
                          Países que emitiram o cartão, como códigos ISO 3166-1
                          alpha-2. É o país emissor do cartão, não a localização
                          do cliente.
                        items:
                          type: string
                        example:
                          - BR
                      supported_networks:
                        type: array
                        description: >-
                          Bandeiras de cartão que o cliente pode selecionar.
                          Substitui a lista padrão (AMEX, DISCOVER, ELECTRON,
                          ELO, MASTERCARD, VISA, MAESTRO).
                        items:
                          type: string
                        example:
                          - VISA
                          - MASTERCARD
                      supported_funding_types:
                        type: array
                        description: >-
                          Tipos de financiamento que o cliente pode selecionar:
                          CREDIT, DEBIT ou ambos.
                        items:
                          type: string
                          enum:
                            - CREDIT
                            - DEBIT
                        example:
                          - CREDIT
                  checkout_session:
                    type: string
                    example: 87749bc1-1ce4-47f3-8745-72602bb6bcea
                    description: Sessão de checkout.
                  recurring_payment:
                    type: object
                    properties:
                      description:
                        type: string
                        example: Monthly subscription
                      management_url:
                        type: string
                        example: https://example.com/manage
                      billing_agreement:
                        type: string
                        example: BA-123
                      regular_billing:
                        type: object
                        properties:
                          label:
                            type: string
                            example: Monthly
                          amount:
                            type: number
                            example: 9.99
                          interval_unit:
                            type: string
                            example: month
                          interval_count:
                            type: integer
                            example: 1
                      trial_billing:
                        type: object
                        properties:
                          label:
                            type: string
                            example: Free trial
                          amount:
                            type: number
                            example: 0
                          interval_unit:
                            type: string
                            example: month
                          interval_count:
                            type: integer
                            example: 1
                    description: Pagamento recorrente.
                  tax_collection:
                    type: boolean
                    description: >-
                      `true` quando a sessão de checkout cota e cobra impostos
                      antes do pagamento.
                  external_subscription:
                    type: object
                    description: >-
                      A assinatura do Stripe Billing que a Yuno cria depois que
                      o pagamento é aprovado, para o fluxo de preço e impostos
                      descrito em [Preço local e
                      impostos](/pt-br/docs/payment-features/subscriptions/local-price-and-taxes).
                      Envie `customer_id` e `items`. `id` (uma assinatura
                      existente) não pode ser enviado com `items` nem com
                      `tax_collection`. `trial_period_days` e `metadata` ainda
                      não são compatíveis e são rejeitados com `400`.
                    properties:
                      provider:
                        type: string
                        enum:
                          - STRIPE_BILLING
                        description: >-
                          A plataforma de cobrança. Apenas `STRIPE_BILLING`, o
                          padrão.
                      customer_id:
                        type: string
                        description: >-
                          O identificador do cliente no Stripe (`cus_...`). De 3
                          a 255 caracteres.
                        example: cus_RplXYZ
                      currency:
                        type: string
                        description: A moeda dos preços da assinatura.
                        example: USD
                      items:
                        type: array
                        description: Os preços da assinatura a ser criada.
                        items:
                          type: object
                          properties:
                            price:
                              type: string
                              description: >-
                                O identificador do preço no Stripe
                                (`price_...`).
                              example: price_1QwAbc
                            quantity:
                              type: integer
                              description: Quantidade do preço. Padrão `1`.
                              example: 1
                          required:
                            - price
                      id:
                        type: string
                        description: >-
                          Uma assinatura existente (`sub_...`), em vez de
                          `items`. Não é permitido com `tax_collection`.
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value:
                    code: INVALID_REQUEST
                    messages:
                      - Invalid request
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_REQUEST
                  messages:
                    type: array
                    items:
                      type: string
                      example: Invalid request
        '401':
          description: '401'
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    code: INVALID_CREDENTIALS
                    messages:
                      - Invalid credentials
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_CREDENTIALS
                  messages:
                    type: array
                    items:
                      type: string
                      example: Invalid credentials
        '403':
          description: '403'
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    code: AUTHORIZATION_REQUIRED
                    messages:
                      - The merchant has no authorization to use this API.
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: AUTHORIZATION_REQUIRED
                  messages:
                    type: array
                    items:
                      type: string
                      example: The merchant has no authorization to use this API.
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: public-api-key
      x-default: <Your public-api-key>
    sec1:
      type: apiKey
      in: header
      name: private-secret-key
      x-default: <Your private-secret-key>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.