How to query payment passes in Apple Wallet?

Is there a way to query the available credit/debit cards in the users Apple Wallet? I want to be able to load a specific card when the user is about to pay with Apple Pay.

I don't need the card numbers or anything, just the card brand (like "Wells Fargo Active Cash"). I'm not a card issuer.

Answered by DTS Engineer in 796046022

Hi @guanzo,

On the PKPassLibrary object, there are two symbols:

The passes() method returns a list of passes (via PKPass) a user has already added to their Wallet. Similarly, the remoteSecureElementPasses property returns a list of passes that have already been added to a paired Apple Watch.

There is no de facto API for what you're asking for, as the branding of a payment card is more of a marketing description. Each issuer of the payment pass may elect to put this data as the localizedName, or within the localizedDescription, or neither.

If you'd like for the PassKit team to consider adding this functionality to its API, please submit a report in Feedback Assistant, explaining your use case(s). Once submitted, please reply here with the Feedback ID, so I may escalate to the PassKit team directly.

Cheers,

Paris

Hi @guanzo,

On the PKPassLibrary object, there are two symbols:

The passes() method returns a list of passes (via PKPass) a user has already added to their Wallet. Similarly, the remoteSecureElementPasses property returns a list of passes that have already been added to a paired Apple Watch.

There is no de facto API for what you're asking for, as the branding of a payment card is more of a marketing description. Each issuer of the payment pass may elect to put this data as the localizedName, or within the localizedDescription, or neither.

If you'd like for the PassKit team to consider adding this functionality to its API, please submit a report in Feedback Assistant, explaining your use case(s). Once submitted, please reply here with the Feedback ID, so I may escalate to the PassKit team directly.

Cheers,

Paris

What I'm really asking is, if the user adds a credit card to their wallet, am I able to query that card with passes() without being the card issuer. I'm just trying to figure out what cards exist in their wallet.

Hi @guanzo,

No, only issuers and associated providers (listed by the issuer in the pass metadata) can access the passes from the user's library.

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

@DTS Engineer Is it possible to query the passes from wallet using tokenReferenceID? We get tokenReferenceID from the backend API and we have to use that to identify if the payment card is already added to wallet or not and then display "Add to apple wallet" option.

Can you please help me how to do that?

How to query payment passes in Apple Wallet?
 
 
Q