#JenniferJenna-webhook-PaymentIntent
1 messages · Page 1 of 1 (latest)
Events.PaymentIntentSucceeded:
@neon flicker do you have a bit more details? What doc are you looking at? What's blocking you? I assume you use our stripe-dotnet library?
If so if you read https://stripe.com/docs/webhooks/quickstart it shows you had to write a basic webhook handler and that has the exact example you want: ``` var json = await new StreamReader(HttpContext.Request.Body).ReadToEndAsync();
try
{
var stripeEvent = EventUtility.ParseEvent(json);
if (stripeEvent.Type == Events.PaymentIntentSucceeded)
{
var paymentIntent = stripeEvent.Data.Object as PaymentIntent;
Console.WriteLine("A successful payment for {0} was made.", paymentIntent.Amount);
// Then define and call a method to handle the successful payment intent.
// handlePaymentIntentSucceeded(paymentIntent);
}```
Okay, I will do it that way. I Didn't know if casting like that was right, just in case the object was not a paymentIntent I thought there would be a utility. But I guess we can assume that with success it's always an Intent . Thank you.
Let me know if you're blocked