post-purchase-ui-extensions-react how to get customer email?

Topic summary

Topic: How to obtain a customer’s email in a Shopify post-purchase UI extension (React) using the Remix template.

  • Current setup: A post-purchase extension invokes a server endpoint and sends customerId.
  • Key question: Is there a way to access the customer’s email directly within the extension, or alternatively retrieve it on the server side given the customerId?

Notes:

  • Two code screenshots are provided (extension and Remix server code), which appear central for context but exact code is not detailed in the thread text.

Status and outcomes:

  • No answers or guidance provided yet.
  • The inquiry remains open with the main unresolved point being the proper method/location (extension vs. server) to fetch the customer email.
Summarized with AI on January 15. AI used: gpt-5.

I am using the REMIX template for post-purchase-app with a post-purchase-extension that calls and endpoint and passes the customerId.

I wonder if there is a way to retrieve the user email directly in the extension? or in the server side app?
EXTENSION:

REMIX: