#Halden-subscription-failure
1 messages ยท Page 1 of 1 (latest)
Taking a look at the event, the source is Automatic
Can't find a failure code anywhere on the event, it just says invoice.payment_failed
So we're going to want to look at the associated Payment Intent to figure out why it failed. Within that event there should be an invoice object, do you see a payment_intent field on that object?
Yes, I can see the payment_intent object
Awesome, and can you see what the status and last_payment_error fields are on the payment intent?
I can see the status but not the last_payment_error
It says Succeeded after manually retrying
The Automatic event however, fails
The above screenshot is from the 'Events and logs' section on the Payment Intent.
Can you copy/paste that invoice ID here?
in_1KD83eHh8LoQ0RFqCnVE4B0a
Thanks, pulling it up
Cheers
Sorry, for the delay. Nothing is jumping out at me and I'm looking into this further with a teammate.
No worries at all, thanks for taking the time to investigate
I'm still looking into the objects on our side, but while I do that can you articulate what steps you take to manually retry the payment that succeed?
@verbal grotto apologies for not spotting the cause sooner. The reason you're seeing that behavior is because a default_payment_method isn't defined for the subscription, so we look to the customer record for either their invoice_settings.default_payment_method or default_source but don't find values set for either of those. At this point we deem that we don't know which payment method to charge and send an invoice.payment_failed event.
You can avoid this by either specifying a default_payment_method for the subscription or on the customer record:
https://stripe.com/docs/api/subscriptions/update#update_subscription-default_payment_method
https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thanks so much for the clarification, this is what I suspected.