Skip to main content
Question

How to convert a URL parameter to a number for use in the payment slide.

  • September 24, 2026
  • 1 reply
  • 12 views

How to convert a URL parameter to a number so that I can pass price into the Typeform for use in the payment slide. 

I need to do Part 1 - an application which calculates price based on user answers.  Then I want to be able to branch to 2 separate Typeforms using URL parameters to pass the price.  Then use a Stripe payment slide for one Typeform that I have branched to and a Paypal payment slide for the other Typeform that I have branched to. (Typeform doesn’t allow both types of payment slides in a single Typeform.)

However, URL parameters are passing data a character not numeric and I need to convert this calculated url passed price information from the original Typeform into numeric for use as price in the 2 branched to forms.

How can I convert a passed URL variable from character to numeric?

1 reply

carmentf
Community Team
  • Community Team
  • September 24, 2026

Hi there,

 

At the moment, you can’t convert a URL parameter from text into Typeform’s numeric Price variable within Typeform. URL parameters are passed in as data, and Typeform currently doesn’t support populating Score or Price variables through them. See Using URL parameters.

 

If you only have a limited set of possible prices, one workaround is to pass a text value such as plan_a or plan_b, then use logic in each receiving form to set its own Price variable accordingly. Typeform supports adding logic based on URL parameters, as described here.

 

For a fully dynamic amount calculated in the first form, you’ll need to handle the conversion and payment outside Typeform, for example with custom code or a payment workflow that creates the checkout amount externally. You can still pass information between forms using a redirect and URL parameters, but the receiving form won’t be able to use that passed value directly as its Price variable. More details are available in Pass information from one form to another.