#Halden-subscription-failure

1 messages ยท Page 1 of 1 (latest)

open vector
#

Hi ๐Ÿ‘‹ can you tell us more about the failures?

verbal grotto
#

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

open vector
#

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?

verbal grotto
#

Yes, I can see the payment_intent object

open vector
#

Awesome, and can you see what the status and last_payment_error fields are on the payment intent?

verbal grotto
#

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.

open vector
#

Can you copy/paste that invoice ID here?

verbal grotto
#

in_1KD83eHh8LoQ0RFqCnVE4B0a

open vector
#

Thanks, pulling it up

verbal grotto
#

Cheers

open vector
#

Sorry, for the delay. Nothing is jumping out at me and I'm looking into this further with a teammate.

verbal grotto
#

No worries at all, thanks for taking the time to investigate

open vector
#

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?

open vector
#

@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

verbal grotto
#

Thanks so much for the clarification, this is what I suspected.