#edutomesco
1 messages ยท Page 1 of 1 (latest)
Hi there, you can control this in settings https://stripe.com/docs/billing/subscriptions/overview#smart-retries
You can decide what status the subscription should become when recovery fails.
when it says cancel de subscription
then the subscription_deleted webhook is sent?
Yes, you will receive a customer.subscription.deleted event. (https://stripe.com/docs/api/events/types#event_types-customer.subscription.deleted)
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
each time I receive a payment_intent.payment_failed how I should procedure?
For payment failure on subscription invoices, I'd recommend listening to invoice.payment_failed instead. https://stripe.com/docs/billing/subscriptions/webhooks#payment-failures
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.
for example when you will give access to a subscription when you receive invoice.paid or payment_intent.succeeded?
You will receive both.
I'm just listening the these webhooks to change the subscription status, so what type of webhooks make subscriptions change?
but then when it's mandatory?
who has the power to really enabled the subscription
because they are totally async
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,
I mean I should give access to the product
so if arrive first the invoice.paid or the other they should have the same logic
otherwise how I can sync both
so if arrive first the invoice.paid or the other they should have the same logic -> I don't know what you mean
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!