Retrieving customer address from Stripe using webhooks

I’ve set up a webhook between Bubble and Stripe to listen for completed checkout sessions.

As part of the checkout, the customer is required to provide their address, which I intend to pull into Bubble.

The data being sent from Stripe to Bubble includes:

“customer_details”: {
“address”: {
“city”: “London”,
“country”: “GB”,
“line1”: “10 Downing Stree”,
“line2”: null,
“postal_code”: “SW1A 2AA”,
“state”: null

To get the address into Bubble, I have created a backend workflow to “Make Changes to a User”, and am successfully finding the user via the customer ID.

When trying to modify address fields for the users in my Bubble database, I am using the following setup:

address_1 = Request Data's object customer_details address contains line1

I’ve also tried:

  • address_1 = Request Data's object customer_details address is line1

However, the database field is being populated with “no”.

My address_1 field is set to “text”.

Can anyone point me in the right direction to correctly pull the customer’s address?

This is because you are returning the outcome of the boolean result from the test.

What you need to do is extract the address from the webhook.

Usually when you set up a webhook you to the approach a bit like setting up an API request. You initialise and map the data the webhook is sending you the fields you are expecting.

This means you don’ t have to parse anything, you just take the data from the name/value pairs as they hit your app.

As @alan8 sa8d.

However if you want more control on the customer’s address, what I’ve done a significant amount of the time, is put the address input in Bubble and append the address fields to the querystring of the stripe checkout page so customer doesnt have to enter them again…

In that case, @code-escapee, I would save the address in the DB before hand, rather than putting it in the URL (because it can be hacked), and then putting the reference to the DB entry in the URL (or by using browser memory, cookie or a custom state), to use the address further down the process.

I’m using the Stripe plug to create the checkout session. There isn’t a method with that plug in to pass on meta data. In this instance, I only want to pass on the post_code, which I’ve collected through the sign up process.

This topic was automatically closed after 70 days. New replies are no longer allowed.