#leonardo89-cards
1 messages · Page 1 of 1 (latest)
👋 happy to help
if you want to replace a card you'd have to manually detach the old one and add the new one
let me know if you need any more help
yes
my friend I have another doubt
if I cancel a subscription, in the last invoice property from the subscription object from the event customer.subscription.delete are the drafted invoice
???
let me explain better
- cancel subscription
- I receive webhook event customer.subscription.deleted
- Get latest invoice from subscription object send inside the event
Question: Is this latest invoice the draft invoice created when I cancel the subscription
?????
I'm not sure to be honest
at that point I think the last invoice is created and the Subscription object's latest_invoice should be updated with the final invoice
but I need to test it to be a 100% sure
ok if you have an answer later can you please let me know???
yes I'm trying to test it as we speak
ok so I have a couple of answers for you
but first a quick question, do you need proration?
and are you creating metered usage subscriptions?
@jagged trail if the answer to both of these questions is no, then the latest_invoice on the subscription object you get on the customer.subscription.deleted event will be the last invoice that the customer paid which is the that of the current billing period
no I don't need a proration, and yes I'm creating metered subscription
if the customer cancel the subscription before end of billing period
I need to charge the usage during the period
then you'll have to record the usage before the cancellation
yes, Im currently doing
actually when I cancel the subscription
I'm setting the invoice_now att to true
so a draft invoice is created when I cancel the subscription
the doubt is
do you have the request id? here's how you can find it
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
this is the evt id
evt_1LIFIsGyos0XH35lOpd2J4ag
request ID
req_JRdASARpS2wvop
I confirmed
I just checked
the last invoice value from subscription sent in the event
yes
sorry it took me a while to get there
I'll have to step away for now, so I'll archive the thread