#Nadiya-subscription

1 messages · Page 1 of 1 (latest)

deft haven
#

Hi! If you set the default_payment_method for the customer or subscription, then the following payments for the subscription should be done automatically.

#

Could you share a subscription ID where this happened (sub_xxx)?

minor gorge
#

sub_1KRaGQKWW6Esfew4fZnDXsVx

deft haven
#

This subscription belongs to a customer without a default payment method set, so it's expected that the following payment will fail.

minor gorge
#

should i set 'default_payment_method' here?

deft haven
minor gorge
#

actually its ok to fail for the past subscriptions (as we're on test mode now). but would like to have future subscriptions work properly

deft haven
#

Yes, everything is explained in the doc I shared above.

#

To summarize:

  1. listen to the invoice.payment_succeeded webhook event
  2. update the default_payment_method of the subscription
minor gorge
#

well.. i'm in a situation where i can't use webhook

deft haven
#

The other option would be to run a cron at the end of every day, to find all new active subscriptions, and set their default payment method.