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

# 4 - Generate an Installment Charge

This endpoint allows the individual issuance of charges for specific contracts or installments.

It facilitates the creation of a custom bill, where parameters such as amount, due date, and payment method are provided, meeting the different needs of each customer.

Endpoint functionality encompasses three billing modalities:

* Boleto: for generating traditional boletos;
* Boleto Híbrido (with PIX): combination of traditional boleto with the option of payment via PIX;
* PIX Collection: generation of collection exclusively via PIX. With this flexibility, the partner can create varied charges efficiently and tailored to customer needs.

<Warning>The SettlementID field, generated in the response of this endpoint, needs to be saved. This amount is required to request cancellation of the charges issued for the installments, in endpoint 6 - Cancel Installment Charges.</Warning>


## OpenAPI

````yaml post /AgendaRecebivel/GerarUnicaCobranca
openapi: 3.0.1
info:
  title: BMPDigitalCore.ApiExterna.AgendaRecebivel.API
  version: '1.0'
servers:
  - url: https://api.bmpdigital.moneyp.dev.br/
    description: Localhost
security:
  - Bearer: []
paths:
  /AgendaRecebivel/GerarUnicaCobranca:
    post:
      tags:
        - AgendaRecebivel
      parameters:
        - name: IdempotencyKey
          in: header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgendaRecebivelGerarUnicaCobrancaCommand'
          text/json:
            schema:
              $ref: '#/components/schemas/AgendaRecebivelGerarUnicaCobrancaCommand'
          application/*+json:
            schema:
              $ref: '#/components/schemas/AgendaRecebivelGerarUnicaCobrancaCommand'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/AgendaRecebivelInclusaoCobrancaResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/AgendaRecebivelInclusaoCobrancaResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/AgendaRecebivelInclusaoCobrancaResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ResponseBase'
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBase'
            text/json:
              schema:
                $ref: '#/components/schemas/ResponseBase'
components:
  schemas:
    AgendaRecebivelGerarUnicaCobrancaCommand:
      type: object
      properties:
        dto:
          $ref: '#/components/schemas/FindAgendaRecebivelParcelasDTO'
        dtoGerarUnicaLiquidacao:
          $ref: '#/components/schemas/AgendaRecebivelGerarUnicaCobrancaDTO'
      additionalProperties: false
    AgendaRecebivelInclusaoCobrancaResponse:
      type: object
      properties:
        msg:
          type: string
          nullable: true
        result:
          type: boolean
          writeOnly: true
        hasError:
          type: boolean
        messages:
          type: array
          items:
            $ref: '#/components/schemas/Message'
          nullable: true
        cobrancas:
          type: array
          items:
            $ref: '#/components/schemas/CobrancaGeradaDTO'
          nullable: true
      additionalProperties: false
    ResponseBase:
      type: object
      properties:
        msg:
          type: string
          nullable: true
        result:
          type: boolean
          writeOnly: true
        hasError:
          type: boolean
        messages:
          type: array
          items:
            $ref: '#/components/schemas/Message'
          nullable: true
      additionalProperties: false
    FindAgendaRecebivelParcelasDTO:
      required:
        - nroParcelas
      type: object
      properties:
        codigoProposta:
          type: string
          description: Código identificador da proposta na BMP.
          format: uuid
          nullable: true
        codigoOperacao:
          maxLength: 50
          minLength: 0
          type: string
          description: Código identificador da proposta (valor exclusivo do integrador).
          nullable: true
        nroParcelas:
          type: array
          items:
            type: integer
            format: int32
          description: Array contendo o número das parcelas a serem consultadas.
          nullable: true
      additionalProperties: false
    AgendaRecebivelGerarUnicaCobrancaDTO:
      required:
        - descricaoLiquidacao
        - liquidacao
      type: object
      properties:
        dtVencimento:
          type: string
          description: Data de vencimento da cobrança.
          format: date-time
          nullable: true
        dtExpiracao:
          type: string
          description: Define a data limite de pagamento da cobrança.
          format: date-time
          nullable: true
        liquidacao:
          type: boolean
          description: Indica se a cobrança gerada deve liquidar a parcela.
        pagamentoViaBoleto:
          type: boolean
          description: Define se a cobrança gerada será um boleto.
        pagamentoViaPIX:
          type: boolean
          description: Define se a cobrança gerada será um Pix Cobrança.
        descricaoLiquidacao:
          type: string
          description: Define uma descrição para a cobrança gerada.
          nullable: true
        vlrLiquidacao:
          type: number
          description: >-
            Define o valor da cobrança gerada. Obs.: Caso 'Liquidacao' seja
            verdadeiro, não deve ser informado.
          format: double
          nullable: true
        vlrDesconto:
          type: number
          description: Define um valor de desconto para a cobrança gerada.
          format: double
          nullable: true
        permiteDescapitalizacao:
          type: boolean
          description: >-
            Define se o valor da parcela deve ser descapitalizado para a data de
            vencimento da cobrança.
          nullable: true
        tipoRegistro:
          type: integer
          description: 'Define a modalidade de registro automático: 1 - Online; 2 - Offline.'
          format: int32
          nullable: true
      additionalProperties: false
    Message:
      type: object
      properties:
        messageType:
          $ref: '#/components/schemas/ErrorType'
        code:
          type: string
          nullable: true
        context:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        field:
          type: string
          nullable: true
      additionalProperties: false
    CobrancaGeradaDTO:
      type: object
      properties:
        codigoLiquidacao:
          type: string
          format: uuid
        parcelas:
          type: array
          items:
            type: integer
            format: int32
          nullable: true
      additionalProperties: false
    ErrorType:
      enum:
        - 1
        - 2
        - 3
      type: integer
      format: int32
  securitySchemes:
    Bearer:
      type: apiKey
      description: Informe o token
      name: Authorization
      in: header

````