#leonardo89 - Cancel Subscription

1 messages ยท Page 1 of 1 (latest)

trim charm
#

HI ๐Ÿ‘‹

#

It depends on how the subscription is configured. Is there a payment method associated with the customer that is used to bill off-session? Is the subscription configured to charge automatically or send the invoice to the user for payment?

pliant badger
#

the customer have a default payment method

#

and no the subscription do not send any email

#

charge automatically\

#

and yes is off-session

#

I saw in some test that when cancel a draft invoice is created

#

to pay in an hour

#

but I want to bill at the moment the subscription is canceled

trim charm
#

The invoice will always be created in draft mode to allow you to make any last minute updates. If you want to trigger it right away then you can listen for the invoice.created webhook event and immediately make the API call to finalize the invoice.
https://stripe.com/docs/api/invoices/finalize

pliant badger
#

I see this event duplicated

#

I execute the pay function

#

but I don't know why is 2 times executed

hidden cipher
#

๐Ÿ‘‹ stepping in as Snufkin needs to step away.