I am building a custom storefront hosted on separate domain (let's call it the main domain or my-custom-shop.com) while the checkout process is still kept on Shopify's side.
I am at the point where I receive the products from Shopify, I create a list of product variants (cart), then using the checkoutCreate API I am able to create a checkout based on the list of product variants that I want.
The created checkout contains a webUrl field. The documentation says something like this:
"You can use the checkoutCreate mutation to create a new checkout. The return fields include the Checkout object with the webUrl field. The following mutation creates the checkout and returns the checkout id, the added line items, and the webUrl field that you'll use later to redirect the user to the web checkout."
The webUrl from my created checkout looks something like this: https://my-custom-shop.myshopify.com/7836781156/checkouts/3956aa5da506c6b4af025df964945300?key=b4ae7... (this is just an example, not a valid checkout URL).
The documentation says that I should redirect from my main domain (my-custom-shop.com) to the Shopify domain (my-custom-shop.myshopify.com) in order to complete the checkout.
My problem is, how do I get back from the Shopify domain (my-custom-shop.myshopify.com) to my main domain (my-custom-shop.com) when the checkout is complete so that I can say thank you to the customer and clear the previously created cart (list of product variants)? Is there a way of doing this? I don't see any callbackUrl or something similar in the documentation.
Thank you in advance.
|an hour ago|
|4 hours ago|
|4 hours ago|
|5 hours ago|