stripe-android
stripe-android copied to clipboard
Adding card using NFC and/or card.io
Hi Stripe, feature request/discussion: A lot of Android's have the ability to read cards with NFC/contactless with a library like this https://github.com/pro100svitlo/Credit-Card-NFC-Reader
We're thinking of integrating that library + use stripe's programmatical .set's Is this something that could be added to Stripe's library? I haven't seen any apps other than demo apps using contactless, does anyone have any thoughts on security/UX?
We'd also like to give the option to use the camera to add. Something like card.io, but the android library seems to be in a poor state. Is that something Stripe could ever work on?
Hi @ahaverty! Thanks for writing in with the suggestions :)
I want to make sure I understand the suggestions/questions:
- Are you asking if we can add NFC/contactless in the Stripe SDK or are you asking if we have opinions on the security UX of it?
- Are you asking for us to add card.io into the Android library? Were you imaging this would be part of the end to end solution using PaymentsSession or as a standalone widget?
- We're always looking to understand how the SDK can be improved. You mentioned the library is in a poor state, would love more details around that (haha don't worry about offending me, extra info is always helpful!!)
Hi @ksun-stripe I'm wondering if stripe can add either/both. I'd also like to hear if Stripe have any thoughts on the UX/security of either libraries/methods in the meantime.
This stripe library seems to be in great shape! I meant that the card.io android library has been in ruin for the last year.
iOS cardio is usable, surely android could have some great image/NFC libraries. I'm wondering why either aren't popular, maybe it's something I haven't thought of? Thanks for the help 👌
@ahaverty - I can't speak to everything here, but EMV (of which NFC is ~classified; thanks to ISO/IEC 14443) is a murky area. EMV (theoretically) requires hardware certification on a per device, per partner, per territory, and per card brand basis, as far as I know. Meaning, adding support for this is arguably a violation of the card network's terms. It's murky though, because it's tough to say if that's really true for cell phones.
From an Engineering perspective though, I love the idea of using NFC for this. So simple! I'm gonna ask around and see if anyone else has thoughts on this.
Moving this to our internal task tracking system so we can get it prioritized. :) https://jira.corp.stripe.com/browse/ANDROID-196 (internal only link for tracking purposes)
@ksun-stripe Any status update on this issue please? Card.io support would be greatly appreciated!
Hi @ksun-stripe, any update on that internal ticket?
Revolut.com have it in their android app 🤔
Any update on this?
@ksun-stripe @anelder-stripe hey! Any updates on this?
@IrinaBulygina thanks for resurfacing this issue. We're starting to investigate a card scan solution for our Android SDK. I'll share further updates here.
Very interested bro see what happened here. I have seen lots about the NFC payment method but yet to see it's possible
May I know the status of Card scan functionality? When It will be available for use?
@ChiragSavsani I don't have any updates to share at this time, but you can follow this issue to be notified of any future updates.
@mshafrir-stripe is there an update on this functionality? One of our clients explicitly wants card scan functionality, we chose Stripe as we know it is supported on the iOS version by default with the Stripe prebuilt components.
If there are no plans to add this functionality then would it be possible to do so with a custom implementation without using the pre-built components? I would like to know for certain before I set out to rebuild from the ground up .
I'm not sure of the complexity of building a Stripe integration myself, where would I find good documentation for use of the components such as CardInputWidget? Would using a CardInputWidget allow me to scan the card details and populate the card info from the scan callback? Would implementing these myself require extensive backend changes?
Any advice much appreciated.
Would be great to know if there is any update on this?
@jameslevine doesn't seem the Stripe team are doing any work on this right now, hopefully there'll be a proper solution soon.
In the meantime I setup my own solution with the help of our web team. For the API when you create an account, send a request to Stripe to create a new customer and then create endpoints for:
- Creating a new payment method from card number, expiry and CVC
- Listing all payment methods
- Making a payment
All of this can be setup on the Android side as well, but a lot of our payment logic was already on the backend so we decided to make the changes there.
In app all you have to do is create an Activity that allows you to add a new payment method, with a button to start card.io:
mBinding.scanButton.setOnClickListener {
startActivityForResult(Intent(this, CardIOActivity::class.java), CARD_IO_SCAN)
}
Then handle the returned card details:
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
if (requestCode == CARD_IO_SCAN) {
data?.getParcelableExtra<CreditCard>(CardIOActivity.EXTRA_SCAN_RESULT)?.let { creditCard ->
mBinding.cardNumberTextInputLayout.setText(creditCard.formattedCardNumber)
}
}
super.onActivityResult(requestCode, resultCode, data)
}
Finally a call to your server to create the card:
private fun createPaymentCard(cardNumber: String?) {
CallToServer.submitCardDetails(cardNumber)?.observe(this, Observer {
if (it.status == Status.SUCCESS) {
CoroutineScope(Dispatchers.IO).launch { AppDatabase.database.paymentCardModelDao().setDefaultCard(it.data?.paymentMethodID) }
finish()
} else {
// Handle errors
}
})
}
Then I just created another Activity that would fetch all PaymentMethods from the server and display them in app, with the ability to delete/select a PaymentMethod to be used for any payment. When making a payment I just send the PaymentMethodID
for the default card, or whichever the user has selected.
Hope that's helpful and gives enough info, the work took a lot less time than I had originally thought it would.
Any updates on this? Would be awesome if Stripe for Android had the same scanning feature as the iOS version!
I second what @DomenicBianchi01 said 👍
Any updates on this?
Thanks for your feedback. We don't have any updates to share at this time, but will keep this issue posted if anything changes.
Hi, is there any update on card scan in android stripe SDK
Any update ? Ineterrested in as well
Any update ? Ineterrested in as well
Hello! Stripe recently acquired Bouncer, which is a native android and iOS card scanning library (see https://getbouncer.com/scan and https://github.com/getbouncer/cardscan-android). Bouncer is presently working on integrating its card scanning technology into the stripe android and iOS SDK, with an anticipated release date in early 2022.
Okay so Stripe just announced the ScanCard feature, but I don't see any doc about it, I saw the repo , need to create a CIV intent , any infos please?
hi @Dave181295 , Stripe card scanning will release today, and will not require a CIV intent. CIV intent is for a future product.
That's fantastic news! When will Stripe's docs be updated? @awush-stripe
hi @Dave181295 we're working on the docs presently, and we'll likely be making some small API tweaks. Expect an update in the next few weeks.
@awush-stripe is there an update on this? are the docs up-to-date?
Hello , Any updates on having scan card option for android same like in IOS ?
Any updates on this?