Submitting orders from external website to Retail via eCom

in Development
We have an omnichannel setup. We are developing an integration which submits web orders from an external ecommerce website to Retail via the eCom API checkout process.
The website is calculating shipping and taking payment before submitting the order to eCom. The documented order creation process in eCom requires the following:
- the checkout is created
- the line items are added
- the available shipping methods and payment methods are requested
- the required payment shipping and payment methods are set on the checkout
- the checkout is validated
- the checkout is converted to an order
However this requires the identical payment methods and shipping methods to be created in eCom so that they are available to the checkout (step 3). Is that necessary? Or can I just use the website's shipping/payment calculations and submit these as a generic shipping cost? I see it is possible to use 'id' => 'external' for the shipping / payment method IDs - is that what I need here?
Thanks for any pointers.
3 comments
Hi @mootpoint Steps 3&4 of the checkout creation process cannot be bypassed. You could set up external shipping and payment integrations with our external services endpoint. The documentation on these can be found on the following pages:
However, it sounds like maybe all you are looking for is a way to create methods that can be used by your integration but will not be visible on the frontend in the eCom checkout. In this case it would be simpler to create shipping and payment methods to be used with your integration and then write a script that hides them from the checkout page. The script can be added using the ShopScript endpoint:
Lightspeed HQ
Hi Leah, thanks for your response.
To be clear, we are not proposing to use the eCom checkout at all, or any public-facing part of the eCom platform. We are only trying to submit a web order into Retail via the eCom API so that the stock levels can be updated.
We previously tried to submit the web orders via the Sale endpoint of the Retail API but then there was no way of handling the shipping.
What do your other customers with existing ecommerce websites do?
Sorry, I completely misunderstood your question. You can indeed skip Step 3 as you had originally inquired, and the 'external' method is the way to do this. You needn't create an external service, you only need to provide your payment and shipment details via the Checkout endpoint as outlined in the documentation below:
Lightspeed HQ