Stripe Secret Keys - Can They Come From The Database?

Hi there @teodor...

In my app, my clients enter their own Stripe keys which are stored in the database.

Do Wappler’s Stripe server action steps support this?

Also... my users use my app in Test Mode and do test mode transactions with Stripe which requires a test secret key as well as a live one... is this supported with the Wappler Stripe implementation?

I'd like to know this as well. Seems it's hard coded per target. At one point I thought maybe these advanced options in the stripe api would override the hardcoded key in the target, but I think I got an error. I didn't spend much time on it at that moment cause I needed to get the site up.

Those options accept dynamic data, so you can choose for example an environment variable holding the key

Thanks for that @george... very useful to know!

So would I do it like this?

And can I use Session variables here too?
(are they safe enough to use? I need to re-familarise myself with them..)

Can I use Wappler functions?

e.g. `$_SESSION.stripe_rk_encoded.decrypt('XYZ')

stripe_sk_env

Where does this screen come from... Is this a part of Wappler? :thinking:

I believe this is in the Server Action for most of the Stripe integrations (at the top, may have to expand to see the full options available)...

I think it's on most (or all) stripe server actions. The screenshot I posted was from the stripe create checkout session. At the bottom.

1 Like

Yes you can use session variables and formatters to manipulate the value

2 Likes