Prefill Form Fields (query strings)
This section covers how to prefill form fields on your payment page using query string parameters.
Last updated
This section covers how to prefill form fields on your payment page using query string parameters.
Last updated
You can easily prefill form fields on the payment form with the query strings and parameters below.
For the first parameter of your query string, ensure you enter a question mark "?". Then, use the ampersand symbol "&" for all following strings. See examples below.
You can read all about how query strings and their parameters work in the details below, but in the meantime, here are some examples you can copy/paste.
Let's say you want to accept a credit card payment from Stripe for $99/month and you already had that plan set up on your payment form. Here's the query string combination you would send to your customer or link on your site:
Let's say you want to accept a custom invoice amount for €59.99, you've created a custom field labeled "Invoice ID" on your form, and you want to select SEPA as the payment method to be used automatically. You would give this link to your customer:
Here are all the query strings and their possible parameters, along with some examples and important notes.
Query String | Parameters | Notes |
---|---|---|
If any parameters are missing, the first possible matched plan will be selected. Match all the possible parameters to the plan you want to pre-select.
If you've added a Custom Field on your payment form, you can prefill the field.
All you need to do is match the parameter to your field label by simplifying the label without any capitalization and using underscores instead of spaces.
For example, if your Custom Field Label is Invoice ID
, then your query string should look like this:
Replace xyz123
with whatever Invoice ID you actually want to record for the payment. This data will then get passed to the Stripe Metadata section when viewing the Payment details:
Any query strings that are unmatched to your form fields can be passed as an HTTP Request. Please read the corresponding documentation about setting up HTTP Requests on the form.
?email_address
Any email address
?first_name
Any string
?last_name
Any string
?gateway
stripe, paypal
* The ?gateway parameter must be used in conjunction with the ?method parameter.
?method
Stripe methods:
ccard
ach_direct_debit (Plaid)
sepa
apple_pay
google_pay
microsoft_pay
alipay
wechat PayPal methods: standard_checkout
* The ?gateway parameter must be used in conjunction with the ?method parameter.
?currency
Any 3-digit currency code. E.g. - usd, eur
?frequency
d_1 <- Daily w_1 <- Weekly m_1 <- Monthly m_3 <- Quarterly m_6 <- Every 6 months y_1 <- Annually y_3 <- Every 3 Years one-time <- One Time
?amount
Any currency value with or without a decimal. E.g. - 99.00
Match the currency, amount, and frequency to preselect a specific plan. Otherwise, the ?amount prefills the Custom Amount field.