#slush-webhook-data

1 messages · Page 1 of 1 (latest)

marble hill
#

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

lyric scaffold
#

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?

marble hill
#

this code creates a PaymentIntent. The PaymentIntent API like all our APIs supports metadata so you would set that

lyric scaffold
#

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?

marble hill
#

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

lyric scaffold
#

Ahhhh, so do I need to alter something on the stripe dashboard?

#

So that when a payment comes in it contacts my webhook?

marble hill
#

well you don't "alter" anything no

#

did you read the docs about webhooks first?

lyric scaffold
#

So do I want to be using this dashboard at all or no?

marble hill
#

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?

lyric scaffold
#

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.

marble hill
#

CLI or use ngrok yes

lyric scaffold
#

It says to download the latest windows tar.gz file

#

and there is no winders tar.gz file.

marble hill
#

use those

lyric scaffold
#

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.

marble hill
#

I'm sorry I don't really understand what you are asking help about

#

do you have a specific question?

lyric scaffold
#

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."

marble hill
#

it is a command line too, so you need to use the command line

lyric scaffold
#

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

marble hill
#

you open a new command line

lyric scaffold
#

thank you!

lyric scaffold
#

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.