Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Stripe Android SDK does not support Kosovo on billing information #6501

Closed
tnt-agonm opened this issue Apr 7, 2023 · 10 comments · Fixed by #6611
Closed

[BUG] Stripe Android SDK does not support Kosovo on billing information #6501

tnt-agonm opened this issue Apr 7, 2023 · 10 comments · Fixed by #6611
Labels

Comments

@tnt-agonm
Copy link

Summary

The Stripe Android SDK currently does not support Kosovo as a valid country for billing information. This means that users from Kosovo should select other country in order to complete transactions on Android devices that require billing information. This is particularly concerning since the iOS SDK does support Kosovo on billing information, creating an inconsistency between the two platforms.

Steps to reproduce

  1. Open an Android device that uses Stripe Android SDK for payments.
  2. You can’t find Kosovo on countries list.
  3. Users need to select other country to complete transaction.
    Screenshot 2023-04-07 at 10 14 37 AM

Proposed solution

We propose that Stripe Android SDK should include Kosovo as a valid country for billing information, in line with the iOS SDK.

Impact

This issue affects any users from Kosovo who use Android devices for Stripe payments. It creates a frustrating user experience and may lead to lost business for merchants using Stripe as a payment gateway.

Thank you for your attention to this matter. Please let me know if you require any additional information.

@tnt-agonm tnt-agonm added the bug label Apr 7, 2023
@jaynewstrom-stripe
Copy link
Collaborator

I'm not able to reproduce this.

Screenshot_20230407_093927

I also see the country code in our supportedBillingCountries

@tnt-agonm what SDK version are you using?

@tnt-agonm
Copy link
Author

@jaynewstrom-stripe I'm using SDK version 20.21.1

I noticed that in the Android PaymentSheet.kt file, the country code follows the ISO 3166-1 alpha-2 standard. However, in the iOS version, the standard used is ISO 3166-1 alpha-3. This could potentially be the root of the problem, as the difference in standards could be causing issues with how the country codes are being handled.
Screenshot 2023-04-07 at 7 54 47 PM

@jaynewstrom-stripe
Copy link
Collaborator

Could you give us some more information on how you're initializing PaymentSheet? Before we try to find a solution, I'd like to be able to recreate the issue.

@tnt-agonm
Copy link
Author

Yes sure, first, I declare:
private lateinit var paymentSheet: PaymentSheet

Then I will call setupStripe() on Activity onCreate(),

private fun setupStripe() {
    paymentSheet = PaymentSheet(this, ::onPaymentSheetResult)
}

and then make an API call to backend for creating an order, on success I will present user paymentIntent like this:

private fun handleStripe(paymentInfo: PaymentInfo) {
    val clientID = paymentInfo.remoteClientID ?: return
    PaymentConfiguration.init(applicationContext, clientID)

    val address = PaymentSheet.Address(country = "AL")   // Is set to pre-fill Albania as country code
    val billingDetails = PaymentSheet.BillingDetails(address = address)
    val configuration = PaymentSheet.Configuration(
        merchantDisplayName = "Premium",
        defaultBillingDetails = billingDetails)

    paymentInfo.remoteSecret?.let { remoteSecret ->
        paymentSheet.presentWithPaymentIntent(
            paymentIntentClientSecret = remoteSecret,
            configuration = configuration
        )
    }
}

and onPaymentSheetResult I handle the paymentSheetResult cases, Completed, Canceled, Failed.

@jaynewstrom-stripe
Copy link
Collaborator

I'm still not able to recreate this issue. I used the configuration you provided.

Screenshot_20230411_090728

@tnt-agonm
Copy link
Author

What other steps are you using, maybe I’m missing something.

@jaynewstrom-stripe
Copy link
Collaborator

@tnt-agonm
Copy link
Author

After some time of investigating this issue I can confirm that Kosovo is available as a billing address option on Stripe for Android version 33 and above. However, it appears that this option is not currently available for earlier Android versions.

If you can address this issue and make sure that Kosovo is available as a billing address option on all Android versions.

@jaynewstrom-stripe
Copy link
Collaborator

I see, that makes sense, I was using an API 33 emulator. I was also able to reproduce this on an older Android version. Looks like it was caused by #3570

I'm not sure if this is intended behavior or not, but I'll ask the team and get back to you.

@jaynewstrom-stripe
Copy link
Collaborator

Found a solution that should make it functional! Thanks for your diligence in getting this reproduced for us @tnt-agonm.

This will be in our next release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants