Passing API checkout with an already paid order and free shipping

ericsmalericsmal Member Posts: 2

Hi support,

Some of the suppliers on our platform are using Lightspeed eCom, both for supplying product information and receiving orders.

To create an order in Lightspeed we need to supply a payment and shipping method. Payment has already been done on our platform, and our suppliers agree to ship for free.

We want to be able to configure on our platform which shipping and payment methods need to be supplied on a per supplier basis. In an ideal world there would be 1 payment and 1 shipping ID that we could always use to reflect the "already paid" and "default shipping" options that we would like to supply for all Lightspeed store connections. But I understand that these methods are setup per store and therefor have different IDs.

Some questions to understand how we can most efficiently understand which methods are relevant for us:


Shipping method

There is a "Standaard verzending binnen NL" shipping option available. When I fetch the shipping methods through

https://developers.lightspeedhq.com/ecom/endpoints/shippingmethod/#get-all-shipping-methods

I find an entry with an ID that looks like "636605".

However, when I check the checkout shipping methods:

https://developers.lightspeedhq.com/ecom/endpoints/checkout/#get-shipment-methods

I find an entry with an ID that looks like "core|636605|123456"

Is there a way to obtain or calculate this ID without having to go through the checkout process and fetch the shipping methods there? As mentioned above, we want to be able to configure a shipping method ahead of time, and not have to do a test checkout to obtain relevant IDs.


Payment method

When checking out the payment options during checkout, we're seeing a "dummy" entry with title "Paytest". This entry does not appear when fetching the regular payment methods through:

https://developers.lightspeedhq.com/ecom/endpoints/paymentmethod/#get-all-payment-methods

Is this method always available or can it be turned off for some suppliers? This would help with having a default payment option.

If not, what payment option should we consider to pass on pre-paid orders?


Appreciate any insights, thanks!

2 comments

  • ericsmalericsmal Member Posts: 2

    Any thought or insights, anyone?

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 406 moderator

    Hi @ericsmal,

    Thank you for contacting us.

    Is there a way to obtain or calculate this ID without having to go through the checkout process and fetch the shipping methods there? As mentioned above, we want to be able to configure a shipping method ahead of time, and not have to do a test checkout to obtain relevant IDs. The checkout endpoint is mandatory to create a checkout and completing the order. This means that you'll need to do this call /checkout/#get-shipment-methods because your shipping method is based on the information that the customer has given and look for an ID that looks like "postnl|Brievenbuspakje" when you're using PostNL.

    Payment Method

    You'll need to set up your payment methods in the back office Settings->Payment Providers here you can choose which payments you want to use in your checkout. For pre-paid order you can use the invoice as payment method. Like you are mentioning above, after creating an order that is already paid, you can update the order https://developers.lightspeedhq.com/ecom/endpoints/order/#put-update-an-order and set the payment and shipment status to "paid" & "shipped"

Sign In or Register to comment.