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

# Create Pix charge with due date

> Creates a Pix charge with a due date, with optional fine, interest, discount and rebate.



## OpenAPI

````yaml /openapi.yaml post /pix/in/cob
openapi: 3.0.3
info:
  title: Fincle API
  version: 1.0.0
  description: >-
    Fincle payments API: charges by Pix, credit card and boleto, subscriptions,
    transactions, refunds, infractions, notifications and transfers.
servers:
  - url: https://api.fincle.com.br
    description: Production server
security: []
tags:
  - name: Authentication
    description: Issuance of the access token from the API key.
  - name: Charges
    description: Creation of charges by Pix, credit card and boleto.
  - name: Subscriptions
    description: Recurring billing on credit card.
  - name: Transactions
    description: Retrieval and refund of transactions.
  - name: Refunds
    description: Refund requests submitted by payers.
  - name: Infractions and MED
    description: Pix infraction reports and the amounts blocked as a result.
  - name: Webhooks
    description: Registration of notification endpoints and tracking of deliveries.
  - name: Balance and transfers
    description: Balance, statement, fees and transfer of the amounts received.
paths:
  /pix/in/cob:
    post:
      tags:
        - Charges
      summary: Create Pix charge with due date
      description: >-
        Creates a Pix charge with a due date, with optional fine, interest,
        discount and rebate.
      operationId: createPixCob
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
          description: >-
            Idempotency key of the request. Repeating the request with the same
            key returns the transaction already recorded, without creating a new
            charge. A universally unique identifier (UUID) is recommended.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                postbackUrl:
                  type: string
                  format: uri
                description:
                  type: string
                amountInCents:
                  type: integer
                  exclusiveMinimum: true
                  minimum: 0
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      title:
                        type: string
                      tangible:
                        type: boolean
                      quantity:
                        type: integer
                        minimum: 1
                        maximum: 100000
                      amountInCents:
                        type: integer
                        minimum: 0
                      shippingAddress:
                        type: object
                        properties:
                          street:
                            type: string
                          number:
                            type: string
                          neighborhood:
                            type: string
                          city:
                            type: string
                          state:
                            type: string
                          zipCode:
                            type: string
                        required:
                          - street
                          - number
                          - neighborhood
                          - city
                          - state
                          - zipCode
                        additionalProperties: false
                    required:
                      - title
                      - tangible
                      - quantity
                      - amountInCents
                    additionalProperties: false
                customer:
                  type: object
                  properties:
                    name:
                      type: string
                    email:
                      type: string
                      format: email
                    documentType:
                      type: string
                      enum:
                        - cpf
                        - cnpj
                    document:
                      type: string
                    phone:
                      type: string
                    instagram:
                      type: string
                    billingAddress:
                      type: object
                      properties:
                        street:
                          type: string
                        number:
                          type: string
                        neighborhood:
                          type: string
                        city:
                          type: string
                        state:
                          type: string
                        zipCode:
                          type: string
                      required:
                        - street
                        - number
                        - neighborhood
                        - city
                        - state
                        - zipCode
                      additionalProperties: false
                  required:
                    - documentType
                    - document
                  additionalProperties: false
                seller:
                  type: object
                  properties:
                    name:
                      type: string
                    documentType:
                      type: string
                      enum:
                        - cpf
                        - cnpj
                    document:
                      type: string
                    phone:
                      type: string
                    averageTicket:
                      type: number
                    address:
                      type: object
                      properties:
                        street:
                          type: string
                        number:
                          type: string
                        neighborhood:
                          type: string
                        city:
                          type: string
                        state:
                          type: string
                        zipCode:
                          type: string
                      required:
                        - street
                        - number
                        - neighborhood
                        - city
                        - state
                        - zipCode
                      additionalProperties: false
                  required:
                    - name
                    - documentType
                    - document
                  additionalProperties: false
                cob:
                  type: object
                  properties:
                    expirationDate:
                      type: string
                    daysAfterDueDate:
                      type: integer
                      minimum: 0
                      maximum: 30
                    fine:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - percent
                            - fixed
                        value:
                          type: number
                          minimum: 0
                      required:
                        - type
                        - value
                      additionalProperties: false
                    interest:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - percent
                            - fixed
                        basis:
                          type: string
                          enum:
                            - day
                            - month
                            - year
                        calendar:
                          type: string
                          enum:
                            - calendar
                            - business
                        value:
                          type: number
                          minimum: 0
                      required:
                        - type
                        - basis
                        - calendar
                        - value
                      additionalProperties: false
                    discount:
                      anyOf:
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - fixed
                                - percent
                            perAdvance:
                              type: boolean
                              enum:
                                - true
                            calendar:
                              type: string
                              enum:
                                - calendar
                                - business
                            value:
                              type: number
                              minimum: 0
                          required:
                            - type
                            - perAdvance
                            - calendar
                            - value
                          additionalProperties: false
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - fixed
                                - percent
                            fixedDates:
                              type: array
                              items:
                                type: object
                                properties:
                                  date:
                                    type: string
                                  value:
                                    type: number
                                    minimum: 0
                                required:
                                  - date
                                  - value
                                additionalProperties: false
                              minItems: 1
                          required:
                            - type
                            - fixedDates
                          additionalProperties: false
                    rebate:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - percent
                            - fixed
                        value:
                          type: number
                          minimum: 0
                      required:
                        - type
                        - value
                      additionalProperties: false
                  required:
                    - expirationDate
                  additionalProperties: false
              required:
                - amountInCents
                - customer
                - cob
              additionalProperties: false
            example:
              amountInCents: 15000
              description: Installment 11/12 of agreement no. 4587
              customer:
                name: Helena Martins Andrade
                email: helena.andrade@example.com
                documentType: cpf
                document: '31845792041'
                phone: '11932104567'
              cob:
                expirationDate: '2026-12-10T00:00:00.000Z'
                daysAfterDueDate: 5
                fine:
                  type: percent
                  value: 2
                interest:
                  type: percent
                  basis: month
                  calendar: calendar
                  value: 1
      responses:
        '200':
          description: Request processed successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      pix:
                        type: object
                        properties:
                          emv:
                            type: string
                          qrCode:
                            type: string
                        required:
                          - emv
                          - qrCode
                        additionalProperties: false
                      status:
                        type: string
                      fees:
                        type: number
                    required:
                      - id
                      - pix
                      - status
                      - fees
                    additionalProperties: false
                required:
                  - success
                  - message
                additionalProperties: false
              example:
                success: true
                message: Transação criada com sucesso
                data:
                  id: cmddiqpxo09zf1yju2kqkhgga
                  pix:
                    emv: >-
                      00020126870014br.gov.bcb.pix2565pix.example.com/qr/v3/at/7fab0715...6304F801
                    qrCode: data:image/png;base64,iVBORw0KGgo...
                  status: pending
                  fees: 150
        '400':
          description: Request rejected due to a validation failure or a business rule.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                required:
                  - success
                  - message
              example:
                success: false
                message: Documento inválido para o tipo selecionado
        '401':
          description: Access token missing, invalid or expired.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                required:
                  - success
                  - message
              example:
                success: false
                message: Não autorizado
        '409':
          description: Request rejected.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                required:
                  - success
                  - message
                additionalProperties: false
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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