#Nyxi
1 messages · Page 1 of 1 (latest)
or perhaps processing is also fine to cancel
I just tested this with a succeeded PI and got the following:
You cannot cancel this PaymentIntent because it has a status of succeeded. Only a PaymentIntent with one of the following statuses may be canceled: requires_payment_method, requires_capture, requires_confirmation, requires_action, processing.
So that is code: payment_intent_unexpected_state
mhm?
I have these in my log, so I assume it's identical:
"code": "payment_intent_unexpected_state",
"doc_url": "https://stripe.com/docs/error-codes/payment-intent-unexpected-state",
"message": "You cannot cancel this PaymentIntent because it has a status of canceled. Only a PaymentIntent with one of the following statuses may be canceled: requires_payment_method, requires_capture, requires_confirmation, requires_action, processing.",
Yes, sorry it's a little busy here so didn't get to the Error codes doc, just went straight to testing it
But given the description of the code, that seems to fit this use case: https://stripe.com/docs/error-codes#payment-intent-unexpected-state
Cool. Thanks.