The error can be something like this, but not always:
{
"error": {
"code": "payment_intent_unexpected_state",
"doc_url": "https://stripe.com/docs/error-codes/payment-intent-unexpected-state",
"message": "This PaymentIntent's payment_method could not be updated because it has a status of canceled. You may only update the payment_method of a PaymentIntent with one of the following statuses: requires_payment_method, requires_confirmation, requires_action.",
"param": "payment_method",
"payment_intent": {
"id": "pi_3Rb4YLCA43rfreFLGwyf",
"object": "payment_intent",
"amount": 1200,
"amount_details": {
"tip": {}
},
"automatic_payment_methods": {
"allow_redirects": "always",
"enabled": true
},
"canceled_at": 1750186105,
"cancellation_reason": null,
"capture_method": "manual",
"client_secret": "pi_3Rb4YLCApbmHflHx1OFLGrr5t",
"confirmation_method": "automatic",
"created": 1750186093,
"currency": "eur",
"description": null,
"last_payment_error": null,
"livemode": false,
"next_action": null,
"payment_method": null,
"payment_method_configuration_details": {
"id": "pmc_1N2yZiCApbmHflHxY34434u",
"parent": null
},
"payment_method_types": [
"card",
"link",
"paypal"
],
"processing": null,
"receipt_email": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"status": "canceled"
},
"request_log_url": "https://dashboard.stripe.com/test/logs/req_PotnmylP3terScb?t=1750186151",
"type": "invalid_request_error"
}
}