#vancouver_trader-failure-events
1 messages · Page 1 of 1 (latest)
Hi 👋 charges are lower level items and are associated with more than just invoices, so if you have a flow other than subscriptions you might see charge.failed events coming from that.
if subscription payment is failed, then it should be just invoice.payment_failed right ?
can you please provide sample for failed.. json file ?
A subscription payment failing will result in an invoice.payment_failed event being thrown.
The event object will look like our example, except the data.object field will be populated with the invoice object that had the failed payment.
https://stripe.com/docs/api/events/object
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
also one more thing
does it should also contain outcome ?
outcome: {
network_status: "declined_by_network",
reason: "expired_card",
risk_level: "normal",
seller_message: "The bank returned the decline code expired_card.",
type: "issuer_declined"
},
Reference - https://stripe.com/docs/declines#issuer-declines
No, that field resides on the charge object. If you want that information sent to your endpoint, then you'll need to listen to the charge.failed events. The first part of the event name (before the . ) indicates the object that will be returned inside of the event.
https://stripe.com/docs/api/charges/object#charge_object-outcome