Skip to main content
POST
Apply a credit note

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token.

Headers

Alguna-Version
enum<string>
required
Available options:
2026-04-01
Idempotency-Key
string

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.

Maximum string length: 255
Example:

"ik_a1b2c3d4e5f6"

Path Parameters

id
string
required

Unique identifier for the credit-note

Body

application/json
do_refund
boolean
required

Whether to issue a refund when applying to a paid invoice

Example:

false

refund_destination
enum<string> | null

Where to send the refund when refunding a paid invoice

Available options:
original_payment,
wallet
Example:

"original_payment"

wallet_id
string | null

Wallet to refund to when refund_destination is wallet for a paid-invoice refund

Example:

"wlt_01H1VECT"

Response

Success

attachments
object[]
required

Attachments on this credit note

created_at
string<date-time>
required

Timestamp when the credit note was created

Example:

"2026-04-01T10:00:00Z"

currency
string
required

Currency code

Example:

"USD"

customer_id
string
required

Customer this credit note belongs to

Example:

"cust_01H1VECT"

description
string
required

Description of the credit note

Example:

"Overcharge credit"

external_reference
string
required

External reference identifier

id
string
required

Unique identifier for the credit note

Example:

"cn_01H1VECT"

is_pdf_available
boolean
required

Whether a PDF is available for download

line_items
object[]
required

Line items on this credit note

status
enum<string>
required

Current status of the credit note

Available options:
draft,
applied,
void,
pending_refund
Example:

"draft"

subtotal
string
required

Subtotal before tax

Example:

"100.00"

sync_enabled
boolean
required

Whether accounting sync is enabled

tax
string
required

Tax amount

Example:

"10.00"

total
string
required

Total amount including tax

Example:

"110.00"

updated_at
string<date-time>
required

Timestamp when the credit note was last updated

Example:

"2026-04-01T12:30:00Z"

accounting_credit_note_id
string | null

Credit note ID in the accounting system

accounting_credit_note_url
string | null

URL to the credit note in the accounting system

accounting_integration_id
string | null

Accounting integration ID

accounting_provider
string | null

Accounting provider name

apply_date
string<date-time> | null

Date the credit note was applied

Example:

"2026-03-01T00:00:00Z"

billing_period_end
string<date-time> | null

End of the billing period

Example:

"2026-01-31T23:59:59Z"

billing_period_start
string<date-time> | null

Start of the billing period

Example:

"2026-01-01T00:00:00Z"

credit_date
string<date-time> | null

Date of the credit

Example:

"2026-03-01T00:00:00Z"

invoice_id
string | null

Associated invoice ID

last_refund_date
string<date-time> | null

Date of the last refund

last_refund_id
string | null

ID of the last refund

Legal entity ID

purchase_order_number
string | null

Purchase order number

void_date
string<date-time> | null

Date the credit note was voided