Selected Payment Method name inside Checkout UI Extension

Selected Payment Method name inside Checkout UI Extension

garyrgilbert
Shopify Partner
428 41 179

Hi All,

 

Is it possible to access the selected payment method name from within a checkout ui extension?  I see the useSelectedPaymentOptions() hook but it only returns the payment method type and handle, and not the name of the payment method.

 

I need to know the name of the payment method that was selected in case there are more than one manual payment methods created, and take specific action based on the name and not the type.

 

Is there a way to accomplish this?

 

@Liam Could I get your input on this please?

 

Cheers,

Gary

 

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Replies 2 (2)

Liam
Community Manager
3108 340 871

Hi Gary - did you figure this out? If not I'll connect with the checkout team on this. 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

garyrgilbert
Shopify Partner
428 41 179

Hi @Liam 

 

Apparently there is no way to get the payment method name (the value that is available in the script editor or functions), the unique handle is also only accessible, as far as I am aware, after you install the extension and I have not found any way that I can allow a merchant to specify which payment method specifically they wish to target since apparently only the payment method type is available, and the handle has no "real' means of associating to the specific payment method.

 

So while it may be possible to know that two manual payment methods are different there is no way to provide a specific message for a specific manual payment method since there is no way of determining which to target since the merchant would only ever know the name.

 

So yeah if you could ask the checkout team about this I would appreciate it.

 

Cheers,

Gary

 

 

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution