The client I am working with has a requirement that they are able to give credit memos before either full or partial capture of an invoice (i.e. money is authorized but not paid).

The idea being that no stock is being managed by magento, and magento has no way of knowing if something is in stock at a given time. The stock is managed by a 3rd party system. Generally they will receive new stock within days, but it may not necessarily match the items ordered. They want to be able to refund a part of any order.

Is there any way of doing this? Are there any extensions that offer this functionality?

The other way to look at it is, we need to be able to amend an order after its been authorized. In order to adjust the amount of money that is taken from the customer, specifically omitting any unavailable items. This must appear to be a refund from the customer's perspective as per our client's requirements.

All of this will be managed using a 3rd party integration that leverages the Magento API.

  • 3
    "We want to authorise the funds; then remove some line items from the order; raise a credit memo for said line items and raise the invoice with the revised order items" From a financial perspective, if payment hasn't been captured and the invoice hasn't been raised - then a credit memo cannot exist, as it has no corresponding invoice. I can understand the theory behind what you want - but it doesn't really add up. Commented Mar 7, 2013 at 18:37
  • The idea being to allow us to amend which items the customer is charged for if certain items in an order are unavailable
    – lukefowell
    Commented Mar 7, 2013 at 18:43
  • If fulfillment isn't happening within Magento, why are you handling payment/invoicing in Magento? I would export all of your order invoicing, crediting, etc. to that 3rd party system.
    – philwinkle
    Commented Mar 7, 2013 at 18:46
  • 1
    Why can't you just stick to the stock functionality then? Edit the order in the admin - raise the invoice and then capture payment. A new order will be created along with the invoice. A credit note shouldn't exist in the accounting world unless there was an invoice that corresponds to the figures to begin with - which there isn't. Commented Mar 7, 2013 at 18:46

3 Answers 3


Luke, I've never seen an extension out there that does exactly what you need.

It's (probably) possible to implement this functionality with custom Magento code by rewriting the various quote, sales, quote item, sales item, credit memo, and credit memo, and payment module event handlers, and/or a class method rewrite or two. However, it's a rather large task and not easily answered in a single Stack Exchange question, and would require you to understand how all the above objects interact before tackling it.

This sort of programming can be more time consuming that you'd expect. Also, because it involves actual money, this needs more rigorous testing that can usually be applied in a client services environment. Also also, it gets extra tedious because each payment module type (authorizenet, paypal, stripe, etc.) seems to handle orders, credit memos, and invoices slightly differently, which means you'll often end up with subtle, hard to track down bugs. I have 4+ years Magento experience and I'd be wary of tackling this sort of problem — especially if the client needed a fixed bid.

If you're open to alternate solutions — right now it sounds like your client is handling this manually in the admin console and wants to be able to stop doing that. Instead of trying to come up with (clever and awesome) solutions using Magento's existing objects, I'd focus on automating what your client is currently doing manually. That'll likely be easier than messing around with custom account programming.

  • Great. I have a question "Can we Refund Orders to Payment Method ?" programatically Commented Nov 5, 2020 at 10:37

This is a tricky one indeed. I was asked to implement similar functionality, but at the time of capture/shipment - so I simply cancelled/aborted the items not part of the first shipment with $order->cancel()->save();

The easiest solution, by far, would be to invoice/capture the items you actually want to remove, and then immediately create a creditmemo for the same items. Just make sure no no customer notifications gets sent while doing so.

After that you can continue to capture and ship the remaining items in the order.


In order to provide credit memos before capturing an invoice in Magento, there are a few options available. One option is to use the partial invoice and partial credit memo functionality built into Magento. This allows for an invoice to be created for only the items that are available in stock, and a credit memo to be created for any items that are not available.

Another option is to use a third-party extension such as Amasty Partial Payment or Fooman Payment Surcharge, which allows for partial payments and refunds to be made.

In terms of amending an order after it has been authorized, this can be done through the use of a refund or partial credit memo. The refund can be initiated through the Magento admin panel, or through a third-party integration using the Magento API.

It's important to note that in both cases, it's important to communicate clearly with the customer regarding the status of their order and any refunds or credit memos that are issued. Clear communication can help to maintain customer trust and prevent confusion or frustration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.