Boleto

Emitir boleto a partir de Invoices

Changed on

Emite um boleto para as Invoices indicadas, sem precisar informar Account nem Customer.

post/brazil/boleto/onetime/external/initialize

Request

  • Base URL
    https://api.trytoku.com
  • URL
    https://api.trytoku.com/brazil/boleto/onetime/external/initialize
  • Auth
    API key in header x-api-key

Request body

collection_profilestring nullable

Perfil de cobrança da Account sob o qual emitir o boleto. Ausente emite sob o perfil padrão da Account.

id_invoicesstring[] required

Identificadores das Invoices que o boleto salda. Todas devem pertencer ao mesmo Customer e à mesma Account, de onde são derivados esses dois dados.

Example request

{
  "collection_profile": "convenio_itau_b",
  "id_invoices": [
    "in__8K5R9vxPjmt6FMagRkhzERwOcCteLU5",
    "in_sAnj52mWMX4yffx9KofF9hlEL6i4JyWA"
  ]
}

Response

Successful Response

Example response

{
  "transactions": [
    {
      "amount": "496.45",
      "barcode": "34194148000000269001098312622743835960869000",
      "barcode_url": "https://storage.googleapis.com/boleto-barcode/34194148000000269001098312622743835960869000.png",
      "beneficiary": {
        "account_number": "35463-5",
        "address": {
          "city": "São Paulo",
          "neighborhood": "Centro",
          "number": "100",
          "postal_code": "01000-000",
          "state": "SP",
          "street": "Rua Exemplo"
        },
        "agency": "2372",
        "bank_code": "341",
        "code": "150000052061",
        "government_id": "12345678000199",
        "name": "EMPRESA EXEMPLO LTDA",
        "wallet": "109"
      },
      "check_digit": "4",
      "currency": "BRL",
      "document_species": "15",
      "expiration_date": "18/12/2025",
      "id_invoices": [
        "in__8K5R9vxPjmt6FMagRkhzERwOcCteLU5"
      ],
      "id_transaction": "trs_q7v4_RYA7FPaI_YTP65wwD8cFIJalsHR",
      "issue_date": "18/12/2025",
      "nosso_numero": "83126227",
      "payer": {
        "address": {
          "city": "Rio de Janeiro",
          "neighborhood": "Bairro",
          "number": "200",
          "postal_code": "20000-000",
          "state": "RJ",
          "street": "Av Exemplo"
        },
        "government_id": "12345678909",
        "name": "CLIENTE EXEMPLO"
      },
      "status": "success",
      "typeable_line_number": "34191098341262274383459608690000414800000026900",
      "validity_date": "16/02/2026"
    }
  ]
}

Changes

    • breaking

      request body became required

    • breaking

      removed the media type application/json for the response with the status

    • breaking

      the / response's property type changed from object to no type for status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • info

      api operation id inicialização-do-boleto removed and replaced with external_boleto_initialize

    • info

      api tag Boleto added

    • info

      added the new optional request property

    • info

      removed the non-success response with the status

    • info

      added to the / response property anyOf list for the response status

    • info

      the response property became required for the status