#skyhawk_subscription-webhook-events
1 messages ยท Page 1 of 1 (latest)
๐ 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.
Hi ๐
So you are getting a Subscription object in these webhook events and you want to know how to get the associated product IDs?
Basically correct, and any other events to listen too also
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
Although the naming convention may differ by language.
https://docs.stripe.com/api/subscriptions/object#subscription_object-items-data-price-product
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
We define which object is returned in the event payload for each event.
https://docs.stripe.com/api/events/types#event_types-customer.subscription.created
You can see here that it's a Subscription object.
Bingo. Thats the list I was looking for
This is also a useful place to see some examples using .NET code
https://docs.stripe.com/billing/quickstart
There's a whole webhook section of the Server.cs file
Okay, that answers that question. Now is there anything I may need to listen to like InvoicePaid, Invoice Failed, for subscription?
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
Found it. Thanks. This will help me complete everything
Great ๐ I'm glad we found a solution so quickly.
Thank you. Bye for now.
๐