#edutomesco

1 messages ยท Page 1 of 1 (latest)

fervent oliveBOT
brave narwhal
#

You can decide what status the subscription should become when recovery fails.

lusty panther
#

when it says cancel de subscription

#

then the subscription_deleted webhook is sent?

brave narwhal
lusty panther
#

Thanks

#

each time I receive a payment_intent.payment_failed how I should procedure?

brave narwhal
lusty panther
#

thanks

#

you recommend to use invoice.paid better than payment_intent.succeeded?

brave narwhal
#

The invoice.paid and invoice.payment_failed events are specific to invoice payments. So when you receive these two events, you know they are triggered by invoice payments, not from PaymentElement or CheckoutSession.

#

It's really up to your implementation. Although it's my recommendation, you can also listen to payment_intent.payment_failed and get notified when an invoice payment failed.

lusty panther
#

for example when you will give access to a subscription when you receive invoice.paid or payment_intent.succeeded?

brave narwhal
#

You will receive both.

lusty panther
#

I'm just listening the these webhooks to change the subscription status, so what type of webhooks make subscriptions change?

lusty panther
#

who has the power to really enabled the subscription

#

because they are totally async

brave narwhal
#

If you register both events, you will find out they are fired at almost the same time. You say you want to change the subscription status, I don't think there's an API for you to explicitly change the subscription status,

lusty panther
#

so if arrive first the invoice.paid or the other they should have the same logic

#

otherwise how I can sync both

brave narwhal
#

so if arrive first the invoice.paid or the other they should have the same logic -> I don't know what you mean

thorn galleon
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!