Hi everyone, I'm developing a payment app for Shopify and I'm just wondering if we can display the payment method icons dynamically on the checkout page depending on the customer's country, e.g. only show VISA and Sofort for German customers. Is it possible to do this using the payment customization described here https://shopify.dev/docs/apps/checkout/payment-customizations?
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.
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.