Add payment and shipment to the checkout fail

VukBVukB Member Posts: 6

I am a bit stuck. I hope you can help me. When I try to add shipment and payment method to the checkout, nothing happened.

For example, the documentation says that I need to send a model like this 

{
  "shipment_method": "core|33265|63138"
}

in the PUT request model. Using GET shipping methods I found the one I need and pass his id to the model like this:

{

  "shipment_method": "611509"

}

Also, I tried to pass this property when I am creating the checkout. Still nothing happened. The shipment_method is still null.

Then, as the documentation says I add this property when I am creating the checkout:

"shipment_method":{

        "id": "core|611509"

    }

and:

"shipment_method":{

        "id": "611509"

    }

and:

"shipment_method":"611509"

   

The shipment method is still null. For this I am using postman. Can you please help me?

Also, I have a problem with payment method. 

As you can see on image, I want to use iDeal payment method. When I get all the payments method I got: 

{

    "paymentmethods": [

        {

            "id": 143,

            "key": "mollie2",

            "title": "Mollie 2"

        },

        {

            "id": 96,

            "key": "banktransfer",

            "title": "Advance payment via bank transfer"

        }

    ]

}


I think I should use the first one. Right? I am not sure how the model should look like when I want to use the iDeal payment method. Can you show me an example?


6 comments

  • VukBVukB Member Posts: 6

    One more question.

    {
      "shipment_method": "core|33265|63138"
    }
    
    
    

    What is "63138"? Where I can find that Id?

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 861 moderator

    Hi @VukB,

    Thank you for contacting us.

    Please check our docs here: https://developers.lightspeedhq.com/ecom/endpoints/checkout/

    You can find here which call you need to make for getting the right results.

  • VukBVukB Member Posts: 6

    Hello @LucienVersendaal,

    Thank you for responding.

    Unfortunately you didn't answer my questions. I have already read the documentation. I cannot add the shipment method to the orders. Can you tell me more information about that?

    {
      "shipment_method": "core|33265|63138"
    }
    

    I figured out that the first id is the id of the shipment method and that is ok. But what is the second id and where can I found that?

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 861 moderator

    After creating a new checkout and fill in the customer details, you add the products to the checkout. After you've added the product(s) you're getting the available shipments and add it to the checkout using the ID of this shipment. So for example, when I'm getting the available shipment in my test shop I see this:

    So "postnl|Brievenbuspakje" is the ID. Now I will use this ID when updating the checkout:

    The checkout step will change to "payment" after you've add the shipment. Now you're adding the payment. First you'll need to get the available payment, for example in my test shop I see this:

    Now I update the checkout again to update the payment method:

    Now you'll see the step is "confirm" this means you MUST validate the checkout before converting the checkout to an order.

    I hope this helps.

  • VukBVukB Member Posts: 6

    Yes! That is what I needed. Thanks!

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 861 moderator

    Perfect! Good luck!

Sign In or Register to comment.