When you initialize an Invoice map, the entity will not be automatically sent to the Stark Bank API. The 'create' function sends the maps to the Stark Bank API and returns the list of created maps. To create scheduled Invoices, which will display the discount, interest, etc. on the final users banking interface, use dates instead of datetimes on the "due" and "discounts" fields.
:amount
[integer]: Invoice value in cents. Minimum amount = 0 (any value will be accepted). ex: 1234 (= R$ 12.34):name
[string]: payer name. ex: "Iron Bank S.A.":tax-id
[string]: payer tax ID (CPF or CNPJ) with or without formatting. ex: "01234567890" or "20.018.183/0001-80":due
[string, default now + 2 days]: Invoice due date in ISO format. ex: "2020-11-27T01:24:01.665-00:00":expiration
[integer, default 5097600 (59 days)]: time interval in seconds between due date and expiration date. ex 123456789:fine
[float, default 2.0]: Invoice fine for overdue payment in %. ex: 2.5:interest
[float, default 1.0]: Invoice monthly interest for overdue payment in %. ex: 5.2:discounts
[list of maps, default nil]: list of maps with :percentage (float) and :due (string) pairs:tags
[list of strings, default nil]: list of strings for tagging:descriptions
[list of maps, default nil]: list of maps with :key (string) and :value (string) pairs:fee
[integer, default nil]: fee charged by this Invoice. ex: 65 (= R$ 0.65):pdf
[string, default nil]: public Invoice PDF URL. ex: "https://invoice.starkbank.com/pdf/d454fa4e524441c1b0c1a729457ed9d8":link
[string, default nil]: public Invoice webpage URL. ex: "https://my-workspace.sandbox.starkbank.com/invoicelink/d454fa4e524441c1b0c1a729457ed9d8":nominal-amount
[integer, default nil]: Invoice emission value in cents (will change if invoice is updated, but not if it's paid). ex: 400000:fine-amount
[integer, default nil]: Invoice fine value calculated over nominal-amount. ex: 20000:interest-amount
[integer, default nil]: Invoice interest value calculated over nominal-amount. ex: 10000:discount-amount
[integer, default nil]: Invoice discount value calculated over nominal-amount. ex: 3000:transaction-ids
[list of strings]: ledger transaction ids linked to this invoice (if there are more than one, all but first are reversals). ex: ["19827356981273"]:id
[string, default nil]: unique id returned when the Invoice is created. ex: "5656565656565656":brcode
[string, default nil]: BR Code for the Invoice payment. ex: "00020101021226800014br.gov.bcb.pix2558invoice.starkbank.com/f5333103-3279-4db2-8389-5efe335ba93d5204000053039865802BR5913Arya Stark6009Sao Paulo6220051656565656565656566304A9A0":status
[string, default nil]: current Invoice status. ex: "registered" or "paid":created
[string, default nil]: creation datetime for the Invoice. ex: "2020-03-26T19:32:35.418698+00:00":updated
[string, default nil]: latest update datetime for the Invoice. ex: "2020-03-26T19:32:35.418698+00:00"When you initialize an Invoice map, the entity will not be automatically sent to the Stark Bank API. The 'create' function sends the maps to the Stark Bank API and returns the list of created maps. To create scheduled Invoices, which will display the discount, interest, etc. on the final users banking interface, use dates instead of datetimes on the "due" and "discounts" fields. ## Parameters (required): - `:amount` [integer]: Invoice value in cents. Minimum amount = 0 (any value will be accepted). ex: 1234 (= R$ 12.34) - `:name` [string]: payer name. ex: "Iron Bank S.A." - `:tax-id` [string]: payer tax ID (CPF or CNPJ) with or without formatting. ex: "01234567890" or "20.018.183/0001-80" ## Parameters (optional): - `:due` [string, default now + 2 days]: Invoice due date in ISO format. ex: "2020-11-27T01:24:01.665-00:00" - `:expiration` [integer, default 5097600 (59 days)]: time interval in seconds between due date and expiration date. ex 123456789 - `:fine` [float, default 2.0]: Invoice fine for overdue payment in %. ex: 2.5 - `:interest` [float, default 1.0]: Invoice monthly interest for overdue payment in %. ex: 5.2 - `:discounts` [list of maps, default nil]: list of maps with :percentage (float) and :due (string) pairs - `:tags` [list of strings, default nil]: list of strings for tagging - `:descriptions` [list of maps, default nil]: list of maps with :key (string) and :value (string) pairs ## Attributes (return-only): - `:fee` [integer, default nil]: fee charged by this Invoice. ex: 65 (= R$ 0.65) - `:pdf` [string, default nil]: public Invoice PDF URL. ex: "https://invoice.starkbank.com/pdf/d454fa4e524441c1b0c1a729457ed9d8" - `:link` [string, default nil]: public Invoice webpage URL. ex: "https://my-workspace.sandbox.starkbank.com/invoicelink/d454fa4e524441c1b0c1a729457ed9d8" - `:nominal-amount` [integer, default nil]: Invoice emission value in cents (will change if invoice is updated, but not if it's paid). ex: 400000 - `:fine-amount` [integer, default nil]: Invoice fine value calculated over nominal-amount. ex: 20000 - `:interest-amount` [integer, default nil]: Invoice interest value calculated over nominal-amount. ex: 10000 - `:discount-amount` [integer, default nil]: Invoice discount value calculated over nominal-amount. ex: 3000 - `:transaction-ids` [list of strings]: ledger transaction ids linked to this invoice (if there are more than one, all but first are reversals). ex: ["19827356981273"] - `:id` [string, default nil]: unique id returned when the Invoice is created. ex: "5656565656565656" - `:brcode` [string, default nil]: BR Code for the Invoice payment. ex: "00020101021226800014br.gov.bcb.pix2558invoice.starkbank.com/f5333103-3279-4db2-8389-5efe335ba93d5204000053039865802BR5913Arya Stark6009Sao Paulo6220051656565656565656566304A9A0" - `:status` [string, default nil]: current Invoice status. ex: "registered" or "paid" - `:created` [string, default nil]: creation datetime for the Invoice. ex: "2020-03-26T19:32:35.418698+00:00" - `:updated` [string, default nil]: latest update datetime for the Invoice. ex: "2020-03-26T19:32:35.418698+00:00"
(create invoices)
(create invoices user)
Send a list of Invoice maps for creation in the Stark Bank API
invoices
[list of Invoice maps]: list of Invoice maps to be created in the API:user
[Project or Organization, default nil]: Project or Organization map returned from starkbank.user/project or starkbank.user/organization. Only necessary if starkbank.settings/user has not been set.Send a list of Invoice maps for creation in the Stark Bank API ## Parameters (required): - `invoices` [list of Invoice maps]: list of Invoice maps to be created in the API ## Options: - `:user` [Project or Organization, default nil]: Project or Organization map returned from starkbank.user/project or starkbank.user/organization. Only necessary if starkbank.settings/user has not been set. ## Return: - list of Invoice maps with updated attributes
(get id)
(get id user)
Receive a single Invoice map previously created in the Stark Bank API by passing its id
:id
[string]: map unique id. ex: "5656565656565656":user
[Project or Organization, default nil]: Project or Organization map returned from starkbank.user/project or starkbank.user/organization. Only necessary if starkbank.settings/user has not been set.Receive a single Invoice map previously created in the Stark Bank API by passing its id ## Parameters (required): - `:id` [string]: map unique id. ex: "5656565656565656" ## Options: - `:user` [Project or Organization, default nil]: Project or Organization map returned from starkbank.user/project or starkbank.user/organization. Only necessary if starkbank.settings/user has not been set. ## Return: - Invoice map with updated attributes
(page)
(page params)
(page params user)
Receive a list of up to 100 Invoice maps previously created in the Stark Bank API and the cursor to the next page. Use this function instead of query if you want to manually page your requests.
:cursor
[string, default nil]: cursor returned on the previous page function call:limit
[integer, default nil]: maximum number of maps to be retrieved. Unlimited if nil. ex: 35:after
[string, default nil]: date filter for maps created only after specified date. ex: "2020-3-10":before
[string, default nil]: date filter for maps created only before specified date. ex: "2020-3-10":status
[string, default nil]: filter for status of retrieved maps. ex: "created", "paid", "canceled" or "overdue":tags
[list of strings, default nil]: tags to filter retrieved maps. ex: ["tony", "stark"]:ids
[list of strings, default nil]: list of ids to filter retrieved maps. ex: ["5656565656565656", "4545454545454545"]:user
[Project or Organization, default nil]: Project or Organization map returned from starkbank.user/project or starkbank.user/organization. Only necessary if starkbank.settings/user has not been set.:invoices
: list of invoice maps with updated attributes:cursor
: cursor string to retrieve the next page of invoicesReceive a list of up to 100 Invoice maps previously created in the Stark Bank API and the cursor to the next page. Use this function instead of query if you want to manually page your requests. ## Options: - `:cursor` [string, default nil]: cursor returned on the previous page function call - `:limit` [integer, default nil]: maximum number of maps to be retrieved. Unlimited if nil. ex: 35 - `:after` [string, default nil]: date filter for maps created only after specified date. ex: "2020-3-10" - `:before` [string, default nil]: date filter for maps created only before specified date. ex: "2020-3-10" - `:status` [string, default nil]: filter for status of retrieved maps. ex: "created", "paid", "canceled" or "overdue" - `:tags` [list of strings, default nil]: tags to filter retrieved maps. ex: ["tony", "stark"] - `:ids` [list of strings, default nil]: list of ids to filter retrieved maps. ex: ["5656565656565656", "4545454545454545"] - `:user` [Project or Organization, default nil]: Project or Organization map returned from starkbank.user/project or starkbank.user/organization. Only necessary if starkbank.settings/user has not been set. ## Return: - map with :invoices and :cursor: - `:invoices`: list of invoice maps with updated attributes - `:cursor`: cursor string to retrieve the next page of invoices
(payment id)
(payment id user)
Receive the invoice.payment sub-resource associated with a paid invoice.
:id
[string]: map unique id. ex: "5656565656565656":user
[Project or Organization, default nil]: Project or Organization map returned from starkbank.user/project or starkbank.user/organization. Only necessary if starkbank.settings/user has not been set.Receive the invoice.payment sub-resource associated with a paid invoice. ## Parameters (required): - `:id` [string]: map unique id. ex: "5656565656565656" ## Options: - `:user` [Project or Organization, default nil]: Project or Organization map returned from starkbank.user/project or starkbank.user/organization. Only necessary if starkbank.settings/user has not been set. ## Return: - Invoice payment information: - amount [integer]: amount in cents that was paid. ex: 1234 (= R$ 12.34) - name [string]: payer full name. ex: "Anthony Edward Stark" - tax-id [string]: payer tax ID (CPF or CNPJ). ex: "20.018.183/0001-80" - bank-code [string]: code of the payer bank institution in Brazil. ex: "20018183" - branch-code [string]: payer bank account branch. ex: "1357-9" - account-number [string]: payer bank account number. ex: "876543-2" - account-type [string]: payer bank account type. ex: "checking", "savings", "salary" or "payment" - end-to-end-id [string]: central bank's unique transaction ID. ex: "E79457883202101262140HHX553UPqeq" - method [string]: payment method that was used. ex: "pix"
(pdf id)
(pdf id user)
Receive a single Invoice pdf file generated in the Stark Bank API by passing its id.
:id
[string]: map unique id. ex: "5656565656565656":user
[Project or Organization, default nil]: Project or Organization map returned from starkbank.user/project or starkbank.user/organization. Only necessary if starkbank.settings/user has not been set.Receive a single Invoice pdf file generated in the Stark Bank API by passing its id. ## Parameters (required): - `:id` [string]: map unique id. ex: "5656565656565656" ## Options: - `:user` [Project or Organization, default nil]: Project or Organization map returned from starkbank.user/project or starkbank.user/organization. Only necessary if starkbank.settings/user has not been set. ## Return: - Invoice pdf file content
(qrcode id)
(qrcode id user)
Receive a single Invoice QRCode in png format generated in the Stark Bank API by the invoice ID.
:id
[string]: map unique id. ex: "5656565656565656":user
[Project or Organization, default nil]: Project or Organization map returned from starkbank.user/project or starkbank.user/organization. Only necessary if starkbank.settings/user has not been set.Receive a single Invoice QRCode in png format generated in the Stark Bank API by the invoice ID. ## Parameters (required): - `:id` [string]: map unique id. ex: "5656565656565656" ## Options: - `:user` [Project or Organization, default nil]: Project or Organization map returned from starkbank.user/project or starkbank.user/organization. Only necessary if starkbank.settings/user has not been set. ## Return: - Invoice QR Code png blob
(query)
(query params)
(query params user)
Receive a stream of Invoice maps previously created in the Stark Bank API. Use this function instead of page if you want to stream the objects without worrying about cursors and pagination.
:limit
[integer, default nil]: maximum number of maps to be retrieved. Unlimited if nil. ex: 35:after
[string, default nil]: date filter for maps created only after specified date. ex: "2020-3-10":before
[string, default nil]: date filter for maps created only before specified date. ex: "2020-3-10":status
[string, default nil]: filter for status of retrieved maps. ex: "created", "paid", "canceled" or "overdue":tags
[list of strings, default nil]: tags to filter retrieved maps. ex: ["tony", "stark"]:ids
[list of strings, default nil]: list of ids to filter retrieved maps. ex: ["5656565656565656", "4545454545454545"]:user
[Project or Organization, default nil]: Project or Organization map returned from starkbank.user/project or starkbank.user/organization. Only necessary if starkbank.settings/user has not been set.Receive a stream of Invoice maps previously created in the Stark Bank API. Use this function instead of page if you want to stream the objects without worrying about cursors and pagination. ## Options: - `:limit` [integer, default nil]: maximum number of maps to be retrieved. Unlimited if nil. ex: 35 - `:after` [string, default nil]: date filter for maps created only after specified date. ex: "2020-3-10" - `:before` [string, default nil]: date filter for maps created only before specified date. ex: "2020-3-10" - `:status` [string, default nil]: filter for status of retrieved maps. ex: "created", "paid", "canceled" or "overdue" - `:tags` [list of strings, default nil]: tags to filter retrieved maps. ex: ["tony", "stark"] - `:ids` [list of strings, default nil]: list of ids to filter retrieved maps. ex: ["5656565656565656", "4545454545454545"] - `:user` [Project or Organization, default nil]: Project or Organization map returned from starkbank.user/project or starkbank.user/organization. Only necessary if starkbank.settings/user has not been set. ## Return: - stream of Invoice maps with updated attributes
(update id params)
(update id params user)
Update an Invoice by passing id.
:id
[list of strings]: Invoice unique ids. ex: "5656565656565656":status
[string, default nil]: If the Invoice hasn't been paid yet, you may cancel it by passing "canceled" in the status:amount
[integer, default nil]: If the Invoice hasn't been paid yet, you may update its amount by passing the desired amount integer:due
[string, default today + 2 days]: Invoice due date in UTC ISO format. ex: "2020-11-25T17:59:26.249976+00:00":expiration
[DateInterval or integer, default nil]: time interval in seconds between due date and expiration date. ex 123456789:user
[Project or Organization, default nil]: Project or Organization map returned from starkbank.user/project or starkbank.user/organization. Only necessary if starkbank.settings/user has not been set.Update an Invoice by passing id. ## Parameters (required): - `:id` [list of strings]: Invoice unique ids. ex: "5656565656565656" ## Parameters (optional): - `:status` [string, default nil]: If the Invoice hasn't been paid yet, you may cancel it by passing "canceled" in the status - `:amount` [integer, default nil]: If the Invoice hasn't been paid yet, you may update its amount by passing the desired amount integer - `:due` [string, default today + 2 days]: Invoice due date in UTC ISO format. ex: "2020-11-25T17:59:26.249976+00:00" - `:expiration` [DateInterval or integer, default nil]: time interval in seconds between due date and expiration date. ex 123456789 - `:user` [Project or Organization, default nil]: Project or Organization map returned from starkbank.user/project or starkbank.user/organization. Only necessary if starkbank.settings/user has not been set. ## Return: - target Invoice with updated attributes
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close