Skip to main content
POST
Create a Credit Note

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
currency
string
required

The currency ISO code of the document

flow
enum<string>
required

Specifies the direction or role of the account owner in the invoicing transaction. sales: The account owner is the supplier (i.e., the entity issuing the document for goods or services provided). purchases: The account owner is the customer (i.e., the entity receiving the document for goods or services purchased). platform: The account owner is a facilitator (i.e., the entity enabling the transaction between a customer and a supplier, such as a marketplace or intermediary).

Available options:
sales,
purchases,
platform
automatic_tax_calculation
object | null

Defaults to false. When automatic tax calculation is enabled, Nocotax automatically determines which tax rates must be applied to each item sold within the document. Nocotax also determines which tax registrations to apply on this document

customer_id
string

The ID of the organization this document refers as a customer. Required if flow is not purchases

customer_tax_registration_ids
string[] | null

The customer’s tax registration IDs, that will be displayed on PDFs. Not compatible with automatic_tax_calculation[enabled]=true.

invoice_id
string | null

If this credit note refers to an invoice, the ID of this invoice.

items
object[] | null

A list of max. 10 line items to be added to the credit note.

issuer
object | null

If the issuer of the document is not the supplier (in case of white-label or self billing), information on the issuer

locale
string | null

The locale used for this credit note representations (PDF)

memo
string | null

Document memo

numbering_sequence_id
string | null

The ID of the numbering sequence this document is using to generate its number at finalization. Fallbacks to default for organization if not provided

order_reference
string | null
period
object | null

The period associated with this document. Used to recognize and defer revenue

supplier_id
string

The ID of the organization this document refers as a supplier. Required if flow is not sales

supplier_tax_registration_ids
string[] | null

The supplier's tax registration IDs, that will be displayed on PDFs. Not compatible with automatic_tax_calculation[enabled]=true.

Response

successful

id
string
livemode
boolean
object
string
amount_to_credit
integer | null

The amount to credit at the time the credit note is finalized, in the currency's smaller unit (eg. cents)

amount_overcredited
integer | null

If the amount of transactions attached to this credit note exceed its amount to credit, the amount overcredited, in the currency's smaller unit (eg. cents)

amount_credited
integer | null

The amount that has been credited, in the currency's smaller unit (eg. cents)

amount_post_payment
integer | null

The amount that will need to be credited to the customer

amount_pre_payment
integer | null

If attached to an invoice, the amount by which the corresponding invoice amount_remaining is reduced

amount_remaining
integer | null

The amount still to credit, in the currency's smaller unit (eg. cents)

automatic_tax_calculation
object

When automatic tax calculation is enabled, Nocotax automatically determines which tax rates must be applied to each item sold within the document.

credit_status
enum<string> | null

The credit status of the credit note. to_credit: The credit note has an amount that needs to be credited to the customer. credited: This credit note has been totally credited to the customer.

Available options:
to_credit,
credited
currency
string

The currency ISO code of the document

customer_data
object
customer_id
string

The ID of the organization this document refers as a customer

customer_tax_registration_data
object[]

The customer’s tax registration data. They are displayed on the PDF of the document, and may be used for automatic tax calculation if enabled.

customer_tax_registration_ids
string[]

The customer’s tax registration IDs.

document_date
string | null

The date of issuance of this document. Its value is null when the document status is draft

document_number
string | null

The number of this document. Its value is null when the document status is draft

issuer
object | null

If the issuer of the document is not the supplier (in case of white-label or self billing), information on the issuer

flow
enum<string>

Specifies the direction or role of the account owner in the invoicing transaction. sales: The account owner is the supplier (i.e., the entity issuing the document for goods or services provided). purchases: The account owner is the customer (i.e., the entity receiving the document for goods or services purchased). platform: The account owner is a facilitator (i.e., the entity enabling the transaction between a customer and a supplier, such as a marketplace or intermediary).

Available options:
sales,
purchases,
platform
invoice_id
string | null

If this credit note refers to an invoice, the ID of this invoice.

A text representing a legal notice to display on document representations

locale
string

The locale used for this credit note representations (PDF)

memo
string | null

Document memo

numbering_sequence_id
string

The ID of the numbering sequence this document is using to generate its number at finalization

order_reference
string | null
period
object | null

The period associated with this document. Used to recognize and defer revenue

representations
object

After finalization of a document, you can share its representations to whoever you want. This is a set of URLs you can share.

status
enum<string>

The status of the document, one of draft, finalized, cancelled

Available options:
draft,
finalized,
cancelled
status_transitions
object
supplier_country
string

The country (ISO alpha 2) of the country of issuance of the document

supplier_data
object
supplier_id
string

The ID of the organization this document refers as a supplier

supplier_tax_registration_data
object[]

The supplier's tax registration data. They are displayed on the PDF of the document, and may be used for automatic tax calculation if enabled.

supplier_tax_registration_ids
string[]

The customer’s tax registration IDs.

taxes
object[] | null

The document's tax breakdown

total_extratax_amount
integer

Total extratax amount of the document, in the currency's smaller unit (eg. cents)

total_tax_amount
integer

Total tax amount of the document, in the currency's smaller unit (eg. cents)

total_tax_included_amount
integer

Total tax included of the document, in the currency's smaller unit (eg. cents)

created_at
string<date-time>
updated_at
string<date-time>