#skyhawk_subscription-webhook-events

1 messages ยท Page 1 of 1 (latest)

vital mortarBOT
#

๐Ÿ‘‹ 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/1277732089420054603

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

wise vine
muted kernel
#

Hi ๐Ÿ‘‹

So you are getting a Subscription object in these webhook events and you want to know how to get the associated product IDs?

wise vine
#

Basically correct, and any other events to listen too also

muted kernel
#

Okay well let's treat those as separate asks. We'll deal with the first one

#

So the Product ID is set for each Subscription Item in the items property

#

Specifically it is found at items.data.price.product

wise vine
#

case Stripe.Events.CustomerSubscriptionCreated:
var result = stripeevent.Data.Object as Stripe.????; What is the Stripe Binding?

#

case Stripe.Events.InvoicePaid:
var Invoice = stripeevent.Data.Object as Stripe.Invoice;

#

I

#

I've found Invoice matching for InvoicePaid. But not sure whats CustomerSubscriptionCreated

#

I mean Stripe Class for CustomerSubscriptionCreated

muted kernel
wise vine
#

Bingo. Thats the list I was looking for

muted kernel
#

There's a whole webhook section of the Server.cs file

wise vine
#

Okay, that answers that question. Now is there anything I may need to listen to like InvoicePaid, Invoice Failed, for subscription?

muted kernel
#

Actually I think you should check out the Server.cs file in that quickstart I shared.

#

We highlight a lot of different scenarios and what you might do in the comment strings

wise vine
#

Found it. Thanks. This will help me complete everything

muted kernel
#

Great ๐ŸŽ‰ I'm glad we found a solution so quickly.

wise vine
#

Thank you. Bye for now.

muted kernel
#

๐Ÿ‘‹