Liking cljdoc? Tell your friends :D

starkbank.invoice

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.

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 null]: fee charged by this Invoice. ex: 65 (= R$ 0.65)
  • :pdf [string, default null]: public Invoice PDF URL. ex: "https://invoice.starkbank.com/pdf/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
  • :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.

## 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 null]: fee charged by this Invoice. ex: 65 (= R$ 0.65)
  - `:pdf` [string, default null]: public Invoice PDF URL. ex: "https://invoice.starkbank.com/pdf/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
  - `: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"
raw docstring

apply-java-hashmapclj

(apply-java-hashmap x)
source

createclj

(create invoices)
(create invoices user)

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]: Project map returned from starkbank.user/project. Only necessary if starkbank.user/set has not been set.

Return:

  • list of Invoice maps with updated attributes
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]: Project map returned from starkbank.user/project. Only necessary if starkbank.user/set has not been set.

## Return:
  - list of Invoice maps with updated attributes
sourceraw docstring

created-java-invoicesclj

source

getclj

(get id)
(get id user)

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]: Project map returned from starkbank.user/project. Only necessary if starkbank.user/set has not been set.

Return:

  • Invoice map with updated attributes
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]: Project map returned from starkbank.user/project. Only necessary if starkbank.user/set has not been set.

## Return:
  - Invoice map with updated attributes
sourceraw docstring

java-description-to-mapclj

(java-description-to-map description)
source

java-discount-to-mapclj

(java-discount-to-map discount)
source

java-invoicesclj

source

java-paramsclj

source

pdfclj

(pdf id)
(pdf id user)

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]: Project map returned from starkbank.user/project. Only necessary if starkbank.user/set has not been set.

Return:

  • Invoice pdf file content
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]: Project map returned from starkbank.user/project. Only necessary if starkbank.user/set has not been set.

## Return:
  - Invoice pdf file content
sourceraw docstring

qrcodeclj

(qrcode id)
(qrcode id user)

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]: Project map returned from starkbank.user/project. Only necessary if starkbank.user/set has not been set.

Return:

  • Invoice QR Code png blob
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]: Project map returned from starkbank.user/project. Only necessary if starkbank.user/set has not been set.

## Return:
  - Invoice QR Code png blob
sourceraw docstring

queryclj

(query)
(query params)
(query params user)

Receive a stream of Invoice maps previously created in the Stark Bank API

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]: Project map returned from starkbank.user/project. Only necessary if starkbank.user/set has not been set.

Return:

  • stream of Invoice maps with updated attributes
Receive a stream of Invoice maps previously created in the Stark Bank API

## 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]: Project map returned from starkbank.user/project. Only necessary if starkbank.user/set has not been set.

## Return:
  - stream of Invoice maps with updated attributes
sourceraw docstring

updateclj

(update id params)
(update id params user)

Update an Invoice by passing id.

Parameters (required):

  • :id [list of strings]: Invoice unique ids. ex: "5656565656565656"

Parameters (optional):

  • :status [string]: If the Invoice hasn't been paid yet, you may cancel it by passing "canceled" in the status
  • :amount [string]: 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 null]: time interval in seconds between due date and expiration date. ex 123456789
  • :user [Project]: Project map returned from starkbank.user/project. Only necessary if starkbank.settings/set-default-user has not been set.

Return:

  • target Invoice with updated attributes
Update an Invoice by passing id.

## Parameters (required):
  - `:id` [list of strings]: Invoice unique ids. ex: "5656565656565656"

## Parameters (optional):
  - `:status` [string]: If the Invoice hasn't been paid yet, you may cancel it by passing "canceled" in the status
  - `:amount` [string]: 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 null]: time interval in seconds between due date and expiration date. ex 123456789
  - `:user` [Project]: Project map returned from starkbank.user/project. Only necessary if starkbank.settings/set-default-user has not been set.

## Return:
  - target Invoice with updated attributes
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close