Get Used Payment Method

AI-generated summary

Getting the used payment method during order completion in a Customer UI Extension is not supported. The original issue was that useSelectedPaymentOptions was not working, and the clarification is that this API only works in Checkout UI Extensions, not Customer UI Extensions.

Key points:

  • useSelectedPaymentOptions is limited to Checkout UI Extensions.
  • Customer UI Extensions do not expose the selected payment method at order completion.
  • The reason given is security/privacy restrictions.

Suggested alternatives:

  • Move this requirement to a Checkout UI Extension if payment selection must be read during checkout.
  • If the payment details are needed after the order is created, retrieve them through the Admin API or via webhooks such as order/payment-related events.

Current outcome:

  • No direct API exists for this in Customer UI Extensions.
  • The question is effectively answered, but only with workaround options rather than an in-extension solution.

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 ?

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