#pro-pooja_webhooks

1 messages ¡ Page 1 of 1 (latest)

sly shoreBOT
near tokenBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

sly shoreBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1240277863572439091

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

topaz rampart
#

hi there!

#

can you clarify exactly what you are trying to do and what's the issue?

mild dragon
#

I need invoice detail of the subscription when the subscription cycle starts or cycle changee. 'invoice.updated' event is working fine for both of the scenario, but it is not triggered if discount is applied at a time of checkout.

topaz rampart
#

how are you creating the Subscriptions? with the Subscription endpoint, or with Checkout Session?

mild dragon
#

Checkout session

topaz rampart
#

then either listen to checkout.session.completed or customer.subscription.created.

mild dragon
#

sub_1PFy4uGVCe8mF8QWZBUZC9rk- for this subscription I've applied discount, but there is no 'invoice.updated' event

topaz rampart
#

sorry for the delay, looking into this

#

well, no invoice was actually updated here, so that's expected.

#

like I said, you should listen to either checkout.session.completed or customer.subscription.created to get information about the first Invoice.

mild dragon
#

what about when the new subscription cycle starts? I need to rely on single event for both the scenario.

topaz rampart
#

what about when the new subscription cycle starts?
yes exactly, listen to the two events I shared above to know when the Subscription starts.

#

I need to rely on single event for both the scenario.
you want a single event for the creation of the subscription and the renewal of the subscription? that's not possible.

mild dragon
#

For both the event response format will be different?

topaz rampart
#

depends which event you are listening to. customer.subscription.created will contain a Subscription object for example.

near tokenBOT
mild dragon
#

Can I use 'invoice.paid' for subscription created and 'invoice.updated' when the new cycle starts, seems like these two events response is same

topaz rampart
#

with both you would get an Invoice object

#

so it could work. another option is to only use invoice.paid.

mild dragon
#

There can be a chnace invoice is created when the subscription is renewd but user hasn't paid yet.

#

I need the invoice deatil as soon as the new subscription is created and subscription cycle starts