Skip to content

Card details not complete after dangerouslyUpdateCardDetails #2314

@FeDev9

Description

@FeDev9

Describe the bug
When attempting to create a payment method after updating card details with dangerouslyUpdateCardDetails, a StripeException is thrown with the error "Card details not complete" despite the card information being entered in the card field. This issue appeared spontaneously without updating any package versions.

To Reproduce
Steps to reproduce the behavior:

  1. Enter card number "4242-4242-4242-4242" into the custom card field
  2. Call await stripe.dangerouslyUpdateCardDetails(cardDetails) to save the card details
  3. Attempt to create a payment method using:
return await stripe.createPaymentMethod(
  params: stp.PaymentMethodParams.card(
    paymentMethodData: stp.PaymentMethodData(
      billingDetails: stp.BillingDetails(name: cardOwner),
    ),
  ),
);
  1. Observe the following exception:
StripeException(
  error: LocalizedErrorMessage(
    code: FailureCode.Failed, 
    localizedMessage: Card details not complete, 
    message: Card details not complete, 
    stripeErrorCode: null, 
    declineCode: null, 
    type: null
  )
)

Expected behavior
The payment method should be created successfully after the card details are updated via dangerouslyUpdateCardDetails, or a more specific error should indicate which card detail fields are missing/invalid (e.g., expiration date, CVV).

Smartphone / tablet

  • Device: Multiple iPhones
  • OS: iOS 26.2
  • Package version: 12.1.1 - 12.2.0
  • Flutter version 3.35.7 - 3.38.7

Additional context
This issue started occurring without any package version updates or code changes

The error occurs specifically after calling dangerouslyUpdateCardDetails but before createPaymentMethod

It's unclear if the issue is due to missing card details (expiry, CVV) or if dangerouslyUpdateCardDetails isn't properly storing the card information

The error message lacks specificity about which card detail fields are incomplete

This suggests a potential issue with Stripe's backend API changes or native SDK updates

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingneeds triageNeeds triage

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions