#slush-webhook-data
1 messages · Page 1 of 1 (latest)
Hey @lyric scaffold it depends a lot how you integrate, like which APIs/products.
But most of the time you put that information as metadata on creation
@marble hill I am using this as my payment: https://stripe.com/docs/payments/quickstart
I'm using exactly that. How can I alter that to use a webhook and pass along custom data that I need so that I can complete their order once the webhook recieves the request?
this code creates a PaymentIntent. The PaymentIntent API like all our APIs supports metadata so you would set that
you can read more here: https://stripe.com/docs/api/metadata
How do I alter my current code to then use a webhook rather than just redirect to a page?
Do I just change the "return_url" to the url of the webhook?
ah not at all no
You might be misunderstanding webhooks completely
You configure a webhook endpoint for Stripe to send you an Event every time something happens in your account. It's usually used for "reconciliation"
So this has ~nothing to do with the return_url which will be hit anyways, and is the code where you display a success/error to your customer for example
Ahhhh, so do I need to alter something on the stripe dashboard?
So that when a payment comes in it contacts my webhook?
well you don't "alter" anything no
did you read the docs about webhooks first?
https://stripe.com/docs/webhooks might be a good first step
Did you read the doc? 😅
you can use the Dashboard to create a webhook endpoint yes
Overall do you see how to set the metadata and get it in the webhook handler afterwards?
I see how the metadata works. Just trying to figure out how the webhook handler works.
Since I am testing a .net project that runs on my machine localally I cant add an endpoint so I would need to download the cli.
Trying to do that right now.
CLI or use ngrok yes
It says to download the latest windows tar.gz file
and there is no winders tar.gz file.
When I run the .exe like the guide explains it says
This is a command line tool you need to open cmd.exe and run it from there.
I'm sorry I don't really understand what you are asking help about
do you have a specific question?
Yes, how do I use the CLI tool? It says install that file and run the .exe. I did that an just get a cmd prompt that says "This is a command line tool you need to open cmd.exe and run it from there."
it is a command line too, so you need to use the command line
Ahh I think I got it thank you.
So quick question, where do I type this in?
stripe trigger payment_intent.succeeded
Since my cmd is listening I cant send a trigger in that cmd
you open a new command line
thank you!
So I have one last question. I have the CLI working perfectly with my project and the webhook I created for it. If I now do a payment intenet succeeded WITHOUT using the trigger and by completeing a payment on my site with using a test creditcard number will it still send a ping to my webhook? Trying to test metadata now on the webhook end.