> ## 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: Collection unique identifier
- accountId: Account identifier
- txId: Transaction identifier
- amount: Original collection amount
- status: Collection status (managed by system)
- pactualId: External provider ID
- emv: QR code payload
- locationUrl: QR code URL
- createdAt: Creation timestamp
- updatedAt: Last update timestamp

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



## OpenAPI

````yaml en/openapi/v3-current/indirect-pix.yaml PUT /v1/collections/immediate/{collection_id}
openapi: 3.0.3
info:
  title: Plugin BR Pix Indirect - Complete API
  description: |
    Complete API for Brazilian Pix instant payment system including
    Pix key dictionary operations, QR code generation/decoding, transactions and
    transaction limits.
  version: 1.0.0
servers:
  - url: https://plugin-pix-indirect.api.lerian.net
security:
  - bearerAuth: []
paths:
  /v1/collections/immediate/{collection_id}:
    put:
      tags:
        - Collections API
      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: Collection unique identifier

        - accountId: Account identifier

        - txId: Transaction identifier

        - amount: Original collection amount

        - status: Collection status (managed by system)

        - pactualId: External provider ID

        - emv: QR code payload

        - locationUrl: QR code URL

        - createdAt: Creation timestamp

        - updatedAt: Last update timestamp


        **State Restrictions:**

        - Collections can ONLY be updated when status is ACTIVE

        - Collections with status COMPLETED, DELETED, or EXPIRED cannot be
        updated
      parameters:
        - name: collection_id
          in: path
          description: Identifier of the immediate collection
          required: true
          schema:
            type: string
        - name: X-Account-Id
          in: header
          description: Account ID (UUID format)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateImmediateCollectionInput'
      responses:
        '200':
          description: Collection updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImmediateCollectionOutput'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
      deprecated: false
      security:
        - bearerAuth: []
components:
  schemas:
    UpdateImmediateCollectionInput:
      properties:
        additionalInfo:
          additionalProperties:
            type: string
          description: AdditionalInfo is the new key-value map for additional information
          example:
            status: updated
            version: '2'
          type: object
        amount:
          description: >-
            Amount is the new collection amount in decimal format with 2 decimal
            places
          example: '150.00'
          type: string
        debtorDocument:
          description: >-
            DebtorDocument is the new CPF or CNPJ of the payer (must be provided
            with DebtorName)
          example: '98765432109'
          type: string
        debtorName:
          description: >-
            DebtorName is the new name of the payer (must be provided with
            DebtorDocument)
          example: Maria Santos
          type: string
        description:
          description: Description is the new custom description for the collection
          example: Updated payment description
          type: string
        expirationSeconds:
          description: >-
            ExpirationSeconds is the new expiration time in seconds (must be
            greater than 0)
          example: 7200
          type: integer
        metadata:
          additionalProperties: {}
          description: >-
            Metadata is a map for updating custom key-value pairs (RFC 7386
            merge patch)
          type: object
        receiverKey:
          description: New Pix key that will receive the payment
          example: '+5511988888888'
          minLength: 1
          type: string
        tags:
          description: Tags is the new array of custom tags
          example:
            - updated
            - revised
          items:
            type: string
          type: array
      type: object
    ImmediateCollectionOutput:
      properties:
        additionalInfo:
          additionalProperties:
            type: string
          description: AdditionalInfo contains additional key-value information
          example:
            customerId: '67890'
            orderId: '12345'
          type: object
        amount:
          description: Amount is the collection amount in decimal format
          example: '100.00'
          type: string
        createdAt:
          description: CreatedAt is the timestamp when the collection was created
          example: '2024-01-15T10:30:00Z'
          type: string
        debtorDocument:
          description: DebtorDocument is the CPF or CNPJ of the payer
          example: '12345678901'
          type: string
        debtorName:
          description: DebtorName is the name of the payer
          example: João da Silva
          type: string
        description:
          description: Description is the custom description of the collection
          example: 'Payment for order #12345'
          type: string
        emv:
          description: EMV is the QR code payload in EMV format
          example: 00020126580014br.gov.bcb.pix...
          type: string
        expirationSeconds:
          description: ExpirationSeconds is the time in seconds until expiration
          example: 3600
          type: integer
        id:
          description: ID is the unique identifier of the collection
          example: 550e8400-e29b-41d4-a716-446655440000
          type: string
        locationUrl:
          description: LocationURL is the URL to access the collection location/QR code
          example: https://api.example.com/qr/550e8400
          type: string
        metadata:
          additionalProperties: {}
          description: Metadata is the custom metadata associated with this collection
          type: object
        receiverKey:
          description: Pix key that will receive the payment
          example: '+5511999999999'
          type: string
        status:
          description: Status is the current status of the collection
          example: ACTIVE
          type: string
        tags:
          description: Tags is an array of custom tags
          example:
            - ecommerce
            - subscription
          items:
            type: string
          type: array
        txId:
          description: TxID is the transaction identifier
          example: TXN123456789
          type: string
        updatedAt:
          description: UpdatedAt is the timestamp of the last update
          example: '2024-01-15T10:30:00Z'
          type: string
      type: object
    ErrorFormat:
      type: object
      description: The response message error.
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: A unique, stable identifier for the error.
        title:
          type: string
          description: A brief summary of the issue.
        message:
          type: string
          description: Detailed guidance for resolving the error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````