Pre-populating Quaderno Checkout fields
Ever thought, “I have this information already and I would really love it if these fields on my form were already filled out for my customers so that they didn’t have to fill it out” ? Well, then pre-populating checkout forms is the process for you!
To pre-populate checkout forms, you essentially need to grab the URL for the checkout link, and add information to it so that, when the checkout form is loaded, the page also loads information into certain fields automatically.
Building the URL
We recommend opening some sort of word processor so that you can copy/paste all the pieces as you get them, and then assemble it into one URL when you’re ready.
You'll need the following pieces to create pre-populated forms:
- The URL of the checkout link you want to pre-populate. You can get it on the checkout links page.
- The fields that you want to populate.
- The information you want to populate the fields with.
In Quaderno Checkout, you can populate the following fields:
first_name
– The customer's first name.last_name
– The customer's last name.email
– The customer's email address.country
– The customer's country.postal_code
– The customer's postal code.coupon
– Coupon code from your coupons page.enc_custom
– A JWT string that stores a set of key-value pairs that you want to forward to the payment processor. This can be useful for setting up additional options in the payment processor. If you want to send specific data to one processor, you can create a subhash with the name of that particular processor. E.g.stripe: { metadata: { user_id: 999 } }, paypal: { no_shipping: 0 }
. Sign your JWT strings with your account's owner private key.
You will use the options you found above and put them into your checkout link's URL in the following sequence: {Checkout Link URL}?{First field}={First_ value}&{Next Field}={Next Value}
For example, if you have a customer named John with email info@mydomain.com that is based in the US with postal code 90210, you can create a pre-populated form with his data: https://quadernoapp.com/checkout/link/83fd278964031df19da357af?first_name=John&email=info@mydomain.com&country=US&postal_code=90210
If you want to pre-populate a checkout form with the coupon code 50OFF, you can use a link like this: https://quadernoapp.com/checkout/link/83fd278964031df19da357af?coupon=50OFF
Spaces or line breaks will break your URLs. Please replace all your spaces with the "%20" character in your URLs.