Payment statements: deposit in api

messhiasmesshias Posts: 35Member
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 Posts: 35Member
    Another screenshot example:


  • Adrian SamuelAdrian Samuel Posts: 515Moderator, Lightspeed Staff 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 Posts: 35Member
    edited January 8
    Hello @Adrian Samuel , yes exactly.
  • Adrian SamuelAdrian Samuel Posts: 515Moderator, Lightspeed Staff moderator
    edited January 8
    @messhias

    the payload will look something like this:


    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

  • messhiasmesshias Posts: 35Member
    @Adrian Samuel

    Which endpoint?


  • Adrian SamuelAdrian Samuel Posts: 515Moderator, Lightspeed Staff 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 Posts: 35Member
    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 Posts: 35Member
    @Adrian Samuel


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

    Thank you so much.
  • Adrian SamuelAdrian Samuel Posts: 515Moderator, Lightspeed Staff 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 Posts: 35Member
    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.