Create invoices

POST {{baseUrl}}/{{version}}/invoice

Use this route to create up to 100 new invoices at a time.

NOTE: If you create an invoice with amount zero, we will accept any amount paid by your customer. Otherwise we will only accept the amount specified in the invoice.

ParametersValue TypeDescription
amountREQUIREDA non-negative integer that represents the amount in cents to be invoiced. When the invoice is paid, this parameter is updated with the amount actually paid. Example: 100 (R$1.00)
taxIdREQUIREDPayer CPF (11 digits formatted or unformatted) or CNPJ (14 digits formatted or unformatted). Example: 012.345.678-90
nameREQUIREDPayer full name. Example: Anthony Edward Stark
dueOPTIONALRequested payment due datetime in ISO format. Example: 2020-11-25T17:59:26.000000+00:00. Default value: 2 days after creation.
fineOPTIONALPercentage of the invoice amount charged if customer pays after the due datetime. Default value = 2.00 (2%)
interestOPTIONALMonthly interest, in percentage, charged if customer pays after the due datetime. Default value = 1.00 (1%)
expirationOPTIONALTime in seconds counted from the due datetime until the invoice expires. After expiration, the invoice cannot be paid anymore. Default value: 5097600 (59 days)
discountsOPTIONALList of up to 5 discounts specifying the discount percentage and the limit date up to when the discount is valid.
descriptionsOPTIONALList of up to 15 descriptions containing information to help the customer understand why he is being charged. For each description, you can add a title key and a description value.
tagsOPTIONALArray of strings to tag the entity for future queries. All tags will be converted to lowercase.

Request Body

{"invoices"=>[{"amount"=>10000, "due"=>"2023-11-30T02:06:26.249976+00:00", "expiration"=>1, "name"=>"Iron Bank S.A.", "taxId"=>"20.018.183/0001-80", "fine"=>2.5, "interest"=>1.3, "descriptions"=>[{"key"=>"Product A", "value"=>"R$10,00"}, {"key"=>"Taxes", "value"=>"R$100,00"}], "discounts"=>[{"percentage"=>5, "due"=>"2023-11-29T17:59:26.000000+00:00"}, {"percentage"=>10.5, "due"=>"2023-11-25T17:59:26.000000+00:00"}], "tags"=>["War supply", "Invoice #1234"]}]}

RESPONSES

status: OK

{"invoices":[{"status":"created","updated":"2020-11-23T23:16:26.985776+00:00","fee":0,"taxId":"20.018.183/0001-80","interest":1.3,"tags":["war Supply, invoice #1234"],"interestAmount":0,"created":"2020-11-23T23:16:26.985755+00:00","due":"2020-11-30T02:06:26.249976+00:00","descriptions":[{"key":"Product A","value":"R$10,00"},{"key":"Taxes","value":"R$100,00"}],"nominalAmount":100,"discounts":[{"percentage":10.5,"due":"2020-11-25T20:59:26+00:00"},{"percentage":5,"due":"2020-11-29T20:59:26+00:00"}],"amount":100,"brcode":"00020101021226890014br.gov.bcb.pix2567invoice-h.sandbox.starkbank.com/v2/824f06ebcc5f4233884b83f25cb832bf52040000530398654040.005802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304A4FD","expiration":1,"fineAmount":0,"pdf":"https://invoice-h.sandbox.starkbank.com/pdf/824f06ebcc5f4233884b83f25cb832bf","discountAmount":0,"fine":2.5,"id":"6499273612984320","name":"Iron Bank S.A."}],"message":"Invoice successfully created"}