Closed vacoo closed 7 months ago
There's a lot going on here with the subscription creation via Schedule, but at the core the issue seems to be that you're trying to confirm via Stripe.js an invoice-associated payment intent using a payment method you've already collected and set up for future usage. That mandate_data
is supplied automatically by Stripe.js via the Payment Element.
Is there a particular reason why you're trying to confirm this from the client? If you already have a reusable Payment Method set up for the customer as ['invoice_settings']['default_payment_method']
or the subscription default_payment_method
, you should be able to /pay
the invoice or confirm the payment intent server-side to complete the payment.
It's possible that there's a bug to address here, that the "extra" mandate data ought to be allowed, but I'd like to know more about the use case.
@brendanm-stripe Thank you very much for the clarification. I create a confirmation of the invoice via the server and everything worked
$this->stripeClient->invoices->pay($paymentIntent->invoice);
What happened?
When the cashapp payment method is linked to my account, an error occurs on the frontend when trying to pay. Everything works fine for other payment methods. Here's what the subscription creation code looks like:
Then an error appears on the frontend when the payment is confirmed: But I don't explicitly specify anywhere that mandate_data should be passed
POST https://api.stripe.com/v1/payment_intents/pi_3ObaIYCCk0EwjrzL0kMNZ1VR/confirm
Response:
Environment
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Reproduction
No response