Accepting credit cards, warehouses, and shipping and fulfilling orders
We are generating Draft Orders using the REST API and then getting the Invoice URL to redirect customers to in order for them to complete their checkout. However, recently we have noticed a dramatic increase in the number of users who get redirected to the Invoice URL but see an error page.
Is there any way to check if an invoice is ready for payment before redirecting a user to that page?
I found this older thread - https://community.shopify.com/c/customers-discounts-and-orders/draft-order-api-asynchronous/m-p/6022... but the even older thread referenced in here is no longer available.
We use the Shopify API to create a Draft Order then, redirect the user to checkout.
We see this issue as well with some degree of regularity. It really is misleading to customers as well because they just need to reload the page (not go back to previous as directed). It is more than a little frustrating to find no real answers on this. Clearly the response to create the draft kicks off some asynchronous task that "takes time" to prepare the invoice.
Hey @Robert_Radtke & @chriswise71 -
I ran into this too! The docs mention that Draft Orders do indeed have async operations that need to complete before the link will work. They recommend inspecting the headers for a "retry-after" value, then polling the "location" URL sent in the headers (repeating until it's ready):
Thank you for pointing that out! Will implement this... not sure why I didn't see this in the docs before (new addition?)
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024