Create a credit note
Creates a credit note in draft status. Optionally link it to an invoice. Linked paid invoices are supported, and pre-payment credit notes are supported for Alguna-managed invoices in issued or overdue. Add line items to specify the credited amounts, then apply the credit note to finalize it. Alternatively, set apply to create and apply the credit note in one call — the same synchronous flow as calling apply-credit-note on a draft. Applying alone does not return funds; send refund as well to refund the customer, which requires a linked invoice that is paid. If applying fails, the credit note is left in draft and the error identifies it so it can be applied separately.
Authorizations
API key authentication. Pass your API key as a Bearer token.
Headers
2026-04-01 A unique string used to ensure the request is processed exactly once. If you retry a request with the same idempotency key within 24 hours, the original response is returned without re-executing the operation.
255"ik_a1b2c3d4e5f6"
Body
Apply the credit note as part of creating it, synchronously, exactly as create followed by apply-credit-note would. Defaults to false, leaving it a draft. If applying fails the credit note remains a draft and the error identifies it, so it can be retried via apply-credit-note.
false
End of the billing period
"2026-04-01T00:00:00Z"
Start of the billing period
"2026-03-01T00:00:00Z"
Customer the credit note is issued to. Required unless invoice_id is given, in which case it is taken from the invoice; when both are given they must agree.
1"cust_01H1VECT"
Credit note description
"Overcharge credit for March"
Linked invoice. Required unless customer_id is given. Pre-payment credit notes are supported only for Alguna-managed invoices in issued or overdue
1"inv_01H1VECT"
Line items on the credit note
Refund the customer as part of applying the credit note. Requires apply and a linked invoice that is paid; omit it to credit the customer without returning funds.
Response
Success
Attachments on this credit note
Timestamp when the credit note was created
"2026-04-01T10:00:00Z"
Currency code
"USD"
Customer this credit note belongs to
"cust_01H1VECT"
Description of the credit note
"Overcharge credit"
External reference identifier
Unique identifier for the credit note
"cn_01H1VECT"
Whether a PDF is available for download
Line items on this credit note
Current status of the credit note
draft, applied, void, pending_refund "draft"
Subtotal before tax
"100.00"
Whether accounting sync is enabled
Tax amount
"10.00"
Total amount including tax
"110.00"
Timestamp when the credit note was last updated
"2026-04-01T12:30:00Z"
Credit note ID in the accounting system
URL to the credit note in the accounting system
Accounting integration ID
Accounting provider name
Date the credit note was applied
"2026-03-01T00:00:00Z"
End of the billing period
"2026-01-31T23:59:59Z"
Start of the billing period
"2026-01-01T00:00:00Z"
Date of the credit
"2026-03-01T00:00:00Z"
Associated invoice ID
Date of the last refund
ID of the last refund
Legal entity ID
Purchase order number
Date the credit note was voided