Page cover image

🤖Checkout / Additional Fields

Sometimes you need to collect more fields from your customers or pre-fill checkout form on our site with default fields, and we have a way to do it. Let's check how to do it.

When you need to pre-fill checkout form page by email, name, phone or your custom hidden/text fields which you've created on products settings page at product settings (5. Collected customer information then you can pass it as GET params to checkout or payment links

How a pre-filled payment link looks like:

https://mel.store/jehkinen/165?email=eva.choo%40mel.store&name=Eva%20Choo&phone_number=%2B35796652114&text_0=%40TelegramTips

You can open and check link above to see how it works

You can pass additional parameters to the payment link or any custom additional fields, please see example below with hidden fields

  • email

  • name

  • phone_number

  • country

  • zipcode

  • promocode

Additional parameters (for example, text_0, link_0, etc. - they can be taken from the Product Settings -> 5. Collect customer information

How to build a valid url with params

A "?" must be placed between the product number and the parameters:

An "=" must follow the parameter:

https://mel.store/jehkinen/165?email=eva%40mel.store

An "&" must be placed between parameters:

%2B - To insert a Plus sign (for example, for an international phone number),
so phone number in our example is +35796652117, country would be autoselected based
on country code of the phone, for e.g +357 is Cyprus

%20 = equal space character, so name in our example is Eva Choo

https://mel.store/jehkinen/165?phone_number=%2B35796652117&name=Eva%20Choo

Example of creating and using additional hidden field

For example you would like to pass your own unique order id with each sell and receive it in webhook at additional_fields

Go to Product Settings -> 5. Collect customer information and click Add Field

Select the desired type of field to add to the checkout page for your customer. In our example, we selected hidden fields. This field won't be visible to the customer on the checkout page but can be pre-filled via GET parameters in the checkout link.

After adding a custom hidden field you need to hover over text field with it to see field name, in our example field name is hidden_0

For example you have a checkout link such as

https://mel.store/jehkinen/165

To pre-fill and pass value via GET params you need to add it to your checkout link as in example below:

https://mel.store/jehkinen/165?hidden_0=136754

A customer won't see this field in the checkout page, but it will be passed to AfterSell Webhook inside additiona_fields object

In our example we passed 136754 inside hidden_0 field and it may be obtained inside payload after each sell, if you was setup After Sell Webhook

"additional_fields": {
        "hidden_0": { // text_0 is field name
            "text": "Order id", // field title
            "type": "hidden", // field type
            
        },
        "text_0": { // text_0 is field name
            "text": "Your telegram", // field title
            "type": "text", // field type
            
        }
    },

You can add more fields, for example text input for user which will be rendered and collected on the checkout form, hover on it to see the name, in our example name is text_0

there are an example of adding two custom additional fields: hidden field and text field
In our example you will see a custom text filed called Your Telegram, you can pre-fill it using GET params or not, then your customer will place a telegram username in this field. You also can force to fill field by customer using required checkbox below to additional field on the product settings page

If you need to pass more specific metadata as an arbitrary JSON key-value pair to your webhook for a specific customer or group of customers, please see the Payment Links section.

Last updated