How to react to card network on onpaymentmethodselected?

We're currently evaluating Apple Pay as a payment method on our site. For Amex US credit card payments, we charge a payment fee. For other credit cards, there is no such fee.

However, for Apple Pay it seems we cannot configure this. What we currently tried is to implement onpaymentmethodselected. However, only the card type is part of the event, not the card network.

Example code:

session.onpaymentmethodselected = event => {

   /* event.paymentMethod only contains {type: "credit"} */
   console.log('onpaymentmethodselected', event.paymentMethod);

   /* event.paymentMethod.network is therefore undefined, if we could have here 'amex', 'mastercard' etc, we could implement the payment fee we currently have*/
   console.log('onpaymentmethodselected', event.paymentMethod.network);

   session.completePaymentMethodSelection({});
};

Is there a way to access the network in this callback?

Or is there another way to implement payment fees with certain networks used via Apple Pay?

Answered by DTS Engineer in 812972022

Hi @C24AndreasHager,

Apple Pay shares the payment network name after the user has authenticated with Face ID or Touch ID. The only payment network information available before authentication via onpaymentmethodselected is the payment card type, such as credit or debit.

If you'd like for the Apple Pay engineering team to consider your use case, please submit a report via Feedback Assistant. Once submitted, reply here with the Feedback ID so I can escalate your report with the team.

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

Hi @C24AndreasHager,

Apple Pay shares the payment network name after the user has authenticated with Face ID or Touch ID. The only payment network information available before authentication via onpaymentmethodselected is the payment card type, such as credit or debit.

If you'd like for the Apple Pay engineering team to consider your use case, please submit a report via Feedback Assistant. Once submitted, reply here with the Feedback ID so I can escalate your report with the team.

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

How to react to card network on onpaymentmethodselected?
 
 
Q