Tutorial
Collections
Collections - Refunds and Reversals
32 min
this document details the scenarios that nue supports for processing refunds or reversals through interactions with external payment systems in cases of returns or cancellations, refunds are issued to customers, either partially or in full, reversing the original invoice transaction reversing an invoice involves canceling the invoice to nullify the transaction and correct any errors, effectively removing its impact on financial records; this is used when the invoice was issued incorrectly, such as with incorrect dates, amounts, or customer details the key differences between refunding invoices and reversing invoices are outcome refunding an invoice returns money to the customer, while reversing an invoice cancels the transaction as if it never happened sometimes, even invoices that are paid or partially paid need to be reversed financial records refunding keeps the invoice record but shows it as refunded, whereas reversing cancels, removes or nullifies the invoice refund or partially refund a paid invoice as a finance ops user, i can issue a refund to a paid or partially paid invoice, either in the external system, or in nue, which in turn creates a credit back type credit memo in nue, and refund type payment applications accordingly companies may refund a paid or partially paid invoice in the external payment system or in nue when processing refunds, we need to consider the following payment scenarios an invoice is fully or partially paid by a single payment transaction; an invoice’s balance is offset fully or partially by applying credit memos or negative invoices; a combination of both therefore in nue, refunds for paid or partially paid invoices are handled based on the payment types on the payment applications when the invoice was paid if multiple payment types were used, nue processes refunds in the following priority order credit memos / negative invoices payments within each payment type, if there are more than one payment applications, nue processes refunds from the lowest amount to the highest amount when refunds are processed, we create refund applications records, which is essentially payment applications with refund record type, to track the refund transaction details 📗 “refund application” a refund application refers to a payment application record with record type refund for simplicity, we’ll use “refund application” throughout this document when refund applications are created for an invoice, the payment status of the invoice will be as follows partially refunded if the total refund amount is less than the total payment amount of the invoice refunded if the total refund amount is equal to the total payment amount of the invoice at the item level, the refunds will be applied to the invoice items from the lowest amount to the highest amount refund invoices with payments only when payments are refunded, a credit memo with the "credit back" payment status is generated and linked to the invoice, as shown in the following diagram to track the refund transaction, a refund application is created between this credit memo and the invoice consequently, the credit memo balance becomes zero, as its amount has been applied to offset the invoice's amount example invoice inv 001 with balance of $100 has been fully paid by 2 payments p 001 and p 002, as shown below invoices payments inv 001 $100 external payment #1 $30 external payment #2 $70 there are the following 2 payment applications created and associated to the invoice payment application invoice id transaction amount payment type record type pa 001 inv 001 $30 payment payment pa 002 inv 001 $70 payment payment now 2 refunds are issued refund r 001 with amount $40, and refund r 002 with amount $60 as part of the refund process, the following credit memos with credit back payment status are created to offset the invoice invoices payments refunds credit memos inv 001 $100 external payment #1 $30 r 001 $40 cm 001 $40 external payment #2 $70 r 002 $60 cm 002 $60 both cm 001 and cm 002 are associated with inv 001, having balances $0 the following refund applications are created payment application invoice id credit memo id transaction amount record type payment type payment id ra 001 inv 001 cm 001 $30 refund payment external payment #1 id ra 002 inv 001 cm 002 $10 refund payment external payment #2 id ra 003 inv 001 cm 002 $60 refund payment payment #2 id refund invoices with non electronic payments when a customer requests a refund for an invoice paid through a non electronic method, they will be presented with two options 1\ convert the refund amount to a credit memo 2\ write off the payment and issue an offline refund example invoice inv 001 has a balance of $100 and includes two payment applications 1\ payment application #1 applied credit memo cm 001 with an amount of $30 2\ payment application #2 applied non electronic payment with an amount of $70 therefore this invoice has the following payment applications payment application invoice id payment id credit memo id payment operation transaction amount payment type record type payment method pa 001 inv 001 payment #1 cm 001 apply $30 credit memo credit memo electronic pa 002 inv 001 payment #2 null pay $70 payment payment non electronic the customer now wants to request a refund for this invoice in this case, we will collections credit memos and debit memos docid 0krorvd w29nwa95cfi13 and refund the $70 non electronic payment option 1 refund $70 offline (coming soon) in nue, we will create a credit memo to write off the invoice, which generates a write off type payment application and set the invoice payment status to “refunded” payment application invoice id payment id credit memo id payment operation transaction amount payment type record type payment method pa 003 inv 001 payment #2 cm 002 writeoff $70 credit memo credit memo non electronic option 2 convert $70 to credit memo (coming soon) in nue, we will create a standalone credit memo from the invoice and set the invoice payment status to “refunded” refund invoices with debit memos associated when processing refunds for an invoice associated with a debit memo, we will first refund the invoice for the particular payment type before processing refunds for the debit memo when refund applications are created for a debit memo, the payment status of the debit memo will be as follows paid or partially paid if the total refund amount against the invoice is less than the total payment amount of the invoice partially refunded if the total refund amount against the invoice exceeds the total payment amount of the invoice, but the remaining refund amount is less than the total payment amount of the debit memo refunded if the total refund amount against the invoice is equal to the combined total payment amount of the invoice and the debit memo example invoice inv 001 has a balance of $100 and is linked to a debit memo dm 001 with a balance of $10 both are fully paid three refunds have been issued in the amounts of $90, $15, and $5, respectively the payment status of inv 001 and dm 001 after each refund is detailed in the following table refund transaction refund amount invoice payment status debit memo payment status refund #1 $90 partially refunded paid refund #2 $15 refunded partially refunded refund #3 $5 refunded refunded implementation guide the following refund invoices https //api docs nue io/#revenue manager invoices payment api can be used to refund a list of invoices, and generate refund applications accordingly post https //api nue io/billing/invoices\ refund curl location 'https //api nue io/billing/invoices\ refund' \\ \ header 'content type application/json \\ \ header 'nue api key {nue api key}' \\ \ data '{ refundinvoices \[ { "invoiceid" "1fa145d6 33c7 42ae b376 d4644e0611b5", "accountid" "0016d00000x1ikoqae", "paymentsource" "quickbooks", "paymentid" "pi 001", "paymentnumber" "pa number 001", "transactionamount" "320 00", "paymentmethod" "electronic" }, { "invoiceid" "6c76a85b b6f3 4775 a7b4 3a3c8dbce08d", "accountid" "0016d00000x1ikoqae", "paymentsource" "quickbooks", "paymentid" "pi 002", "paymentnumber" "pa number 002", "transactionamount" "550 00", "paymentmethod" "electronic" ] } note if the request payload includes a specified paymentsource and there is an existing connected payment system, the refund invoices api cannot be directly triggered from nue the standard connector with the payment system will process it automatically to maintain data integrity to override this behavior, you can add the following parameter to the payload (use with caution) "configmap" {"triggerfromnue" false} reverse invoices as a finance ops user, i am able to reverse an invoice, i e , cancel (paid or partially paid) invoices to correct billing errors occasionally, when you discover mistakes on an active invoice, you can reverse the invoice, correct the mistakes, and then generate a new corrected invoice for the same billing period for example, when a user creates an order with incorrect dates or amounts, invoices might already be activated and paid or partially paid in this scenario, the active invoices have likely been transferred to rev rec systems or a downstream gl system it is possible to reverse the paid or partially paid invoices resulting from the incorrect orders reverse an active invoice with transferred payment status in this case, the invoice has been transferred to the payment system, but is not paid when the finance ops user cancels the invoice, nue will cancel or void the invoice in the payment system, and cancel the invoice in nue reverse a fully paid invoice in this case, the finance ops user cancels the paid invoice nue handles the following in one transaction process refund of the paid invoice refund the full amount in the payment system create a credit back type credit memo in nue associated with the invoice set the invoice’s payment status to refunded create a credit memo application between the invoice and the credit memo cancel the invoice the associated credit back credit memos will also be canceled when the invoice is canceled reverse a partially paid invoice in this case, the finance ops user cancels the partially paid invoice nue handles the following in one transaction process refund for the paid amount by executing the refund steps; cancel the invoice and set the payment status to refunded the associated credit back credit memos will also be canceled when the invoice is canceled reverse a refunded or partially refunded invoice in this case, the finance ops user cancels the refunded or partially refunded invoice we do the following in a single transaction process refund of the remaining part of the partially refunded invoice, if there is any refund the remaining amount in the payment system create a credit back type credit memo in nue associated with the invoice set the invoice’s payment status to refunded create a credit memo application between the invoice and the credit memo cancel the invoice the associated credit back credit memo is also canceled when the invoice is canceled reverse an invoice with credit memos applied, and partial payments applied as well in this case, the invoice’s balance has been reduced by applying credit memos, and applying payments when a finance ops user cancels the invoice, the following actions occur process refund of the applied payment amount; unapply the credit memos; cancel the invoice and set the payment status to refunded refunded, if there are payments refunded; canceled, if only credit memos are unapplied example invoice inv 001 has an amount of $100 it has received 2 payments payment #1 of amount $40 via credit memo application, and payment #2 of amount $30 via credit card it has a remaining balance of $30 when the invoice is canceled, payment #1 will be reversed by un applying the credit memo, and payment $2 will be refunded the following refund application and credit memo application are created the following shows the refund application details for the credit back type credit memo payment application invoice id credit memo id transaction amount record type payment type operation payment id ra 001 inv 001 cm 002 $30 refund payment refund payment #2 the following shows the credit memo application details for the credit memo applied to the invoice payment application invoice id credit memo id transaction amount record type payment type operation payment id cma 001 inv 001 cm 001 $40 credit memo credit memo unapply payment #1 reverse an invoice using a credit memo issued from the invoice in this case, when the finance ops user cancels the invoice, we automatically cancel the associated credit memo(s) as well the following actions occur unapply the credit memos cancel associated credit memos one by one cancel the invoice for paid or partially paid invoices, the payment status is set to refunded, if there are payments refunded; canceled, if only credit memos are unapplied reverse an invoice with a debit memo associated in this case, when the finance ops user cancels the invoice, we automatically cancel the associated debit memo(s) as well the following actions occur cancel associated debit memos one by one when canceling a debit memo, nue processes the same actions as reversing an invoice cancel the invoice for paid or partially paid debit memos and invoices, the payment status is set to refunded, if there are payments refunded; canceled, if only credit memos are unapplied implementation guide to implement the reverse invoice integration with an external payment system, webhooks when an invoice is activated, an invoice canceled webhooks docid z6xbd98qskku1fifbj5y event is raised with the payload containing the invoice and invoice items apis the following cancel invoices https //api docs nue io/#cancel invoices api can be used to reverse invoices post /billing/invoices\ cancel { "invoiceids" \[ "497f6eca 6276 4993 bfeb 53cbbbba6f08" ], "notifycrm" true, "notifydebitmemochangedtocrm" true, "notifypaymentchangedtocrm" true, "invoicecomment" { "comment" "example comment" }, "paymentdetail" "string" } cancel payments as a finance ops user, i can cancel a payment in an external payment system, which in turn increases the invoice balance, and creates payment applications to track the reversal of the payments when a payment is canceled in the external payment system, the following actions occur in a single atomic operation create payment applications to reverse the payment applications resulting from the payment; increase the invoice’s balance by the reversed payment amount; set the payment status of the invoice to partially paid, if the new balance is not $0; transferred, if the new balance is $0 example invoice inv 001 has a total amount of $100 it has received total payment #1 from an external payment system of $70, including $30 from credit card payments, and $40 from a credit memo application a user now cancels the payment in the external payment system upon receiving the notification, the following payment applications will be created payment application invoice id transaction amount record type payment type operation payment id pa 001 inv 001 $30 payment payment unpay payment #1 id pa 002 inv 001 $40 credit memo credit memo unapply payment #1 id after the payment is canceled, the invoice has a new balance of $100 and its payment status is set to transferred
🤔
Have a question?
Get answers fast with Nue’s intelligent AI, expert support team, and a growing community of users - all here to help you succeed.
To ask a question or participate in discussions, you'll need to authenticate first.