Receive Stripe webhook and then update user table with customer email?

Hi there, I’m receiving a webhook from Stripe and would like to take the customer email from the webhook and add it to the user table.

The JSON to transform is “jsonBody.data.object.customer_details.email” and this is working fine. However the next field, I’m not sure what to put. Screenshot attached.

You’ve got that around the wrong way.
You should be targeting the full JSON body that you receive from Stripe, then use jsonBody.data.object.customer_details.email to extract the email address.

If you can provide a sample response, I can show you exactly what that should look like.

Thanks. Below is a sample/redacted response

{
“headers”: {
“accept”: “/; q=0.5, application/json”,
“content-type”: “application/json; charset=utf-8”,
“user-agent”: “Stripe/1.0 (+https://stripe.com/docs/webhooks)”,
“cache-control”: “no-cache”,
“x-request-id”: “REQ_REDACTED”,
“stripe-signature”: “REDACTED”
},
“jsonBody”: {
“id”: “evt_REDACTED”,
“object”: “event”,
“type”: “checkout.session.completed”,
“created”: 1700000000,
“livemode”: false,
“api_version”: “2025-05-28.basil”,
“pending_webhooks”: 1,
“data”: {
“object”: {
“id”: “cs_test_REDACTED”,
“object”: “checkout.session”,
“mode”: “payment”,
“status”: “complete”,
“payment_status”: “paid”,
“currency”: “usd”,
“amount_subtotal”: 899,
“amount_total”: 899,
“customer”: null,
“customer_email”: null,
“customer_details”: {
“name”: “REDACTED”,
“email”: “REDACTED”,
“phone”: null,
“address”: {
“city”: null,
“line1”: null,
“line2”: null,
“state”: null,
“country”: “US”,
“postal_code”: “REDACTED”
}
},
“payment_intent”: “pi_REDACTED”,
“payment_link”: “plink_REDACTED”,
“submit_type”: “auto”,
“ui_mode”: “hosted”,
“billing_address_collection”: “auto”,
“payment_method_types”: [
“card”,
“klarna”,
“link”,
“cashapp”,
“amazon_pay”
],
“payment_method_options”: {
“card”: {
“request_three_d_secure”: “automatic”
}
},
“automatic_tax”: {
“enabled”: false
},
“total_details”: {
“amount_tax”: 0,
“amount_discount”: 0,
“amount_shipping”: 0
},
“invoice”: null,
“subscription”: null,
“metadata”: {}
}
},
“request”: {
“id”: null,
“idempotency_key”: null
}
},
“queryParams”: {}
}

Okay, so this is what it should look like:

In your case, the “JSON” will be the JSON body from your webhook trigger.

When I run the above, I get the following:

Thanks. That’s odd. I don’t have the single value option in my Query JSON configure action screen.

My example was contrived. You should target the trigger body as shown in your screenshot.

I’m getting closer but still not working correclty. Let me know if you see anything in the screenshots


Your Add Row looks wrong. You should be using the output of the Query JSON node.

1 Like