Storefront API Billing address for order

SpringSummer
Shopify Partner
2 0 3

Hello,
We're currently building a headless Shopify store for a customer using the Storefront API.
When displaying customer's order detail, we would like to show the shipping address as well as the billing address that the order has. I seem to be unable to find a way how to get the billing address out of the Storefront API, is there something I'm missing or is that simply not available?

Thank you,


There is also a duplicate thread https://community.shopify.com/c/Shopify-APIs-SDKs/GraphQL-Storefront-API-how-to-retrieve-order-payme...
but that has not been answered for over a year.. 

Replies 2 (2)
nrion
New Member
2 0 1

hi, have you found a solution for this?

FactoryAidan
Shopify Partner
9 1 5

The Billing MailingAddress lives on the Order's Payment object. Although Shopify allows queries for a Payment by Payment.id via the Query Root’s Node field, there is no way to know the Payment.id from the Storefront API; a reference to the Payment is not reported on the Order object or any other object on the API. So for now, there is no way to display the Customer’s Order.Payment.billingAddress.

To speculate, I believe Payment data must be protected behind a CustomerAccessToken because it certainly holds protected information. However, making it available on the Query Root’s Node field certainly doesn't provide that protection. It seems Shopify's API development team needs to take time to consider this and other factors involved.

Looking at the unstable API version slated for a 2022-04 release, this has not been updated there either. Which means we're not likely to get this Payment data association anytime sooner than 2022-07 at the earliest and I wouldn't hold my breath for a release next year at all.

It would be nice if they attached the Billing MailingAddress Object directly to the Order object like the do on the GraphQL Admin API.