Credit notes

Explore CreditNotes endpoints in Swagger.

Overview

Think of a credit note as a voucher issued to a customer. It is a reduction that can be applied against one or multiple invoices. A credit note can either reduce the amount owed or cancel out an invoice entirely.

In the Codat system a credit note is issued to a customer's accounts receivable.

It contains details of:

  • The amount of credit remaining and its status.
  • Payment allocations against the payments type, in this case an invoice.
  • Which customers the credit notes have been issued to.

Data model

Field

Type

Description

id

string

Identifier for the credit note, unique to the company in the accounting platform.

creditNoteNumber

string

Friendly reference for the credit note.

customerRef

reference type

Reference to the customer the credit note has been issued to.

totalAmount

decimal

Total amount of credit that has been applied to the customer's accounts receivable.

totalDiscount

decimal

Any discounts applied to the credit note amount.

subTotal

decimal

Value of the credit note, including discounts and excluding tax.

totalTaxAmount

decimal

Any tax applied to the credit note amount.

discountPercentage

decimal

Percentage rate (from 0 to 100) of discounts applied to the credit note.

remainingCredit

decimal

Unused balance of totalAmount originally raised.

status

string

Current state of a credit note, either:

  • Draft
  • Submitted
  • Paid
  • Void

issueDate

string
see date

Date of the credit note as recorded in the accounting system.

allocatedOnDate

string
see date

Date on which the credit note was fully allocated.

currency

string
see currency

Currency of the credit note.

currencyRate

decimal
see currency rate

Rate between the currency of the credit note and the base currency of the company.

lineItems

An array of CreditNoteLineItems.

paymentAllocations

An array of CreditNotePaymentAllocations.

modifiedDate

string
see date

Date the record was last updated in the Codat system.

sourceModifiedDate

string
see date

Date the record was last changed in the accounting system.

note

string

Any additional information about the credit note. Where possible, Codat links to a data field in the accounting platform that is publicly available. This means that the contents of the note field are included when a credit note is emailed from the accounting platform to the customer.

Payment allocations

Field

Type

Description

id

string

Identifier of the payments data type.

totalAmount

number

Amount in the currency of the credit note.

currency

string
see currency

Currency of the original payment.

currencyRate

decimal
see currency rate

currencyRate * totalAmount = amount in original currency of payment.

date

string
see date

Date of the payment.

note

string

Notes made against the payment.

allocatedOnDate

string
see date

Date of the allocation of the payment.

Line items

Details of each line of the credit note.

Field

Type

Description

description

string

Friendly name of each line item. For example, the goods or service for which credit has been issued.

unitAmount

decimal

Unit price of the goods or service.

quantity

decimal

Number of units of the goods or service for which credit has been issued.

discountAmount

decimal

Value of any discounts applied.

subTotal

decimal

Amount of credit associated with the line item, including discounts but excluding tax.

taxAmount

decimal

Amount of tax associated with the line item.

totalAmount

decimal

Total amount of the line item, including discounts and tax.

accountRef

reference type

Reference to the account to which the line item is linked.

discountPercentage

decimal

Percentage rate of any discount applied to the line item.

taxRateRef

reference type

Reference to the tax rate to which the line item is linked.

itemRef

reference type

Reference to the item the line is linked to.

trackingCategoryRef

reference type

Reference to the tracking categories to which the line item is linked.

📘

Requirements for reference fields

Reference fields are only populated if the corresponding data type has been synchronised. If you see null values for these fields, please complete a new sync for the corresponding data type. For example, sync the customers data type for customerRef.

Example data

[
    {
        "id": "0316bd24-8a01-4a3a-a0e5-a73f14ebcbec",
        "creditNoteNumber": "5239277",
        "customerRef": {
            "id": "b5511228-b9ef-4713-91b1-ad2cf60eadb1",
            "companyName": "Tool Hire Company"
        },
        "totalAmount": 550,
        "totalDiscount": 0,
        "subTotal": 0,
        "totalTaxAmount": 0,
        "discountPercentage": 0,
        "remainingCredit": 550,
        "status": "Submitted",
        "issueDate": "2018-03-28T21:28:58.249Z",
        "allocatedOnDate": null,
        "note": "ABC",
        "currency": "USD",
        "currencyRate": null,
        "lineItems": [
            {
                "description": "Anvil10000Lb",
                "unitAmount": 50,
                "quantity": 10,
                "discountAmount": 0,
                "subTotal": 500,
                "taxAmount": 50,
                "totalAmount": 550,
                "accountRef": {
                    "id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3",
                    "name": null
                },
                "discountPercentage": null,
                "taxRateRef": {
                    "id": "6c88aff3-7cb9-4980-a3d3-443e72e02498",
                    "name": null
                },
                "itemRef": {
                    "id": "1",
                    "name": null
                }
            }
        ],
        "paymentAllocations": [],
        "modifiedDate": null,
        "sourceModifiedDate": null,
        "note": "More information available on request."
    }
  ]

Did this page help you?