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

Invalid argument(s): requires_capture is not one of the supported values: requires_payment_method, requires_confirmation, requires_action, processing, succeeded, canceled #1421

Closed
reginojohnrobert opened this issue Sep 18, 2023 · 5 comments · Fixed by #1431
Labels
needs triage Needs triage

Comments

@reginojohnrobert
Copy link

I am getting this error on web

Invalid argument(s): requires_capture is not one of the supported values: requires_payment_method, requires_confirmation, requires_action, processing, succeeded, canceled

after calling the WebStripe.instance.confirmPaymentElement() function

To Reproduce
Steps to reproduce the behavior:

  1. Use PaymentElement widget on web
  2. Call the WebStripe.instance.confirmPaymentElement()
  3. Our BE uses the status requires_capture instead of succeed
  4. Throws an error upon parsing the PaymentIntentStatus

Expected behavior
Should'n throw a parsing error.

Additional context
Our BE uses the status requires_capture instead of succeed

@reginojohnrobert reginojohnrobert added the needs triage Needs triage label Sep 18, 2023
@victorkennedys
Copy link

Hey @reginojohnrobert . I think i may know the solution to this!

I was using flutter_stripe package on web to handle 3D Secure. We created the paymentintent on our server but handle the 3d Secure flow in app with the flutter_stripe package.

I encountered this issue when we passed this property when creating the payment intent:

capture_method: "manual"

When I removed the above line of code, it started working!

@BakerSmithA
Copy link
Contributor

@victorkennedys unfortunately, this also means we can't manually capture the payment though - removing capture_method: "manual" means the payment is automatically captured.

@BakerSmithA
Copy link
Contributor

The docs for PaymentIntent status mentions PaymentIntentsStatus it can be requires_capture:

/// requires_confirmation, requires_action, processing, requires_capture,

However, in the definition of PaymentIntentsStatus requiresCapture is not one of the options:

@BakerSmithA
Copy link
Contributor

BakerSmithA commented Sep 25, 2023

Working on a fix #1431

@Samuele1no
Copy link

@jonasbark @BakerSmithA
I have the same error in the newer version 4.6.0.
In the change log of this version there is this fix but in my payment_intent_status.dart there is no capture enum.
Could you check it? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Needs triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants