For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, and POS UI extensions
Hi Skrill,
Yes, it's possible to customize the payment options available to customers during checkout based on certain conditions, working with the tutorial you've linked. You can create conditions based on various factors, one of which could be the customer's location or country.
The Shopify Payment Customization API allows you to create custom functions that can manipulate the checkout process, including hiding, reordering, or renaming available payment methods.
However, do note that being able to show/hide specific payment methods depending on the customer's country might be dependent on the payment gateway's capabilities and what they support.
You'll also need to ensure that the logic in your payment customization function accounts for the country-specific conditions you want to implement.
Hope this helps!
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
hi @Liam, thank you for your answer. The idea is not to dynamically add or remove payment methods but to display the icons dynamically (based on country) in the same payment method. The purpose of this is to sync the icons with the payment methods available on the offsite payment page.