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?)
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025