> ## 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 a Dynamic Charge with Due Date

> Use this endpoint to update a due date collection. Only collections in ACTIVE status can be updated.



## OpenAPI

````yaml /pt/openapi/v3-current/indirect-pix.yaml patch /v1/collections/duedate/{collection_id}
openapi: 3.1.0
info:
  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.
  title: Pix BTG API
  version: 1.12.0
servers:
  - url: https://api.example.com
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security:
  - BearerAuth: []
paths:
  /v1/collections/duedate/{collection_id}:
    patch:
      tags:
        - Due Date Collections
      summary: Update a Dynamic Charge with Due Date
      description: >-
        Use this endpoint to update a due date collection. Only collections in
        ACTIVE status can be updated.
      operationId: collection-update-duedate
      parameters:
        - description: Identifier of the due date collection
          in: path
          name: collection_id
          required: true
          schema:
            description: Identifier of the due date 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/UpdateDueDateCollectionInput'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueDateCollectionOutput'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Bad Request
        '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:
    UpdateDueDateCollectionInput:
      additionalProperties: false
      properties:
        additionalInfo:
          additionalProperties:
            type: string
          examples:
            - customerId: '67890'
              orderId: '12345'
          type: object
        amount:
          $ref: '#/components/schemas/AmountObject'
        debtor:
          $ref: '#/components/schemas/DebtorInput'
        description:
          examples:
            - 'Payment for order #12345'
          type: string
        dueDate:
          examples:
            - '2024-12-31'
          type: string
        metadata:
          additionalProperties: {}
          type: object
        receiverKey:
          examples:
            - '+5511999999999'
          type: string
        tags:
          examples:
            - - ecommerce
              - subscription
          items:
            type: string
          type: array
        validAfterDue:
          examples:
            - 5
          format: int64
          type: integer
      type: object
    DueDateCollectionOutput:
      additionalProperties: false
      properties:
        additionalInfo:
          additionalProperties:
            type: string
          examples:
            - customerId: '67890'
              orderId: '12345'
          type: object
        amount:
          $ref: '#/components/schemas/AmountObject'
        createdAt:
          examples:
            - '2024-01-15T10:30:00Z'
          format: date-time
          type: string
        debtor:
          $ref: '#/components/schemas/DebtorOutput'
        deletedAt:
          examples:
            - '2024-01-25T10:30:00Z'
          format: date-time
          type: string
        description:
          examples:
            - 'Payment for order #12345'
          type: string
        dueDate:
          examples:
            - '2024-12-31'
          type: string
        emv:
          examples:
            - 00020126580014br.gov.bcb.pix...
          type: string
        id:
          examples:
            - 550e8400-e29b-41d4-a716-446655440010
          type: string
        locationUrl:
          examples:
            - https://api.example.com/qr/550e8400
          type: string
        metadata:
          additionalProperties: {}
          type: object
        receiver:
          $ref: '#/components/schemas/ReceiverOutput'
        receiverKey:
          examples:
            - '+5511999999999'
          type: string
        review:
          examples:
            - 0
          format: int64
          type: integer
        status:
          examples:
            - ACTIVE
          type: string
        tags:
          examples:
            - - ecommerce
              - subscription
          items:
            type: string
          type: array
        txId:
          examples:
            - TXabcdefghijklmno123456789
          type: string
        updatedAt:
          examples:
            - '2024-01-20T14:45:00Z'
          format: date-time
          type: string
        validAfterDue:
          examples:
            - 5
          format: int64
          type: integer
      required:
        - id
        - txId
        - status
        - amount
        - receiverKey
        - dueDate
        - validAfterDue
        - debtor
        - receiver
        - emv
        - locationUrl
        - review
        - createdAt
        - updatedAt
      type: object
    LegacyErrorBody:
      additionalProperties: false
      properties:
        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
        code:
          type: string
        title:
          type: string
      required:
        - code
        - title
        - message
      type: object
    AmountObject:
      additionalProperties: true
      properties:
        abatement:
          $ref: '#/components/schemas/AbatementObject'
        discount:
          $ref: '#/components/schemas/DiscountObject'
        fine:
          $ref: '#/components/schemas/FineObject'
        interest:
          $ref: '#/components/schemas/InterestObject'
        original:
          examples:
            - '100.00'
          minLength: 1
          type: string
      required:
        - original
      type: object
    DebtorInput:
      additionalProperties: true
      properties:
        address:
          examples:
            - Rua das Flores, 123
          type: string
        city:
          examples:
            - São Paulo
          type: string
        document:
          examples:
            - '52998224725'
          minLength: 1
          type: string
        email:
          examples:
            - joao@example.com
          type: string
        name:
          examples:
            - João da Silva
          minLength: 1
          type: string
        state:
          examples:
            - SP
          type: string
        zipCode:
          examples:
            - 01310-100
          type: string
      required:
        - name
        - document
      type: object
    DebtorOutput:
      additionalProperties: false
      properties:
        address:
          examples:
            - Rua das Flores, 123
          type: string
        city:
          examples:
            - São Paulo
          type: string
        document:
          examples:
            - '52998224725'
          type: string
        email:
          examples:
            - joao@example.com
          type: string
        name:
          examples:
            - João da Silva
          type: string
        state:
          examples:
            - SP
          type: string
        zipCode:
          examples:
            - 01310-100
          type: string
      required:
        - name
        - document
      type: object
    ReceiverOutput:
      additionalProperties: false
      properties:
        address:
          examples:
            - Rua das Flores, 123
          type: string
        city:
          examples:
            - São Paulo
          type: string
        document:
          examples:
            - '52998224725'
          type: string
        name:
          examples:
            - João da Silva
          type: string
        state:
          examples:
            - SP
          type: string
        tradeName:
          examples:
            - Company Name
          type: string
        zipCode:
          examples:
            - 01310-100
          type: string
      required:
        - name
        - document
        - address
        - city
        - state
        - zipCode
      type: object
    AbatementObject:
      additionalProperties: true
      properties:
        modality:
          examples:
            - PERCENT
          minLength: 1
          type: string
        value:
          examples:
            - '3.00'
          minLength: 1
          type: string
      required:
        - modality
        - value
      type: object
    DiscountObject:
      additionalProperties: true
      properties:
        discountDateFixed:
          items:
            $ref: '#/components/schemas/DiscountDateFixed'
          maxItems: 3
          minItems: 1
          type: array
        modality:
          examples:
            - AMOUNT_ADVANCE_BUSINESS_DAY
          minLength: 1
          type: string
        value:
          examples:
            - '5.00'
          type: string
      required:
        - modality
      type: object
    FineObject:
      additionalProperties: true
      properties:
        modality:
          examples:
            - PERCENT
          minLength: 1
          type: string
        value:
          examples:
            - '2.00'
          minLength: 1
          type: string
      required:
        - modality
        - value
      type: object
    InterestObject:
      additionalProperties: true
      properties:
        modality:
          examples:
            - PERCENTAGE_PER_MONTH_CALENDAR_DAYS
          minLength: 1
          type: string
        value:
          examples:
            - '1.00'
          minLength: 1
          type: string
      required:
        - modality
        - value
      type: object
    DiscountDateFixed:
      additionalProperties: true
      properties:
        date:
          examples:
            - '2024-12-25'
          type: string
        value:
          examples:
            - '10.00'
          type: string
      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.