Skip to main content
URL parameters in Paythen

You can pre-fill fields including visible and invisible custom fields in your Paythen payment pages.

Roohbir Singh avatar
Written by Roohbir Singh
Updated over 3 years ago

You can pre-fill all the default and custom fields shown on the payment pages, or use Paythen templates to create dynamic plans, by passing values to them through url parameters. The card number field cannot be pre-filled or sent any values via the URL, for security.

Why?

Pre-filling field values via url parameters can be useful if:

  1. Your customers will be redirected to your payment page after completing a form somewhere else where they've provided some of this information already. To avoid making your customers fill out the same information again, you can just pass these values via url parameters and they will be pre-filled for your customers when they see the payment page.

  2. You want to track where users are coming from. Marketers commonly use url parameters (like UTM tags) to understand which channels and campaigns lead to paying customers. With invisible custom fields and url parameter support, now you can send this data to the payment page when redirecting a customer there from an ad or other marketing channel and easily track this information.

  3. If you're using our WooCommerce or other ecommerce plugins, along with templates, plans are created via url parameters.

How?

Using url parameters in Paythen is easy. You just add the correct field IDs to the end of your payment page url and pass the values to them, starting with a question mark and separated by an ampersand (&).
​
Eg: https://demo.paythen.co/company/democorp/plan/9btxt5888w?name=Joshua+Lyman&email=hello@paythen.co

While the default "name" and "email" field IDs are the same across all plans, the IDs for custom fields you create depend on the name of the custom field. We show these for at the bottom of the plan summary page after you have created the plan.

URL parameters work for all fields except the card number. This is for security as card numbers should never be stored or passed anywhere as plain text.

Are there any formatting restrictions?

No. You can send almost any data in any format - including spaces, commas, other special characters. Noting that if you send any values which have the plus (+) symbol in them, this will not show up as a plus but will instead get converted to a space. Eg: if you sent mobile=+61 1234 5678, it would show up as just 61 1234 5678 (with a space at the beginning).

To read about custom fields and how to create visible and invisible fields, go here.

Did this answer your question?