Get Used Payment Method

Topic summary

Goal: Retrieve the selected payment method during order completion when using Customer UI Extensions in Shopify.

Key limitation: The hook useSelectedPaymentOptions is only available in Checkout UI Extensions and does not work in Customer UI Extensions. Customer UI Extensions cannot access the payment selection for security reasons.

Recommended approaches:

  • Post-purchase via webhook: Use orders/paid or orders/create to capture payment information from the order object after the transaction completes. A webhook is a server-to-server callback triggered by events.
  • Real-time in the UI: Switch to a Checkout UI Extension, where the useSelectedPaymentOptions hook can read the chosen payment method during checkout. A hook is a function/API provided by the extension framework to access UI state.

Outcome: The technical constraint is clarified with actionable alternatives. No code or attachments were central. Status: Guidance provided; resolution requires either implementing webhooks post-purchase or migrating to a Checkout UI Extension for real-time access.

Summarized with AI on February 10. AI used: gpt-5.

I am using customer-ui-extension, i want to get used payment method during the order completion. useSelectedPaymentOptions api is not working on custommer ui extension. How can i get this ?

1 Like

Hii @Shopify_Partner,

Thanks for the suggestion, but the requirement is to get the payment method on customer ui extension only.

hii @Mayank7845

useSelectedPaymentOptionsdoes not work in Customer UI Extensions it’s only supported in Checkout UI Extensions.

In Customer UI Extensions, Shopify does not expose the selected payment method at order completion for securityprivacy reasons. There is currently no API to read the used payment method in this extension type.

Workarounds

If you need payment info use a Checkout UI Extension instead
Or fetch payment details after order creationvia Admin API / webhooks (e.g. orders paid.

Thanks