Checkout UI extension usePhone inconsistent results

Topic summary

A developer is encountering inconsistent behavior with the usePhone hook in Shopify checkout UI extensions across different pages.

Main Issues:

  • Thank You Page: usePhone returns a UK mobile number in local format (e.g., 07000111222) instead of international format with country code (e.g., +447000111222). The international format is needed for GraphQL customer queries in the app.
  • Workaround observed: Using prevent_redirect=true and refreshing the thank you page returns the phone number with the full country code on the second load.
  • Order Status Page: usePhone returns an empty string, while useEmail works correctly on both pages.

Questions Seeking Resolution:

  1. How to obtain a country code formatted phone number on the thank you page?
  2. How to retrieve the customer phone number on the order status page?

The developer has already updated and received approval for customer protected data permissions. The inconsistency between usePhone and useEmail behavior, plus the formatting discrepancy, is blocking their implementation.

Summarized with AI on October 26. AI used: claude-sonnet-4-5-20250929.

Hi there, I am trying to make use of the customer phone number in a checkout ui extension. When an email is not provided, I’d like to use the phone number.

I am updated my customer protected data to reflect this and it has been approved.

What I have found is that when I use usePhone on the thank you page, I am returned a string, but in my case it is a UK mobile number starting with 0, e.g. 07000111222. I’d like to use this phone number as part of a graphql customer query in my app, but that only works with the full country code, e.g. +447000111222. I can’t see a way for me to find out in the checkout ui extension what the country code should be. Interestingly, when I use prevent_redirect=true and refresh the thank you page, on the second load I am given the phone number with the full country code.

Secondly, when I move to the order status page, usePhone just returns an empty string. Yet with useEmail, this works on both the thank you page and the order status page.

So my questions are:

  • How do I get a country code formatted phone number on the thank you page?
  • How do I get the phone number for the customer on the order status page?

Many thank in advance for any help here.