#smartkiparis-paymentintent-decline
1 messages · Page 1 of 1 (latest)
smartkiparis-paymentintent-decline
Not directly. The PaymentIntent will have latest_charge: 'ch_123' and you can retrieve that Charge via https://stripe.com/docs/api/charges/retrieve to look at the payment_method_details
So any errors are in Charge too?
not "any" but declines are
okay, thanks
I am using PHP. To access object itself (e.g. PaymentIntent) on a webhook, I can use $event->data->object ?
and to access retrieved charge's fields, can I use $charge->payment_method_details->last4 ?
$event->data->object->id for the id for example yes
https://stripe.com/docs/api/events/object#event_object-data-object I mean it exists though
seems like a typing/validation issue in your system/IDE
which version of stripe-php do you use?
Yeah so to me it feels like just your IDE being too strict with validation, we don't have "types" in PHP, just PHPdocs for top-level properties
I fixed something, by installing library for phpstan-stripe