Credit Memos

Credit memos represent credits issued to customers, reducing the amount they owe. They can be applied to outstanding invoices or held as a balance on the customer's account.

Credit Memo Status Flow

Status Description
draft Editable, not yet issued
issued Active, available for application
partially_applied Some balance applied, remainder still available
applied Fully applied to invoices
void Cancelled

Create a Credit Memo

bash
curl -X POST "https://api.ondayzero.com/api/v1/credit-memos" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "CUSTOMER_UUID",
    "amount_cents": 15000,
    "reason": "returned_goods"
  }'

amount_cents is in cents. 15000 = $150.00. reason must be one of the supported enum values (e.g. returned_goods, damaged_goods, service_issue, pricing_error, billing_adjustment, goodwill, duplicate_charge, other).

Issue a Credit Memo

Draft credit memos must be issued before they can be applied:

bash
curl -X POST "https://api.ondayzero.com/api/v1/credit-memos/{credit_memo_id}/issue" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

Apply to an Invoice

Apply a credit memo (partially or fully) to an outstanding invoice:

bash
curl -X POST "https://api.ondayzero.com/api/v1/credit-memos/{credit_memo_id}/apply" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "invoice_id": "INVOICE_UUID",
    "amount_cents": 10000
  }'

List Credit Memos

bash
curl "https://api.ondayzero.com/api/v1/credit-memos?status=issued&customer_id=CUSTOMER_UUID" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

Filter Parameters

Parameter Type Description
status string draft, issued, partially_applied, applied, void
customer_id UUID Filter by customer
has_remaining_balance boolean Only credits with unapplied balance

Customer Credit Balance

View all credits for a specific customer:

bash
curl "https://api.ondayzero.com/api/v1/credit-memos/customers/{customer_id}/credits" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

Void a Credit Memo

bash
curl -X POST "https://api.ondayzero.com/api/v1/credit-memos/{credit_memo_id}/void" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID" \
  -H "Content-Type: application/json" \
  -d '{"reason": "Issued in error"}'

Voiding reverses any associated journal entries.