Skip to main content

Adding a custom checkbox or newsletter opt-in to checkout

How to add a newsletter opt-in or other custom checkbox to checkout, through the platform plugin or the API, and how to read whether it was checked.

You can add a custom checkbox to your checkout, for example a newsletter opt-in or any other yes/no question you want to ask the shopper. The text, whether it starts checked, and whether it is required are all up to you.

Setting it up through your platform plugin

If you use a supported platform plugin such as WooCommerce, this is a setting in the plugin itself. Look for a custom checkbox or newsletter opt-in field in your Kustom Checkout plugin settings and fill in the text you want shown, whether it should be checked by default, and whether the shopper must check it to place the order.

Setting it up through the API

If you have a custom or API integration, the checkbox is added through the options.additional_checkbox field when you create the order. The text supports Markdown formatting, so you can include a link.

Reading whether the box was checked

Once an order is placed, whether the shopper checked the box is available in the merchant_requested object on the order. This is true if the box was checked and false if it was not.

Full technical details are in our developer documentation.

Did this answer your question?