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

# Update an Immediate Charge

> Use this endpoint to update an immediate collection. Only collections in ACTIVE status can be updated.

**Mutable Fields (can be updated):**
- expirationSeconds: Time in seconds until collection expires
- receiverKey: PIX key that will receive the payment
- debtorDocument: CPF/CNPJ of the payer (must be provided with debtorName)
- debtorName: Name of the payer (must be provided with debtorDocument)
- description: Custom description for the collection
- additionalInfo: Additional key-value information
- tags: Array of custom tags

**Immutable Fields (cannot be updated):**
- id, accountId, txId, amount, status, pactualId, emv, locationUrl, createdAt, updatedAt

**State Restrictions:**
- Collections can ONLY be updated when status is ACTIVE
- Collections with status COMPLETED, DELETED, or EXPIRED cannot be updated



## OpenAPI

````yaml /pt/openapi/v3-current/indirect-pix.yaml put /v1/collections/immediate/{collection_id}
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: >-
    API for Pix Indirect via BTG. It covers DICT keys and claims; MED infraction
    reports, fraud markers, refund requests, and funds recoveries; DICT
    statistics and reconciliation; Pix transfers, refunds, and schedules; static
    QR codes and QR code decoding; immediate and due-date collections; Pix
    Automático for the payer; transaction reports and TemposTransacoes
    statistics; and inbound and outbound webhook records.
  license:
    name: Lerian Studio General License
  title: Pix BTG API
  version: 1.14.0
servers:
  - url: https://api.example.com
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security:
  - BearerAuth: []
paths:
  /v1/collections/immediate/{collection_id}:
    put:
      tags:
        - Immediate Collections
      summary: Update an Immediate Charge
      description: >-
        Use this endpoint to update an immediate collection. Only collections in
        ACTIVE status can be updated.


        **Mutable Fields (can be updated):**

        - expirationSeconds: Time in seconds until collection expires

        - receiverKey: PIX key that will receive the payment

        - debtorDocument: CPF/CNPJ of the payer (must be provided with
        debtorName)

        - debtorName: Name of the payer (must be provided with debtorDocument)

        - description: Custom description for the collection

        - additionalInfo: Additional key-value information

        - tags: Array of custom tags


        **Immutable Fields (cannot be updated):**

        - id, accountId, txId, amount, status, pactualId, emv, locationUrl,
        createdAt, updatedAt


        **State Restrictions:**

        - Collections can ONLY be updated when status is ACTIVE

        - Collections with status COMPLETED, DELETED, or EXPIRED cannot be
        updated
      operationId: collection-update-immediate
      parameters:
        - description: Identifier of the immediate collection
          in: path
          name: collection_id
          required: true
          schema:
            description: Identifier of the immediate collection
            type: string
        - description: Account ID (UUID format)
          in: header
          name: X-Account-Id
          required: true
          schema:
            description: Account ID (UUID format)
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateImmediateCollectionInput'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImmediateCollectionOutput'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Bad Request
        '413':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Request Entity Too Large
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Internal Server Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Error
components:
  schemas:
    UpdateImmediateCollectionInput:
      additionalProperties: false
      properties:
        additionalInfo:
          additionalProperties:
            type: string
          examples:
            - status: updated
              version: '2'
          type: object
        amount:
          examples:
            - '150.00'
          type: string
        debtorDocument:
          examples:
            - '52998224725'
          type: string
        debtorName:
          examples:
            - Maria Santos
          type: string
        description:
          examples:
            - Updated payment description
          type: string
        expirationSeconds:
          examples:
            - 7200
          exclusiveMinimum: 0
          format: int64
          type: integer
        metadata:
          additionalProperties: {}
          type: object
        receiverKey:
          examples:
            - '+5511988888888'
          type: string
        tags:
          examples:
            - - updated
              - revised
          items:
            type: string
          type: array
      type: object
    ImmediateCollectionOutput:
      additionalProperties: false
      properties:
        additionalInfo:
          additionalProperties:
            type: string
          examples:
            - customerId: '67890'
              orderId: '12345'
          type: object
        amount:
          examples:
            - '100.00'
          type: string
        createdAt:
          examples:
            - '2024-01-15T10:30:00Z'
          format: date-time
          type: string
        debtorDocument:
          examples:
            - '52998224725'
          type: string
        debtorName:
          examples:
            - João da Silva
          type: string
        description:
          examples:
            - 'Payment for order #12345'
          type: string
        emv:
          examples:
            - 00020126580014br.gov.bcb.pix...
          type: string
        expirationSeconds:
          examples:
            - 3600
          format: int64
          type: integer
        id:
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        locationUrl:
          examples:
            - https://api.example.com/qr/550e8400
          type: string
        metadata:
          additionalProperties: {}
          type: object
        receiverKey:
          examples:
            - '+5511999999999'
          type: string
        status:
          examples:
            - ACTIVE
          type: string
        tags:
          examples:
            - - ecommerce
              - subscription
          items:
            type: string
          type: array
        txId:
          examples:
            - TXN123456789
          type: string
        updatedAt:
          examples:
            - '2024-01-15T10:30:00Z'
          format: date-time
          type: string
      required:
        - id
        - txId
        - status
        - amount
        - receiverKey
        - expirationSeconds
        - createdAt
        - updatedAt
      type: object
    LegacyErrorBody:
      additionalProperties: false
      properties:
        code:
          type: string
        fields:
          additionalProperties:
            type: string
          type: object
        headers:
          additionalProperties:
            type: string
          type: object
        message:
          type: string
        paths:
          additionalProperties:
            type: string
          type: object
        queryParams:
          additionalProperties:
            type: string
          type: object
        raw:
          type: string
        title:
          type: string
      required:
        - code
        - title
        - message
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

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