Skip to content

Conversation

josemiguel-alvarez
Copy link
Contributor

@josemiguel-alvarez josemiguel-alvarez commented Jul 17, 2025

This PR automates the process of fetching the accepted card brands from the Shop configuration in the Storefront API and maps those values to Apple Pay supported networks.

In the first video every card brand is enabled:

RPReplay_Final1752744667.MP4

In the second video I've disabled Visa and, as you can see, the card is not available:

RPReplay_Final1752744185.MP4

Before you merge

Important


Checklist for releasing a new version
  • I have bumped the version number in the podspec file.
  • I have bumped the version number in the README.
  • I have added a Changelog entry.

Tip

See the Contributing documentation for instructions on how to publish a new version of the library.

@josemiguel-alvarez josemiguel-alvarez self-assigned this Jul 17, 2025
@josemiguel-alvarez josemiguel-alvarez requested a review from a team as a code owner July 17, 2025 09:37
@josemiguel-alvarez josemiguel-alvarez force-pushed the jm/automate-supported-networks branch from fd1b784 to abf91c6 Compare July 17, 2025 10:00
@josemiguel-alvarez josemiguel-alvarez force-pushed the jm/automate-supported-networks branch from abf91c6 to 4ef0123 Compare July 17, 2025 11:52
@tiagocandido tiagocandido self-requested a review July 18, 2025 16:02
Copy link
Contributor

@tiagocandido tiagocandido left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@kieran-osgood-shopify kieran-osgood-shopify left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the PaymentSettings card brands can be used for the supportedNetworks

We can see the valid cards in my store here:
image

I think this is the relevant file in core, which shows the valid options
https://github.com/shop/world/blob/main/areas/core/shopify/components/payment_processing/app/services/apple_pay/payment_request_options.rb

We are missing support for cards like maestro if we use this api

@kristinhung
Copy link
Contributor

@kieran-osgood-shopify Automatically obtaining credit cards from a merchant's payment settings is more on the greenpath and already supports the major credit card brands. The API can also be easily evolved to support more cards, even if it doesn't allow for all cards today.

Although having the merchant configure this separately could immediately allow merchants to use all of their supported credit card brands, this pattern is not scalable for partner use cases and creates more work for merchants and potential out of sync issues.

Copy link
Contributor

@kieran-osgood-shopify kieran-osgood-shopify left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved if we are happy with accepted card brands having being more limiting than the current capabilities

@kieran-osgood-shopify kieran-osgood-shopify merged commit 8634e80 into main Jul 22, 2025
7 of 9 checks passed
@kieran-osgood-shopify kieran-osgood-shopify deleted the jm/automate-supported-networks branch July 22, 2025 14:19
tiagocandido pushed a commit that referenced this pull request Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants