Create boletos
POST {{baseUrl}}/{{version}}/boleto
This is how you create a new list of boletos. You can create up to 100 boletos per request. In case a boleto is paid after its due date and there is fine or interest, its amount will be updated with the paid amount. The same is valid if the boleto is paid with a discount.
Parameters | Value Type | Description |
---|---|---|
amount | REQUIRED | A positive integer that represents the amount in cents to be charged. Example: amount=100 (R$1.00) |
name | REQUIRED | Customer name |
taxId | REQUIRED | Customer CPF (11 digits formatted or unformatted) or CNPJ (14 digits formatted or unformatted). Example: 012.345.678-90 |
streetLine1 | REQUIRED | Customer street address |
streetLine2 | REQUIRED | Customer street address complement |
disctrict | REQUIRED | Customer district name |
city | REQUIRED | Customer city name |
stateCode | REQUIRED | Customer state code |
zipCode | REQUIRED | Customer zip code |
due | OPTIONAL | Due date of the boleto. Example: 2020-06-27. The default value is set to two days after creation date. |
fine | OPTIONAL | Percentage of the boleto amount charged if customer pays after the due date. Default value = 2.00 (2%) |
interest | OPTIONAL | Monthly interest, in percentage, charged if customer pays after the due date. Default value = 1.00 (1%) |
overdueLimit | OPTIONAL | Number of days after due date after which the boleto will no longer be payable. 0 <= overdueLimit <=59. Default value=59 |
receiverName | OPTIONAL | Name of the credit receiver (Sacador Avalista). If none is informed, workspace owner name will be used. If informed, receiverTaxId must also be informed. |
receiverTaxId | OPTIONAL | Tax ID (CPF/CNPJ) of the credit receiver (Sacador Avalista). If none is informed, workspace owner tax ID will be used. If informed, receiverName must also be informed. |
tags | OPTIONAL | Filter entities that contain the specified tags. |
descriptions | OPTIONAL | List of up to 15 descriptions containing information to help the customer understand why he is being charged. You can add text and amount to create a table or you can just add text. When generating PDFs, if the bookletlayout is selected, only the text field of the first description will be considered and it will be used to fill the installment cell in the PDF. |
discounts | OPTIONAL | List of up to 2 discounts specifying the discount percentage and the limit date up to when the discount is valid. |
Request Body
{"boletos"=>[{"amount"=>28000000, "name"=>"Iron Bank S.A.", "taxId"=>"20.018.183/0001-80", "streetLine1"=>"Av. Faria Lima, 1844", "streetLine2"=>"CJ 13", "district"=>"Itaim Bibi", "city"=>"São Paulo", "stateCode"=>"SP", "zipCode"=>"01500-000", "due"=>"2020-09-30", "fine"=>2, "interest"=>1.3, "overdueLimit"=>59, "receiverName"=>"Winterfell S. A.", "receiverTaxId"=>"71.735.814/0001-12", "descriptions"=>[{"text"=>"McDonnell Douglas F-15 Eagle", "amount"=>27000000}, {"text"=>"US Drone", "amount"=>1000000}], "discounts"=>[{"date"=>"2020-09-25", "percentage"=>10.0}, {"date"=>"2020-09-26", "percentage"=>9.0}], "tags"=>["war supply", "invoice #1234"]}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"message":"Boleto(s) successfully created","boletos":[{"taxId":"20.018.183/0001-80","overdueLimit":59,"fine":2,"id":"6608220445474816","receiverName":"Winterfell S. A.","city":"São Paulo","fee":0,"streetLine2":"CJ 13","district":"Itaim Bibi","streetLine1":"Av. Faria Lima, 1844","due":"2020-10-01T02:59:59.999999+00:00","discounts":[{"date":"2020-09-26T02:59:59.999999+00:00","percentage":10},{"date":"2020-09-27T02:59:59.999999+00:00","percentage":9}],"workspaceId":"4888651368497152","interest":1.3,"status":"created","tags":["war supply","invoice #1234"],"zipCode":"01500-000","line":"34191.09107 11407.667309 71444.640008 7 83940028000000","name":"Iron Bank S.A.","created":"2020-09-01T15:08:46.303038+00:00","receiverTaxId":"71.735.814/0001-12","barCode":"34197839400280000001091011407667307144464000","amount":28000000,"stateCode":"SP","descriptions":[{"text":"McDonnell Douglas F-15 Eagle","amount":27000000},{"text":"US Drone","amount":1000000}]}]}