#akdj16

1 messages ยท Page 1 of 1 (latest)

wooden plumeBOT
grim nacelle
#

๐Ÿ‘‹ happy to help

#

have you tried one with a free trial?

#

let me go back one step backwards, are we talking about Billing/Subscription invoices or one-off invoices?

mellow hazel
#

Hello!, yes it's about subscription invoice. no I didn't try free trial.

#

I will try now ๐Ÿ˜ƒ

grim nacelle
#

the idea is related to whether the invoice has a payment_intent or a pending_setup_intent

#

in the first case, invoice.payment_succeeded will be fired before invoice.paid in the second only invoice.paid will be fired when the pending_setup_intent gets confirmed

mellow hazel
#

ok, got it ๐Ÿ‘

#

Thank you! @grim nacelle

grim nacelle
#

did it work?

mellow hazel
#

I just tested it.. and no it doesn't work ๐Ÿ˜ฆ I checked the free trial subscription object, it has the "pending_setup_intent": "seti_1LlB0VB5c8xuItaNvApPb0GR" and has not payment_intent field, but I still get the two events

grim nacelle
#

that's weird

#

wait let me check

mellow hazel
#

ok!

grim nacelle
#

could you please share the subscription/invoice ids

mellow hazel
#

yes

#

sub_1LlB0VB5c8xuItaNjZvpzrp8

#

in_1LlB0VB5c8xuItaNrnKSOpVl

grim nacelle
#

ok so my bad, I was rechecking the doc

#

both of these events will be fired unless the invoice was paid out-of-band (meaning outside of Stripe)

#

in this case only invoice.paid will be fired

#

so whether it's a 0 amount or not we try to pay the invoice and those events are fired

mellow hazel
#

ok, I see

#

Very clear! Thank you!

grim nacelle
#

let me know if you need any more help

mellow hazel
#

ok ๐Ÿ˜ƒ