Collection Scenarios - Credit Memos and Debit Memos
This document outlines the scenarios supported by Nue for handling Credit Memos and Debit Memos.
Customers use credit memos to reduce outstanding invoice amounts, typically issued for returns, discounts, or overpayments.
Credit memos and debit memos can be created in Nue through the following methods:
1. Generate credit memos during the billing process, replacing negative invoices.
2. Cash out / convert credits into credit memos.
3. Create debit memos for existing active invoices.
4. (Coming soon) Create standalone credit memos and debit memos.
Once created and activated, credit memos and debit memos can be applied to active invoices to adjust the balance accordingly.
Apply credit memos
As a finance ops user, I am able to apply a credit memo over an invoice for disputes and other purposes, which in turn reduces the invoice balance and creates credit memo-type payment applications
When a finance ops user applies credit memos to an invoice in the external payment system, the following actions occur in one transaction in Nue:
- Create Payment Applications: Payment applications of the type “CreditMemo” are created and associated with the invoice.
- Offset Invoice Balance: The balance of the invoice is reduced by the amount of the payment transaction from the credit memo.
- Offset Credit Memo Balance: The balance of the credit memo is reduced by the applied transaction amount.
- Update Payment Status: The payment status of the invoice is updated based on the total amount of active payment applications. If the total amount of these payment applications equals the invoice amount, the invoice status is changed to Paid. If the total amount is less than the invoice amount, the status is changed to Partially Paid.
- Associate Credit Memo to Invoice: A credit memo application is created to associate the credit memo with the invoice it is applied to, ensuring accurate record-keeping and reconciliation.
Example
For Invoice #1 with a total amount of $100, Payment #1 applies Credit Memo #1 for $30, and Payment #2 applies Credit Memo #2 with an amount of $70. This fully offsets the invoice, changing its status to Paid.
The following credit memo application will be created.
"Credit Memo Application"
A Credit Memo Application refers to a Payment Application record with record type Credit Memo. For simplicity, we’ll use “Credit Memo Application” throughout this document. |
PAYMENT APPLICATION ITEM |
INVOICE ITEM ID |
RECORD TYPE |
AMOUNT |
PAYMENT TYPE |
PAYMENT ID |
Credit Memo Application: PA-001 |
Invoice Item II-001 |
Credit Memo |
$30 |
Credit Memo |
External Payment #1 ID (includes the mirrored credit memo) |
Credit Memo Application: PA-002 |
Invoice Item II-001 |
Credit Memo |
$70 |
Credit Memo |
External Payment #2 ID (includes the mirrored credit memo) |
Unapply credit memos
As a finance ops user, I am able to unapply a credit memo from an invoice, which in turn increases the invoice balance, and creates Credit Memo type payment applications.
When credit memos are unapplied or partially unapplied from an invoice or debit memo, we will perform the following actions in a single atomic operation:
- Create credit memo applications (a.k.a., payment applications with record type Credit Memo) with transaction amounts equal to the unapplied amounts;
- Increase the credit memo balance by the unapplied amount;
- Increase the balance of the invoice by the unapplied amount, and update the payment status of the invoice:
- Partially Paid: If the invoice balance is smaller than the invoice amount;
- Transferred: If the invoice balance is equal to the invoice amount.
Example
Invoice INV-001 has an amount of $100. A credit memo of $20 was applied to the invoice which reduced its balance to $80. Later, a finance ops user reverses the credit memo application from the invoice.
The following shows the details of the Credit Memo Application:
PAYMENT APPLICATION ITEM |
INVOICE ID |
RECORD TYPE |
AMOUNT |
PAYMENT TYPE |
OPERATION |
PAYMENT ID |
Credit Memo Application: CMA-001 |
Invoice INV-001 |
Credit Memo |
$20 |
Credit Memo |
Unapply |
External Payment #1 ID (original payment when applying the credit memo) |
After the credit memo is un-applied, the invoice’s balance is back to $100, and its payment status is back to Transferred.
Reverse credit memos
As a finance ops user, I am able to reverse a credit memo, i.e., cancel applied credit memos, to correct errors.
Occasionally, credit memos, even when they are already applied or partially applied to invoices / debit memos, need to be reversed due to billing errors or other mistakes. Reversing a credit memo is largely the same as un-applying the credit memo followed by canceling the credit memo.
When a finance ops user cancels a credit memo that is already applied or partially applied, the following action occurs:
- The credit memo is un-applied from all invoices and debit memos. Credit memo applications with operation Unapply are created for each reverse application.
- The credit memo is canceled.
📗 Canceling Credit Back Credit Memos Credit memos with type Credit Back are automatically created during the refund process and thus cannot be independently unapplied and canceled by itself. When canceling an invoice, its associated Credit Back credit memos are automatically canceled as well. |
Example
A finance operations user intends to cancel credit memo CM-001, which has an amount of $100. This credit memo was applied to two invoices: $40 to INV-001 and $40 to INV-002.
In this case, CM-001 will be un-applied, which result in the following 2 credit memo applications:
PAYMENT APPLICATION ITEM |
INVOICE ID |
RECORD TYPE |
AMOUNT |
PAYMENT TYPE |
OPERATION |
Credit Memo Application: CMA-001 |
Invoice INV-001 |
Credit Memo |
$40 |
Credit Memo |
Unapply |
Credit Memo Application: CMA-002 |
Invoice INV-002 |
Credit Memo |
$60 |
Credit Memo |
Unapply |
Implementation Guide
Webhooks
The following Webhook events are raised when credit memos or debit memos are created, activated, canceled, applied and unapplied.
Webhook event |
Raised when |
credit_memo.created |
A credit memo is created, but not activated |
credit_memo.activated |
A credit memo is activated. |
credit_memo.applied (coming soon) |
A credit memo is applied |
credit_memo.unapplied (coming soon) |
A credit memo is unapplied |
credit_memo.canceled |
A credit memo is canceled. |
debit_memo.created (coming soon) |
A debit memo is created, but not activated |
debit_memo.activated (coming soon) |
A debit memo is activated. |
debit_memo.canceled (coming soon) |
A debit memo is canceled. |
APIs
You can use the following APIs to manage credit memo transactions:
API |
DESCRIPTION |
POST /billing/credit-memos:apply |
Apply a list of credit memos |
POST /billing/credit-memos:unapply |
Un-apply a list of credit memos |
POST /billing/credit-memos:activate |
Activate credit memos |
POST /billing/credit-memos:cancel |
Cancel credit memos |
POST /billing/credit-memos |
Create new standalone credit memos |
POST /billing/debit-memos:activate |
Activate debit memos |
POST /billing/debit-memos:cancel |
Cancel debit memos |
POST /billing/debit-memos |
Create new standalone debit memos |
For detailed information, please refer to the API Docs.