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
applied Fully applied to invoices
voided Cancelled after issuance

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": 15000,
    "reason": "Returned defective product"
  }'

amount is in cents. 15000 = $150.00.

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": 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, applied, voided
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.