Stripe.js plugin TOS Date Error

I am currently building out our onboarding process for providers (or sellers per Stripe). I have already been able to successfully create a customer but am having issues with the function of [Stripe.js - Platform - Update a custom seller’s details].

image

I am trying to figure out how do I provide a dynamic UNIX timestamp for the TOS Date field. I tried leaving the field in it’s default “UNIX (in seconds)” but I get basically the same error (see below).

image

I tried looking at the @copilot documentation but the video doesn’t address the TOS IP Address or TOS Date fields. Any help would be super appreciated!

See below for the fields referenced:
image

Try this, using dynamic expression …

Current date/time : extract UNIX (milliseconds) / 1000 : floor

2 Likes

Thats perfect, thank so you much!

Now that I have gotten past that issue, I am getting another error about an invalid IP address. Would you happen to know what to put there by any chance? Sorry, I am very new at this.

image

You can use the plugin Ipiphy, but if you request the IP address as part of the Stripe API call, it will get Bubble’s server IP address instead.

So you need to request the IP address on the page, save it on a page element or custom state, then put into the stripe call.

You have been so helpful! Thank you so much!

Would it be fine if I just updated a user field user_IP by making the API call of ipiphy and storing that number to use for the stripe API call. Or is it best to simply save it on a custom state.

I also have the same question about Stripe-IDs. Is it against best practices to store that info - the stripe generated ID and IP address?

Hi @corey.dorsa,

It’s really up to you regarding storage; if you have other uses for users’ IP addresses then save them as you see fit. Where not particularly useful, we save IP addresses in a custom state for seller onboarding.

For the future, please give us a shout at [email protected] if you run into issues. :slight_smile:

Updating a database field is a server operation, so again it’d pick up a server IP address.