Invoice

Create Invoices

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.

post/v2/invoice

Request

  • Base URL
    https://api.starkbank.com
  • URL
    https://api.starkbank.com/v2/invoice
  • Auth
    API key in header Digital-Signature

Request body

amountinteger required

A 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)

namestring required

Payer full name. Example: "Anthony Edward Stark"

taxIdstring required

Payer CPF (11 digits formatted or unformatted) or CNPJ (14 digits formatted or unformatted). Example: 012.345.678-90

descriptionsobject[]

List 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. Example: [{"key": "Product A", "value": "R$10,00"}, {"key": "Taxes", "value": "R$100,00"}]

discountsobject[]

List of up to 5 discounts specifying the discount percentage and the limit date up to when the discount is valid. Example: [{"percentage": 5, "due": "2020-11-25T17:59:26.000000+00:00"}, {"percentage": 10.5, "due": "2020-10-25T17:59:26.000000+00:00"}]

duestring date-time

Requested payment due datetime in ISO format. Example: "2020-11-25T17:59:26.000000+00:00". Default value: 2 days after creation.

expirationinteger

Time in seconds counted from the due datetime until the invoice expires. After expiration, the invoice cannot be paid anymore. Default value: 5097600 (59 days)

finenumber float

Percentage of the invoice amount charged if customer pays after the due datetime. Default value = 2.00 (2%)

interestnumber float

Monthly interest, in percentage, charged if customer pays after the due datetime. Default value = 1.00 (1%)

rulesstring[]

List of rules for modifying invoice behavior. Example: [{"key": "allowedTaxIds", "value": ["012.345.678-90", "45.059.493/0001-73"]}]

splitsobject[]

Array of Split objects to indicate payment receivers. Example: [{"receiverId": "5742447426535424", "amount": 100}, {"receiverId": "5743243941642240", "amount": 200}]

tagsstring[]

Array of strings to tag the entity for future queries. All tags will be converted to lowercase.

Response

Successful operation

object required

Changes

No recorded changes to this operation across all 1 revision of this API.