简体   繁体   中英

Stripe APIs and determine the card type

We need to determine the type of card before we authorize an amount on Stripe for payment on a retail payment terminal. We looked at multiple APIs, but cannot find an API where the logic is as follows:

  1. Make the API call
  2. Determine if the card type is Debit or Credit
  3. If the card type is Debit, then charge $X
  4. for all other card types, charge $X+an additional %age

We cannot find any APIs where we are able to figure out CardType on a retail terminal while the card is inserted and then have a prompt that shows the current amount on the terminal. Currently if we use the Payment Intent APIs, once we get the card type, we need to initiate an "Auth + Capture" so we are being forced to ask the user to re-insert the card.

We have tried the Payment Intent API

Stripe Terminal lets you inspect card details and run business logic before processing the payment using collectPaymentMethod :

You can check the card_present.funding property on the Payment Method returned by collectPaymentMethod to determine if the card used is a credit or debit card and update the Payment Intent's amount as needed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM