v49

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-081445491.8 MB
Credit note

Create credit note

This endpoint is used to create a single Credit Note.

The credit note service period configuration supports two explicit modes:

  1. Global service periods: Specify start_date and end_date at the credit note level. These dates will be applied to all line items uniformly.

  2. Individual service periods: Specify start_date and end_date for each line item. When using this mode, ALL line items must have individual periods specified.

  3. Default behavior: If no service periods are specified (neither global nor individual), the original invoice line item service periods will be used.

Note: Mixing global and individual service periods in the same request is not allowed to prevent confusion.

Service period dates are normalized to the start of the day in the customer's timezone to ensure consistent handling across different timezones.

Date Format: Use start_date and end_date with format "YYYY-MM-DD" (e.g., "2023-09-22") to match other Orb APIs like /v1/invoice_line_items.

Note: Both start_date and end_date are inclusive - the service period will cover both the start date and end date completely (from start of start_date to end of end_date).

post/credit_notes

Request body

reason'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' required

An optional reason for the credit note.

memostring nullable

An optional memo to attach to the credit note.

start_datestring date nullable

A date string to specify the global credit note service period start date in the customer's timezone. This will be applied to all line items that don't have their own individual service periods specified. If not provided, line items will use their original invoice line item service periods. This date is inclusive.

end_datestring date nullable

A date string to specify the global credit note service period end date in the customer's timezone. This will be applied to all line items that don't have their own individual service periods specified. If not provided, line items will use their original invoice line item service periods. This date is inclusive.

Example request

{
  "line_items": [
    {
      "invoice_line_item_id": "4khy3nwzktxv7",
      "start_date": "2023-09-22",
      "end_date": "2023-09-22"
    }
  ],
  "reason": "duplicate",
  "memo": "An optional memo for my credit note.",
  "start_date": "2023-09-22",
  "end_date": "2023-09-22"
}

Response

Created

idstring required

The Orb id of this credit note.

created_atstring date-time required

The creation time of the resource in Orb.

voided_atstring date-time nullable required

The time at which the credit note was voided in Orb, if applicable.

credit_note_numberstring required

The unique identifier for credit notes.

invoice_idstring required

The id of the invoice resource that this credit note is applied to.

memostring nullable required

An optional memo supplied on the credit note.

reason'Duplicate' | 'Fraudulent' | 'Order change' | 'Product unsatisfactory' nullable required
type'refund' | 'adjustment' required
subtotalstring required

The total prior to any creditable invoice-level discounts or minimums.

totalstring required

The total including creditable invoice-level discounts or minimums, and tax.

credit_note_pdfstring nullable required

A URL to a PDF of the credit note.

minimum_amount_refundedstring nullable required

Any credited amount from the applied minimum on the invoice.