`Card details not complete` when confirming a setup intent, using PaymentSheet
See original GitHub issueDescribe the bug
I’m using the PaymentSheet to collect card details. We’re using setup intents as we intend to process the payment later. We are able to create the intent and collect the card details, but when I use confirmSetupIntent
, I get the error from the title:
{
"code": "Failed",
"declineCode": null,
"localizedMessage": "Card details not complete",
"message": "Card details not complete",
"stripeErrorCode": null,
"type": null,
}
I’m getting confirmSetupIntent
from the useStripe
hook:
const { confirmSetupIntent } = useStripe();
Without confirming the setup intent, the card isn’t saved and the payment won’t be processed.
To Reproduce
- Create setup intent.
- Initialize payment sheet with setup intent.
- Collect card details.
- Confirm setup intent.
Expected behavior The setup intent is confirmed without error.
Screenshots n/a
Smartphone (please complete the following information):
- Device: iPhoneX
- OS: iOS 15.3.1
- React Native 0.64.2
- Stripe SDK 0.3.0
Additional context
I looked into the iOS/Android code and I think this isn’t supported by the SDK. The PaymentMethodFactory
that is responsible for creating paymentMethodParams
only seems to take a CardFormView or a CardFieldView. It doesn’t check for values in the PaymentSheet.
Is there another way to confirm the SetupIntent? The PaymentSheet is important for our business needs.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7
Hi! Sorry, lost track of this issue 😦
You can indeed use setupintents with the paymentsheet. I think the problem here is your are attempting to use
confirmSetupIntent
, where you should be usingconfirmPaymentSheetPayment
(or you can confirm outside of the client app, see the docs for more details on that and the rest of the flow). let me know if that helpsGotchya, I have a todo item to update the doc strings for all the components/methods, so you should have to rely less on the actual integration docs and get a better idea of exactly what to do right in your editor. This will be at the top of that list!