How do I include dynamic data within a function client side?

For some reason I’m stuck. If anyone has any tips, they’d be greatly appreciated. I’m trying to pass dynamic data. See screenshot:

The client secret is temporary, as it’s coming from an API call within a Stripe Verification Session.

Wouldn’t it be just properties.client_secret

You have prepended some text but the dynamic inputs aren’t a property of the verificationSession

They are a scoped object to the action, right?

Correct. I tried changing the property too, but to no avail. (Still fairly new to anything non-api related)

I have also apparently resorted in time like Benjamin Button and can’t figure this out with the baby brain haha.

1 Like

Does it err or are you not getting the value? Can you print the value to the console?

It runs, but errors in the console:

It looks like one of the values you are passing should be a JSON. Is that accurate and if so, are you passing it?

Apologies in advance if my nomenclature is off.

Here’s what I’m doing for context. API call, and result of is being passed to the client side action.

The issue is the client side ‘client_secret’ isn’t getting passed through.

First, did you tried console.log() 'ing it? If so give us the result (:

To eliminate a race condition issue: Trigger a custom workflow right after the step 1 and place the step 2 inside that new custom workflow.

Also, try checking if your code passes at Esprima: Syntax Validator, copy only your code, do not include the “function(properties” and the ending “}”.

This will give us a good start.

1 Like

Thanks guys.

I tried a pause and custom wf, no avail. Same error.

image

Also, dumb question, but for console log… how? :slight_smile: … lol

Stripe Doc:

https://stripe.com/docs/js/identity/modal

console.log(properties.client_secret)

Or

console.log(JSON.stringify(properties.client_secret, null, 4))

This produced the client_secret!

image

So maybe you were right in your post above. It’s not parsing the value

1 Like

Question now is how to parse it in correctly for the wf :thinking:

What has this one brought to the console? Same thing?

Yes :slight_smile: same things as the screenshot above.

Something else is at fault then, because the secret is there :roll_eyes:

What about that 404 error there?

I think the 404 is from a stop at step two where the workflow is supposed to continue in with the client secret. Otherwise the call runs smoothly if I use their “navigate to url” instead. I’m trying for their “modal” in this case. :slightly_frowning_face:

I attached the doc above, if you have time would mind taking a look? Although I don’t know if that would help you help me diagnose lol.

Is there a way to call a properties.object inside a function? I’ve tried in between brackets but still nothing.