Credit Notes#

Credit Notes are documents that reduce the amount owed on an invoice. They can be issued for partial refunds, billing adjustments, or corrections.

The Credit Note object#

AttributeTypeDescription
idstringUnique identifier with cn_ prefix
objectstringAlways "credit_note"
invoicestringThe invoice this credit note applies to
customerstringCustomer ID
amountintegerCredit amount in smallest currency unit
currencystringISO 4217 currency code
reasonenumduplicate, fraudulent, order_change, product_unsatisfactory, other
statusenumissued, void
memostringInternal memo
linesarrayCredit note line items
pdf_urlstringURL of the generated PDF
metadatahashKey-value pairs
createdtimestampTime at which the object was created
{
  "id": "cn_xyz789",
  "object": "credit_note",
  "invoice": "inv_abc123",
  "customer": "cus_123456789",
  "amount": 5000,
  "currency": "eur",
  "reason": "order_change",
  "status": "issued",
  "memo": "Parking space cancelled for February",
  "lines": [
    {
      "description": "Parking space — credit",
      "amount": 5000
    }
  ],
  "pdf_url": "https://files.casapay.com/credit-notes/cn_xyz789.pdf",
  "created": 1706140800
}

Create a Credit Note#

POST /v1/credit_notes

ParameterTypeRequiredDescription
invoicestringYesInvoice to credit
amountintegerYesCredit amount
reasonstringYesReason for credit
memostringNoInternal memo
linesarrayNoCredit note line items
curl https://api.casapay.com/v1/credit_notes \
  -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc" \
  -H "Content-Type: application/json" \
  -d '{
    "invoice": "inv_abc123",
    "amount": 5000,
    "reason": "order_change",
    "memo": "Parking space cancelled"
  }'

Retrieve, List, Void#

GET /v1/credit_notes/:id

GET /v1/credit_notes?invoice=inv_abc123

POST /v1/credit_notes/:id/void