Payment statements: deposit in api

messhiasmesshias Member Posts: 35
Hello, I would like to know if there's a option to make payment of customers statements in the api like in screenshot bellow:



Thanks for the help.

10 comments

  • messhiasmesshias Member Posts: 35
    Another screenshot example:


  • Adrian SamuelAdrian Samuel Moderator, Lightspeed Staff Posts: 569 moderator
    Hey @messhias to clarify your question, are you asking how to make deposit payments via the API?

    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

  • messhiasmesshias Member Posts: 35
    edited January 8
    Hello @Adrian Samuel , yes exactly.
  • Adrian SamuelAdrian Samuel Moderator, Lightspeed Staff Posts: 569 moderator
    edited January 8
    @messhias

    the payload will look something like this:


    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

  • messhiasmesshias Member Posts: 35
    @Adrian Samuel

    Which endpoint?


  • Adrian SamuelAdrian Samuel Moderator, Lightspeed Staff Posts: 569 moderator
    @messhias the Sale endpoint. You make a Post request with the above information in the request body 

    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

  • messhiasmesshias Member Posts: 35
    My object:



    'completed' => true,
      'customerID' => '2826',
      'employeeID' => 1,
      'shopID' => 1,
      'registerID' => 1,
      'SalePayments' => 
      array (
        'SalePayment' => 
        array (
          0 => 
          array (
            'amount' => -1000,
            'paymentTypeID' => 4,
            'registerID' => 1,
            'employeeID' => 1,
          ),
        ),
      ),
    )  


  • messhiasmesshias Member Posts: 35
    @Adrian Samuel


    The endpoint is the sale as well and payload works like a charm.

    Thank you so much.
  • Adrian SamuelAdrian Samuel Moderator, Lightspeed Staff Posts: 569 moderator
    @messhias, you need to balance the payments, because although the payload will work without the positive payment object you've effectively given free money to the customer. There is no record of them having paid a deposit. All you've done is assign credit to the customer, as there is no balancing payment for that deposit

    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

  • messhiasmesshias Member Posts: 35
    Hi @Adrian Samuel , sorry for late reply, but i'm just passing by to let you know everything is working properly, thanks so much for your support.

Sign In or Register to comment.