#tounka

1 messages · Page 1 of 1 (latest)

nova geyserBOT
heavy obsidian
#

Hi there

#

So yes, you will see Sub ID and Invoice ID

thorny dune
#

thanks

#

and if i get the cutomer.subscription.deleted event, will there be an invoiceID?

heavy obsidian
thorny dune
#

i know the invoiceID is a property on the object. i'm curious since the subscription is being deleted, if an invoice would even be prepared

heavy obsidian
#

You mean would a new invoice be generated when you delete a Subscription?

thorny dune
#

yea or would the subscription.InvoiceId have the last invoice that was created or would subscription.InvoiceId be null

heavy obsidian
#

There is no invoiceId property on a Subscription object. There is a latest_invoice property which will always show the most recent invoice for that Sub. In terms of deletion, it depends on whether invoice_now (https://stripe.com/docs/api/subscriptions/cancel#cancel_subscription-invoice_now) is passed when deleting a Subscription for whether an invoice is generated. The default is that a new invoice will not be generated.

thorny dune
#

yea my mad, i meant latest_invoice. i'll be using the customer portal. What is the behavior on deletion?

heavy obsidian
#

Pretty positive customer portal does not generate an invoice on Sub cancellation. I'd recommend testing this out to be 100% though

thorny dune
#

got you. thank you!