Gift card not being charged after sale

quotedquoted Member Posts: 18

Hi,

I'm having problems charging up a gift card.

The card is being created fine and is visible in Lightspeed (balance € 0).

The order / payment is also processed without errors (see JSON below).

But the balance of the gift card is not changed afterwards.

See my call below, what am I doing wrong?

POSTED TO: https://api.lightspeedapp.com/API/Account/{$lightspeed_account_id}/Sale.json


{
   "completed":true,
   "referenceNumber":"1505",
   "customerID":"3",
   "employeeID":1,
   "registerID":1,
   "shopID":1,
   "taxCategoryID":1,
   "SaleLines":{
      "SaleLine":[
         {
            "itemID":"675",
            "unitPrice":"0.60",
            "unitQuantity":"1"
         },
         {
            "unitQuantity":1,
            "unitPrice":"-0.45",
            "tax":true,
            "taxClassID":1,
            "avgCost":0,
            "fifoCost":0,
            "note":"Promocode"
         }
      ]
   },
   "SalePayments":{
      "SalePayment":[
         {
            "amount":"-10.00",
            "creditAccountID":478,
            "PaymentType":{
               "paymentTypeID":5
            }
         },
         {
            "amount":"10.15",
            "PaymentType":{
               "paymentTypeID":10
            }
         }
      ]
   }
}


Thank you.

2 comments

  • gregaricangregarican Member Posts: 702 

    I haven't looked at this API endpoint in awhile, but don't the sale line item amounts and the sale payment amount have to match? In this case the amounts do match up to a net $0.15 amount. So that's okay. Are you sure the paymentTypeID values are correct?

  • quotedquoted Member Posts: 18

    Thank you for your time!

    The payment type ID's are indeed correct.

    I also tried different things:

    • Create Sale first (POST) and add payment / completed after (PUT), like in the documentation
    • Create Sale + Payment of only the gift card in one Sale POST

    The first doesn't seem to work (balance error), the second gives back a correct sale, but the linked gift card / creditAccountID stays at 0...

    I'm really out of options here, or I do something very wrong.

Sign In or Register to comment.