The docs for api version 2026-01 say that the pos.purchase.post.block.render target should allow access to the order id and name.
I’m trying to just show the order name on this order confirmation screen, using an exact copy of the code in the docs, but requesting {shopify.order.name} instead of {shopify.order.id}.
The block shows up, but the order name shows as blank.
Hi
Peter the reason the order name is showing blank is because in POS UI extensions there is no global shopify object available in the JSX at runtime, even though the docs example can make it look that way. In the pos.purchase.post.block.render target (API 2026-01), order data is provided through the extension API, not as shopify.order.* in the template. That means {shopify.order.name} won’t resolve to anything, so it renders empty. Instead, you need to access the order via the POS extension API (for React-based extensions this is done using useApi() from @shopify/ui-extensions-react/point-of-sale) and then read order.name from that object. Also note that while order.id is guaranteed to exist, order.name may not always be populated at the exact moment this render target fires — depending on the POS build, sometimes only the ID is available initially. So the blank value you’re seeing is not a rendering bug in your block; it’s because the data isn’t being accessed through the correct API surface (and potentially because name isn’t populated yet in this lifecycle stage.
Thanks for your response. I’m not sure it’s correct though.
As of version 2025-10 the useApi calls were replaced with the global shopify object (see screenshot)
The global shopify object definitely exists because I can use it to access the order id, just not the order name.
I was interested about the idea of it not being populated at render so I tried replacing it with a button so it could be clicked after a time to display the order name, in the hope it might be populated at a later time. But that didn’t work either.