#smartkiparis
1 messages · Page 1 of 1 (latest)
Hi
You can check in the error object if you get a decline code:
https://stripe.com/docs/api/errors#errors-decline_code if you have one then it's a payment error, you can also monitor the status of the response, for example if it's an incorrect parameters of a query, you'll get a 400 http status
So for example
If I catch ApiErrorException ($e), I can access decline code with $e->getJsonBody() and then use 'decline_code' as a key in a returned array?
Yes, you can find more details here:
https://stripe.com/docs/error-handling?lang=node#payment-errors