How to redirect user back to the Sales Channel once the Shopify Payment is completed?
I have build a Sales Channel for my e-commerce website. The Sales Channel loads shopify products from Shopify stores to my e-commerce website.
Now I want to implement theBuy
functionality: the user selects a product in my e-commerce website. I would create aDraftOrder
and send the draft order to Shopify, shopify would respond with aminvoice-url
.
Now I can redirect the user to thisinvoice-url
to make the payment directly through Shopify... but I want to redirect the user back to my e-commerce website, once the payment is completed.
Is it possible to implement this redirect functionality?
Note: I had asked a similar question (https://stackoverflow.com/questions/61039791/how-to-create-an-order-from-sales-channel-and-redirect-the-user-to-shopify-store) trying to achieve the same goal using Checkout API.
Answer
Solution:
You cannot do too much on the order status page - the page customer gets in once an order is placed and paid. You can add custom scripts on the shop's checkout settings page: Add Additional Scripts (https://help.shopify.com/en/manual/orders/status-tracking/customize-order-status#add-additional-scripts). For example, you can show a message with a link back to your sales channel.
If you're on Shopify Plus you can customize (https://help.shopify.com/en/manual/orders/status-tracking/customize-order-status#edit-the-checkout-liquid-file)checkout.liquid
directly.
Source
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.