I'm using the basic integration of the Stripe SDK and I cannot add a credit card on to my Stripe customer account. Creating the Stripe account works fine and if I already have a credit card,
then I can select it for payment. In short, every thing works in the SDK but I can't add a new credit card.


iOS 13.3
Through the basic integration guide: https://stripe.com/docs/mobile/ios/basic
Pod: 18.4.0, API: 2019-12-03, NPM: 8.8.0
We're testing this on the Stripe test platform, trying to add the credit card 4242.
Hi @mansoorshahsaid
Do you use Stripe Connect / set stripeAccount anywhere?
Hey @yuki-stripe, I'm not using Stripe Connect anywhere. I'm simply using Stripe Payments with the basic integration for iOS. We tested it on our Android app and everything works fine. There are no problems when adding a credit card. But on iOS, I keep getting this same error every time I'm trying to add a card.
Also what do you mean by set stripeAccount?
@mansoorshahsaid Ah I thought this could be related to Stripe Connect, but never mind!
It looks like the PaymentMethod in the screenshot was created using one account, but the ephemeral key you provide is for a Customer created under a different account.
Could you check that the SDK's publishable key and the server's secret key are for the same account? You can view testmode keys here: https://dashboard.stripe.com/test/apikeys.
Ah yes, that was such a silly mistake! We double checked and in fact iOS was using a publishable key for a different Stripe account. We changed it to the right one and now everything works!
Thanks a lot @yuki-stripe! Now everything is back to normal 馃槃
Most helpful comment
Ah yes, that was such a silly mistake! We double checked and in fact iOS was using a publishable key for a different Stripe account. We changed it to the right one and now everything works!
Thanks a lot @yuki-stripe! Now everything is back to normal 馃槃