#Callum - webhooks

1 messages · Page 1 of 1 (latest)

patent spear
#

👋 Thanks for reaching out

#

Do you mean how/can Stripe sends customers details(name, email, address...) to your wordpress API via webhooks ?

tepid orbit
#

Yes I believe so

patent spear
tepid orbit
#

does this webhook get data rather than stripe posting to our api?

patent spear
#

Stripe uses webhooks to notify your application when an event happens in your account.
In your case once a customer is created in your Stripe Accout (via Dashbaord or APIs), Stripe notifies your Application via API with the created customer using webhooks

tepid orbit
#

Just to be clear, stripe notifies my application via the stripe api or my api?

#

Does stripe send the name, email, address parameters via webhook / api?

#

I have created the webhook.php file in the wordpress theme file so the server receives the notification. But does not create a customer

patent spear
#

How are you creating customers in your integration ?

tepid orbit
#

our api receives the http json post request and submits a form entry in a wordpress plugin called gravity forms

#

one of our clients takes payment for membership services via stripe. they want to pass over their personal details over to our api to create a member in our gravity forms database.

#

id be happy to talk this over a call?

raven wolf
#

We don't do calls I'm afraid. Can you share with me the ID of a Payment Intent from your account?

#

pi_xxx

#

Trying to understand how you integrate with Stripe before advising which webhook events you need

#

You can't specify which fields are sent in a webhook, its just the fields/object that reflect the event you're receiving

tepid orbit
#

so I can send over all fields to the target URL, but only have the API process the meta data that I need?

#

cus_MIrl8uGfsCEh4M

raven wolf
tepid orbit
#

I have already set up the webhook end point to our api address. And created the webhook.php file in our wordpress theme folder. Is this correct? if so are there further steps?

raven wolf
#

Looks like you have a test webhook setup to receive customer.created events, yep

tepid orbit
#

Correct

raven wolf
tepid orbit
#

So I am receiving them, then how do I send the data over to my sites API?

raven wolf
#

That's logic that you'd write in your webhook.php file

tepid orbit
#

is this after the handle the event section?

#

or after http_response_code(200);

raven wolf
#

Well we generally expect a 200 response ~immediately

#

So you'd do any other logic after returning that response

tepid orbit
#

I understand

#

how do i know the field values?