How to update Credit Account balance

ZoranZoran Member Posts: 5

I am working for a customer on a procedure that needs to reset Credit Account balance. Following code ignores creditAccountID and does not update balance at CreditAccount.

What am I missing? Thank you.



 "employeeID": "1",

 "registerID": "3",

 "shopID": "1",

 "customerID": "1",

 "completed": "true"

 "SaleLines": {

   "SaleLine": {

     "itemID": "0",

     "note": "test reset CA balance",

     "unitQuantity": "1",

     "unitPrice": "-1.13",

     "taxClassID": "0",

     "avgCost": "0",

     "fifoCost": "0"



 "SalePayments": {

   "SalePayment": {

     "amount": "-1.13",

     "paymentTypeID": "11",

     "creditAccountID": "1"




This ignores creditAccountID

"paymentTypeID": "11" is custom paymentType.

If I use "paymentTypeID": "4" it works fine.


  • LeahLeah Moderator, Lightspeed Staff Posts: 212 moderator

    Hi Zoran,

    You need to use the payment type 'credit account' (in this case '4') to apply a deposit to a credit account with the API. This is similar to the workflow in the UI, where after you add a misc item with a negative amount to a sale in order to credit the customer account, when you click on 'Payment,' you need to use type 'Account' to credit the amount to the account. If you use a different type, it's as if you're refunding to that type, not the account.

    This is not made explicit in the documentation, so I will update it to make it more clear.

    API Support
    Lightspeed HQ
  • ZoranZoran Member Posts: 5

    Hi Leah,

    Thank you for the answer. I will have to play with what I have.

    I will use paymentTypeID=4 to balance out the credits, but I will need to save a note to mark this 'balancing' process.

    The code above (with paymentTypeID=4) works , but the "note" is not saved. Can you help me figure out why.

    Or, if you have a suggestion on how to mark payments done by this 'Reset Credit Account Balance' procedure.

    Thank you

  • LeahLeah Moderator, Lightspeed Staff Posts: 212 moderator

    The answer to your question is likely found here:

    If that doesn't help, could you explain your workflow and end goal in a bit more detail so I can advise? Thanks!

    API Support
    Lightspeed HQ
  • ZoranZoran Member Posts: 5

    Thank you Leah,

    Let me try this and I'll get back to you.


  • ZoranZoran Member Posts: 5

    Hello Lea,

    I found a way to get the result I wanted.

    Thank you,


Sign In or Register to comment.