> ## 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.

# Create a Dynamic Charge with Due Date

> Use this endpoint to create a due date Pix collection (cobrança com vencimento) with complex payment rules including fines, interest, discounts, and rebates.

**Notes:**
- Similar to traditional boletos with Pix payment capability
- Due date defines when payment is expected
- Supports complex amount calculations with fines, interest, discounts, and rebates
- Requires complete debtor and receiver information
- Transaction ID (txId) must be unique across all collections
- Collection remains valid for a configurable period after the due date



## OpenAPI

````yaml en/openapi/v3-current/indirect-pix.yaml POST /v1/collections/duedate
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/duedate:
    post:
      tags:
        - Collections API
      summary: Create a Dynamic Charge with Due Date
      description: >-
        Use this endpoint to create a due date Pix collection (cobrança com
        vencimento) with complex payment rules including fines, interest,
        discounts, and rebates.


        **Notes:**

        - Similar to traditional boletos with Pix payment capability

        - Due date defines when payment is expected

        - Supports complex amount calculations with fines, interest, discounts,
        and rebates

        - Requires complete debtor and receiver information

        - Transaction ID (txId) must be unique across all collections

        - Collection remains valid for a configurable period after the due date
      parameters:
        - 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/CreateDueDateCollectionInput'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueDateCollectionOutput'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
        '409':
          description: Conflict
          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:
    CreateDueDateCollectionInput:
      properties:
        additionalInfo:
          additionalProperties:
            type: string
          description: AdditionalInfo is a key-value map for additional information
          example:
            customerId: '67890'
            orderId: '12345'
          type: object
        amount:
          allOf:
            - $ref: '#/components/schemas/AmountObject'
          description: Amount is the amount configuration object (required)
        debtor:
          allOf:
            - $ref: '#/components/schemas/DebtorInput'
          description: Debtor is the debtor information (required)
        description:
          description: Description is a custom message or description for the collection
          example: 'Payment for order #12345'
          type: string
        dueDate:
          description: >-
            DueDate is the due date for the collection in format YYYY-MM-DD
            (ISO8601)
          example: '2024-12-31'
          type: string
        locationInformation:
          allOf:
            - $ref: '#/components/schemas/LocationInformationDTO'
          description: >-
            LocationInformation contains merchant location data for QR code
            generation
        metadata:
          additionalProperties: {}
          description: Metadata is an optional map for custom key-value pairs (max 50 keys)
          type: object
        receiverKey:
          description: Pix key that will receive the payment
          example: '+5511999999999'
          type: string
        tags:
          description: Tags is an array of custom tags for categorization
          example:
            - ecommerce
            - subscription
          items:
            type: string
          type: array
        txId:
          description: TxID is the unique transaction identifier for this collection
          example: TXabcdefghijklmno123456789
          type: string
        validAfterDue:
          description: >-
            ValidAfterDue is the number of days after the due date that the
            collection remains valid
          example: 5
          minimum: 0
          type: integer
      required:
        - amount
        - debtor
        - dueDate
        - receiverKey
        - txId
        - validAfterDue
      type: object
    DueDateCollectionOutput:
      properties:
        additionalInfo:
          additionalProperties:
            type: string
          description: >-
            AdditionalInfo is a key-value map for additional information
            (optional)
          example:
            customerId: '67890'
            orderId: '12345'
          type: object
        amount:
          allOf:
            - $ref: '#/components/schemas/AmountObject'
          description: Amount is the amount configuration object (required)
        createdAt:
          description: >-
            CreatedAt is the timestamp when the collection was created
            (required)
          example: '2024-01-15T10:30:00Z'
          type: string
        debtor:
          allOf:
            - $ref: '#/components/schemas/DebtorOutput'
          description: Debtor is the debtor information (required)
        deletedAt:
          description: >-
            DeletedAt is the timestamp when the collection was deleted
            (optional, nullable)
          example: '2024-01-25T10:30:00Z'
          type: string
        description:
          description: Description is the custom description of the collection (optional)
          example: 'Payment for order #12345'
          type: string
        dueDate:
          description: >-
            DueDate is the due date for the collection in format YYYY-MM-DD
            (required)
          example: '2024-12-31'
          type: string
        emv:
          description: EMV is the QR code payload in EMV format (required)
          example: 00020126580014br.gov.bcb.pix...
          type: string
        id:
          description: ID is the unique identifier of the collection (required)
          example: 550e8400-e29b-41d4-a716-446655440010
          type: string
        locationUrl:
          description: >-
            LocationURL is the URL to access the collection location/QR code
            (required)
          example: https://api.example.com/qr/550e8400
          type: string
        metadata:
          additionalProperties: {}
          description: Metadata is the custom metadata associated with this collection
          type: object
        receiver:
          allOf:
            - $ref: '#/components/schemas/ReceiverOutput'
          description: Receiver is the receiver information (required)
        receiverKey:
          description: Pix key that will receive the payment
          example: '+5511999999999'
          type: string
        review:
          description: Review is the revision number of the collection (required)
          example: 0
          type: integer
        status:
          description: |-
            Status is the current status of the collection (required)
            Valid values: ACTIVE, COMPLETED, REMOVED_BY_RECEIVER, REMOVED_BY_PSP
          example: ACTIVE
          type: string
        tags:
          description: Tags is an array of custom tags (optional)
          example:
            - ecommerce
            - subscription
          items:
            type: string
          type: array
        txId:
          description: TxID is the transaction identifier (required)
          example: TXabcdefghijklmno123456789
          type: string
        updatedAt:
          description: UpdatedAt is the timestamp of the last update (required)
          example: '2024-01-20T14:45:00Z'
          type: string
        validAfterDue:
          description: >-
            ValidAfterDue is the number of days after the due date that the
            collection remains valid (required)
          example: 5
          type: integer
      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.
    AmountObject:
      properties:
        abatement:
          allOf:
            - $ref: '#/components/schemas/AbatementObject'
          description: Abatement is the abatement configuration (optional)
        discount:
          allOf:
            - $ref: '#/components/schemas/DiscountObject'
          description: Discount is the discount configuration (optional)
        fine:
          allOf:
            - $ref: '#/components/schemas/FineObject'
          description: Fine is the fine configuration (optional)
        interest:
          allOf:
            - $ref: '#/components/schemas/InterestObject'
          description: Interest is the interest configuration (optional)
        original:
          description: >-
            Original is the original collection amount in decimal format with 2
            decimal places
          example: '100.00'
          type: string
      required:
        - original
      type: object
    DebtorInput:
      properties:
        address:
          description: Address is the address of the debtor (optional)
          example: Rua das Flores, 123
          type: string
        city:
          description: City is the city of the debtor (optional)
          example: São Paulo
          type: string
        document:
          description: >-
            Document is the CPF (11 digits) or CNPJ (14 digits) of the debtor
            (required)
          example: '12345678901'
          type: string
        email:
          description: Email is the email address of the debtor (optional)
          example: joao@example.com
          type: string
        name:
          description: Name is the full name of the debtor (required)
          example: João da Silva
          type: string
        state:
          description: State is the state of the debtor (optional)
          example: SP
          type: string
        zipCode:
          description: ZipCode is the postal code of the debtor (optional)
          example: 01310-100
          type: string
      required:
        - document
        - name
      type: object
    LocationInformationDTO:
      properties:
        categoryCode:
          description: CategoryCode is the merchant category code (MCC)
          example: '5411'
          type: string
        merchantCity:
          description: MerchantCity is the city where the merchant is located
          example: São Paulo
          type: string
        merchantName:
          description: MerchantName is the name of the merchant
          example: Loja ABC
          type: string
        postalCode:
          description: PostalCode is the merchant's postal code (CEP)
          example: 01310-100
          type: string
      type: object
    DebtorOutput:
      properties:
        address:
          description: Address is the address of the debtor (optional)
          example: Rua das Flores, 123
          type: string
        city:
          description: City is the city of the debtor (optional)
          example: São Paulo
          type: string
        document:
          description: >-
            Document is the CPF (11 digits) or CNPJ (14 digits) of the debtor
            (required)
          example: '12345678901'
          type: string
        email:
          description: Email is the email address of the debtor (optional)
          example: joao@example.com
          type: string
        name:
          description: Name is the full name of the debtor (required)
          example: João da Silva
          type: string
        state:
          description: State is the state of the debtor (optional)
          example: SP
          type: string
        zipCode:
          description: ZipCode is the postal code of the debtor (optional)
          example: 01310-100
          type: string
      type: object
    ReceiverOutput:
      properties:
        address:
          description: Address is the address of the receiver (required)
          example: Rua das Flores, 123
          type: string
        city:
          description: City is the city of the receiver (required)
          example: São Paulo
          type: string
        document:
          description: Document is the CPF or CNPJ of the receiver (required)
          example: '12345678901'
          type: string
        name:
          description: Name is the name of the receiver (required)
          example: João da Silva
          type: string
        state:
          description: State is the state of the receiver (required)
          example: SP
          type: string
        tradeName:
          description: >-
            TradeName is the trade name of the receiver (optional, for legal
            persons)
          example: Company Name
          type: string
        zipCode:
          description: ZipCode is the postal code of the receiver (required)
          example: 01310-100
          type: string
      type: object
    AbatementObject:
      properties:
        modality:
          description: >-
            Modality is the type of abatement. Accepted values: FIXED_VALUE,
            PERCENT
          example: PERCENT
          type: string
        value:
          description: Value is the abatement value (amount or percentage) as a string
          example: '3.00'
          type: string
      required:
        - modality
        - value
      type: object
    DiscountObject:
      properties:
        discountDateFixed:
          description: >-
            DiscountDateFixed is an array of fixed date discounts. Required when
            value is not provided. Min 1, Max 3 items.
          items:
            $ref: '#/components/schemas/DiscountDateFixed'
          maxItems: 3
          minItems: 1
          type: array
        modality:
          description: >-
            Modality is the type of discount. Accepted values:
            FIXED_VALUE_UNTIL_THE_DATES_INFORMED, PERCENTAGE_DATE_REPORTED,
            AMOUNT_PER_CALENDAR_DAY_ADVANCE, AMOUNT_ADVANCE_BUSINESS_DAY,
            PERCENTAGE_ADVANCE_CURRENT_DAY, PERCENTAGE_ADVANCE_BUSINESS_DAY
          example: AMOUNT_ADVANCE_BUSINESS_DAY
          type: string
        value:
          description: >-
            Value is the discount value (amount or percentage) as a string.
            Required when discountDateFixed is not provided.
          example: '5.00'
          type: string
      required:
        - modality
      type: object
    FineObject:
      properties:
        modality:
          description: 'Modality is the type of fine. Accepted values: FIXED_VALUE, PERCENT'
          example: PERCENT
          type: string
        value:
          description: Value is the fine value (amount or percentage) as a string
          example: '2.00'
          type: string
      required:
        - modality
        - value
      type: object
    InterestObject:
      properties:
        modality:
          description: >-
            Modality is the type of interest. Accepted values:
            VALUE_CALENDAR_DAYS, PERCENTAGE_PER_DAY_CALENDAR_DAYS,
            PERCENTAGE_PER_MONTH_CALENDAR_DAYS,
            PERCENTAGE_PER_YEAR_CALENDAR_DAYS, VALUE_WORKING_DAYS,
            PERCENTAGE_PER_DAYWORKING_DAYS, PERCENTAGE_PER_MONTH_WORKING_DAYS,
            PERCENTAGE_PER_YEAR_WORKING_DAYS
          example: PERCENTAGE_PER_MONTH_CALENDAR_DAYS
          type: string
        value:
          description: Value is the interest value (amount or percentage) as a string
          example: '1.00'
          type: string
      required:
        - modality
        - value
      type: object
    DiscountDateFixed:
      properties:
        date:
          description: Date is the date for the discount in format YYYY-MM-DD
          example: '2024-12-25'
          type: string
        value:
          description: Value is the discount value for this date as a string
          example: '10.00'
          type: string
      required:
        - date
        - value
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````