Problem with checkout in sample app
Closed this issue · 1 comments
Describe the bug
I am running the test project to know how to use the checkout in flutter web, I know nothing about the account setup, someone else did that, set up the test keys, run the server and then the app in web mode, I went to the checkout option and press the button, nothing happened, check the logs and apparently when the _createCheckoutSession
method is executed it should return an id
field in the body, but it does not return it and therefore does not launch the checkout, run the mobile version of the same project and the error persists.
Is this a sample error or a misconfiguration on the test account?
To Reproduce
Steps to reproduce the behavior:
- Clone and setup project
- Go to
Checkout
option (last on the list) - Observe a failure with exception pointing to
checkout_screen.dart
file, line 78:35
Expected behavior
Checkout option should work correctly
Smartphone / tablet
- Device: Android Emulator
- OS: Android 14
- Package version:
- Flutter version : Flutter 3.22.2 • channel stable
Additional context
Here's a screenshot of the error log:
I tried checking the response body and I see the properties customer
, ephemeralKeySecret
, setupIntent
, but no id
, I can see that all the queries related to this feature are returning a status code of 200, so I suppose that they're working:
I also tried replacing the id
with the customer
field, but then now I have this error:
Error IntegrationError: stripe.redirectToCheckout: Invalid value for sessionId. You specified 'cus_QSPOwKyrpuB2M5'.
Checkout is not supported anymore by this library since it now only relies on backend implementation. See: https://docs.stripe.com/payments/checkout