Skip to main content
POST
Create Customer Credit

Authorizations

Authorization
string
header
required

Partner-level JWT token (unscoped). Token payload includes partner_id. Business access is validated via partner ownership. Format: Bearer <your-jwt-token>

Use this for: Multi-business operations where the business_id is specified in the URL and partner has access to multiple businesses.

Path Parameters

business_id
string<uuid>
required

Business UUID provided by Thred (unique identifier for the business)

Body

Customer credit creation serializer with line_items support.

Creates customer credits with line_items for flexible account allocation.

external_id
string
required

External system identifier for this customer credit

Minimum string length: 1
line_items
object[]
required

Array of line items for this customer credit

customer_id
string<uuid>

Existing customer ID to assign credit to

customer_external_id
string

External customer ID. Will create customer if not found

source_invoice_id
string<uuid> | null

Optional invoice ID this credit note was created from (origin tracking, not allocation)

sent_at
string<date-time>

When the credit was sent (ISO 8601 format). Defaults to now

allocations
object[]

Array of invoice allocations for this credit

tags
object[]

Transaction tags for the credit

document
object

Optional document upload

Response

Customer credit serializer for API responses.

id
string<uuid>
required
read-only

Unique customer credit identifier

status
enum<string>
required
read-only

Credit status: draft, sent, partially_applied, applied, void (computed from allocations)

Available options:
draft,
sent,
applied,
partially_applied,
void
sent_at
string<date-time>
required
read-only

When the credit was sent

customer
object
required
read-only

Customer receiving this credit (inline details)

source_invoice_id
string<uuid> | null
required
read-only

Invoice ID this credit was created from (origin tracking, not allocation)

line_items
object[]
required
read-only

Array of credit line items

allocations
object[]
required
read-only

Array of invoice allocations

tags
object[]
required
read-only

Transaction tags for the credit

total_amount
integer
required
read-only

Total credit amount in cents

applied_amount
integer
required
read-only

Applied credit amount in cents

document
object
required

Latest document linked to this customer credit

created_at
string<date-time>
required
read-only

Credit creation timestamp

updated_at
string<date-time>
required
read-only

Last update timestamp

external_id
string

Your external system identifier for this credit

Maximum string length: 255
currency
enum<string>

Credit currency (e.g., GBP, EUR, USD)

  • EUR - Euro
  • GBP - British Pound
  • USD - US Dollar
  • SEK - Swedish Krona
  • NOK - Norwegian Krone
  • DKK - Danish Krone
  • ISK - Icelandic Króna
  • MYR - Malaysian Ringgit
  • SGD - Singapore Dollar
Available options:
EUR,
GBP,
USD,
SEK,
NOK,
DKK,
ISK,
MYR,
SGD