Sale Line or Partial Refunds through API

Coop320Coop320 Member Posts: 4
edited June 2019 in Development

Hey, I am able to process full refunds with:


but I would like to be able to put in partial refunds of a dollar amount and refund individual SaleLine's. How can I achieve this?

Additional info: Some sales are processed via 3rd party and won't actually be charged via lightspeed, but the data should still be there for reports and inventory.



  • gregaricangregarican Member Posts: 926 

    Interesting question. Looking at the API docs, only a full sale refund seems to be listed as an endpoint --> Don't see an API endpoint for refunding a specific sale line. Although in practice this would come into play.

    Most of the time I live in the Retail API world, and don't use the Lightspeed POS client much. Can you refund specific line items from a sale in the UI?

  • [Deleted User][Deleted User] Posts: 0

    Hello @Coop320,

    Partial refunds are possible. Create a new sale and specify the parentSaleLineID for each line that is a refund.

    You can find a code sample in our documentation.

  • Coop320Coop320 Member Posts: 4

    Thank you both for responding. Unfortunately, I wasn't able to get this to work.

    Here was my request:


    	"registerID": 1,
    	"employeeID": 40,
    	"shopID": 1,
    	"SaleLines": {
    		"SaleLine": {
    			"qty": -2,
    			"itemID": 479,
    			"parentSaleLineID": 39125
    	"SalePayments": {
    		"SalePayment": {
    			"amount": -30,
    			"paymentTypeID": 1

    Here is what happened:

    Sale was created with a SaleLine of that Item with 0 quantity and parentSaleLineID is correctly set in the api response. (I cannot see this in the UI)

    Sale shows payment of -30 and balance of 30. Cannot complete the sale since balance is not 0.

    The original sale I'm trying to refund shows no reference to this Sale.

    I also tried using the same paymentTypeID as the original Sale.

  • Coop320Coop320 Member Posts: 4


    The system did end up detecting those sales as refunds, it just took a little bit. But I still cannot complete the refund sale because of the balance. I'm guessing the qty: -2 should have put a -$30 but it did not.

  • programmeuropwielenprogrammeuropwielen Member Posts: 26
    edited January 15

    correct url: .../Account/{accountID}/Sale/{saleID}/refund.json

    This is the correct payload:


     "SaleLines": {

       "SaleLine": [


           "itemID": 34467,

           "unitQuantity": -1,

           "parentSaleLineID": 220747




     "SalePayments": {

       "SalePayment": {

         "amount": -107.1,

         "paymentTypeID": 39



     "registerID": 8,

     "employeeID": 13,

     "shopID": 5,

     "completed": true


Sign In or Register to comment.