Apply one or more discount codes to the customer's cart automatically after they submit. Pairs well with newsletter signup, lead gen, and onboarding forms.
Setup
First, create the discount codes you want to apply in your Shopify admin under Discounts.
In the form editor, open the Actions card.
Toggle on Add discount code.
Search for and select the codes to apply.
Save.
How customers see it
After a successful submit, the discount is seeded into the customer's session. They see it pre-applied when they reach checkout β no need to type or paste the code.
Showing the code in the success message
In the success message field, use the token {{ discount_codes }} β it renders as a mono-font badge with the code visible. Useful when you want the customer to also be able to share or note the code.