#DamManc
1 messages ยท Page 1 of 1 (latest)
You can listen to either of those events but invoice.payment_failed is probably the better one here. That event would immediately have info on which subscription it was attached to so you can more easily figure out who to email
Perfect! Thank you! ๐
now, I need a link that update the card of that user
is it possibile? @runic sparrow
Yes, that should be possible. When your user gets this email, will they be redirected to a custom page of yours to make the payment? Or will they be directed to the Stripe page for the invoice?
๐ Pompey needs to step away so stepping in here
You want the hosted_invoice_url here: https://stripe.com/docs/api/invoices/object#invoice_object-hosted_invoice_url
the customer already have inserted its card detail
i need to create an invoice to update this payment?
@spark belfry
The invoice is already created due to the Subscription
oh yes, of course ahah ok perfect, so i need to retrieve this invoice: I can do that with listen the invoice.payment_failed webhook and with this url the customer can insert new payment detail, right ?
@spark belfry
Yep exactly
(No need to tag me each time you respond, I'll come back around don't worry! ๐ )
perfect! thank you, But the subscription will delete in automatic ways if this payment failed another time? How can i manage this? E.g. After 24h the subscription will be deleted
Can you explain what you mean by that exactly?
The Sub will expire after the 23 hour expiry window, yes.
If that happens, you would need to create a new Subscription for your customer if you still want them to subscribe
ook perfecrt! thank you alot ๐