> ## Documentation Index
> Fetch the complete documentation index at: https://yn-c9bb3266.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Checkout Session

> Updates an existing checkout session. You can modify the amount, metadata, or other mutable fields before the session expires or a payment is completed.



## OpenAPI

````yaml PATCH /v1/checkout/sessions/{checkout_session_id}
openapi: 3.1.0
info:
  title: Yuno Payments API
  description: >-
    Yuno payment orchestration platform — unified REST API for payments,
    checkout sessions, customers, payment methods, subscriptions, payouts,
    marketplace transfers, and banking connectivity across Latin America.
  version: 1.0.0
  contact:
    name: Yuno Support
    email: support@y.uno
    url: https://docs.y.uno
  license:
    name: Proprietary
    url: https://y.uno
servers:
  - url: https://api-sandbox.y.uno
    description: Sandbox
  - url: https://api.y.uno
    description: Production
security:
  - publicApiKey: []
    privateSecretKey: []
paths:
  /v1/checkout/sessions/{checkout_session_id}:
    patch:
      tags:
        - Checkout Sessions
      summary: Update checkout session
      description: >-
        Updates an existing checkout session. You can modify the amount,
        metadata, or other mutable fields before the session expires or a
        payment is completed.
      operationId: updateCheckoutSession
      parameters:
        - name: checkout_session_id
          in: path
          required: true
          description: The unique identifier of the checkout session to update
          schema:
            type: string
            format: uuid
            example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: object
                  description: Updated payment amount
                  properties:
                    currency:
                      type: string
                      description: ISO 4217 currency code
                      example: BRL
                    value:
                      type: number
                      description: Payment amount
                      example: 200
                metadata:
                  type: object
                  description: Key-value pairs for storing additional information
                  additionalProperties:
                    type: string
                  example:
                    order_id: ORD-789
                    updated_reason: price_adjustment
                merchant_order_id:
                  type: string
                  description: Updated merchant order reference
                  example: order-updated-456
            example:
              amount:
                currency: BRL
                value: 200
              metadata:
                order_id: ORD-789
      responses:
        '200':
          description: Checkout session updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutSession'
        '400':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Checkout session not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Checkout session cannot be updated (already completed or expired)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://api-sandbox.y.uno/v1/checkout/sessions/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
              --header 'Content-Type: application/json' \
              --header 'public-api-key: YOUR_PUBLIC_API_KEY' \
              --header 'private-secret-key: YOUR_PRIVATE_SECRET_KEY' \
              --data '{
              "country": "BR",
              "amount": {
                "currency": "ARS"
              },
              "merchant_order_id": "order-updated-456",
              "payment_description": "Updated payment description",
              "account_id": "YOUR_ACCOUNT_CODE",
              "metadata": {
                "order_id": "ORD-789"
              }
            }'
components:
  schemas:
    CheckoutSession:
      type: object
      properties:
        checkout_session:
          type: string
          format: uuid
          description: The checkout session identifier
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        amount:
          $ref: '#/components/schemas/Amount'
        country:
          type: string
          description: ISO 3166-1 alpha-2 country code
          example: BR
        merchant_order_id:
          type: string
          description: Your unique order identifier
          example: order-20260301-001
        status:
          type: string
          description: Session status
          example: ACTIVE
        created_at:
          type: string
          format: date-time
          description: Session creation timestamp
          example: '2026-03-01T14:30:00.000Z'
        payment_methods:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                description: Payment method type
          description: Available payment methods for this session
        callback_url:
          type: string
          format: uri
          description: URL to receive server-side payment notifications
          example: https://merchant.com/webhooks/yuno
        return_url:
          type: string
          format: uri
          description: >-
            URL to redirect the customer after payment completion (required for
            3DS, PIX, and redirect-based methods)
          example: https://merchant.com/checkout/complete
      example:
        checkout_session: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        amount:
          currency: BRL
          value: 150
        country: BR
        merchant_order_id: order-20260301-001
        status: ACTIVE
        created_at: '2026-03-01T14:30:00.000Z'
        payment_methods:
          - type: CARD
          - type: PIX
          - type: BOLETO
    Error:
      type: object
      description: >-
        Standard error envelope returned by every Yuno service for any 4xx or
        5xx response. Top level. `code` is a stable SCREAMING_SNAKE_CASE
        identifier. `messages` is always an array of strings, even when there is
        only one entry. There is no `error` wrapper, no singular `message`, no
        `type`, no `details`. See the Error handling guide for the full code
        catalog.
      required:
        - code
        - messages
      properties:
        code:
          type: string
          description: >-
            Stable, machine readable identifier. Branch on this in your client.
            Common values include `BAD_REQUEST`, `VALIDATION_ERROR`,
            `INVALID_REQUEST`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`,
            `TOO_MANY_REQUESTS`, `INTERNAL_ERROR`, `BAD_GATEWAY`,
            `SERVICE_UNAVAILABLE`, plus business codes like
            `CUSTOMER_ID_DUPLICATED`, `RECIPIENT_NOT_FOUND`, `INVALID_STATE`,
            and the `PROVIDER_*` family for downstream provider errors.
          example: VALIDATION_ERROR
        messages:
          type: array
          description: >-
            Human readable details. Validation errors put one entry per failed
            field, formatted `"fieldName message"`.
          items:
            type: string
          example:
            - merchant_customer_id must not be blank
      example:
        code: VALIDATION_ERROR
        messages:
          - amount must be greater than 0
          - country must not be blank
    Amount:
      type: object
      required:
        - currency
        - value
      properties:
        currency:
          type: string
          description: ISO 4217 currency code
          example: BRL
        value:
          type: number
          description: >-
            Payment amount in major currency units (e.g., 150.00 means 150 BRL,
            not cents). For zero-decimal currencies like CLP and PYG, use whole
            numbers (e.g., 15000 means 15,000 CLP).
          example: 100
      example:
        currency: BRL
        value: 100
  securitySchemes:
    publicApiKey:
      type: apiKey
      in: header
      name: public-api-key
      description: Your public API key from the Yuno Dashboard
    privateSecretKey:
      type: apiKey
      in: header
      name: private-secret-key
      description: Your private secret key (server-side only)

````