#Jayy

1 messages ยท Page 1 of 1 (latest)

peak wingBOT
neon iris
#

๐Ÿ‘‹ happy to help

lofty turtle
#

Thank you

neon iris
#

let me know if you need any more help

lofty turtle
#

is there a way to trigger actions using Stripe CLI ?
like i want to cancel a subscription using the CLI (for testing purposes) am i able to do that ?

#

ohh just thought why not run the help command and i found what i needed xD

#

thanks !

#

that's weird. i just triggered the following:

stripe subscriptions cancel sub_1LzzUeEDus2gJKdlKKpn8GP8

which ran successfully but no webhook call was made. is that normal?

lofty turtle
#

webhook* not API .

neon iris
#

are you listening using the Stripe CLI?

lofty turtle
#

yes. wait which webhook events does cancelling a subscription trigger?

#

isn't it subscription_schedule ?

#

cz i just saw it triggering the following customer.subscription.deleted

neon iris
lofty turtle
#

ohhh my bad

#

guess you shouldn't write code when you're feeling sick lol. Thanks Tarzan !

#

doesnt the subscription cancel trigger invoice actions?

neon iris
neon iris
lofty turtle
#

i'm trying to check which events are the ones i should listen to when a customer subscribes, updates, downgrades, or cancels his subscription with us

#

i thought invoices would be the perfect ones since they do update with payments (failed or accepted) and it tells you if the subscription isn't paid yet

neon iris
vernal kestrel
#

the refund doesn't generate an invoice.* event yes. But you can e.g trace from the refund.charge.invoice field(https://stripe.com/docs/api/charges/object#charge_object-invoice) when handling a refund object
or you can only do refunds using CreditNotes instead but that's a lot of extra complexity I wouldn't recommend personally