Reputation: 505
i am building an android app in which i am using stripe for payment,so in my app i only want to accept debit card.So is there any way to check whether it is a credit or debit card while creating token in android app.
Upvotes: 2
Views: 1777
Reputation: 25652
When you tokenize a credit card in Stripe, your get a Token object back as documented here. It has a card
hash that contains the funding
property documented here:
Card funding type. Can be credit, debit, prepaid, or unknown
You can use this parameter to know what type of cards the customer is using and react accordingly.
Upvotes: 3
Reputation: 741
The magnetic strips on the card have more information than just numbers. And coming to your problem, the user always knows what card he has , so you can directly ask the user and store that information in your database.
Some info about magnetic strips https://en.wikipedia.org/wiki/Magnetic_stripe_card
Upvotes: 2