How to get the order ID on the store thanks page

Topic summary

Goal: obtain the order ID on Shopify’s thank you (order status) page for an app that tracks distributors.

Key suggestions:

  • JavaScript approach: use Shopify.checkout.order_id on the thank you page to read the order ID.
  • Liquid alternative: if the Shopify.checkout object isn’t available, output the ID via Liquid: {{ checkout.order.id | json }}.

Issues raised:

  • Multiple developers report that Shopify.checkout isn’t available on many stores, causing the JS method to fail.
  • No explanation was provided for why Shopify.checkout is missing in those cases.

Current status:

  • A practical workaround was shared (Liquid: {{ checkout.order.id | json }}), which can expose the order ID even when the JS checkout object is absent.
  • The root cause of Shopify.checkout being unavailable remains unanswered, and no definitive resolution was reached.

Action items:

  • Try Liquid output of checkout.order.id on the order status page, and consume it with JavaScript if needed.
  • Investigate store-specific settings or themes if Shopify.checkout is missing (not addressed in thread).
Summarized with AI on January 4. AI used: gpt-5.

Shopify.checkout isn’t available on many stores. Do you know what could be the possible reason for this? Also, any alternatives to get order ID if checkout object isn’t accessible?

1 Like