Applying Coupon Codes in Adalo
Fixed & Percentage Discounts at Checkout
This document explains how to build a coupon code system in Adalo that supports:
Fixed dollar discounts (e.g. $5 off)
Percentage-based discounts (e.g. 10% off)
The solution uses native Adalo features only—no custom actions, external APIs, or third-party tools.
What This System Supports
Validating coupon codes entered by users
Applying discounts dynamically at checkout
Supporting both fixed and percentage discounts
Removing or changing coupons without leaving checkout
Using the same logic across carts, orders, or subscriptions
High-Level Flow
Coupon codes are stored in a database
Users enter a coupon code at checkout
Adalo validates the code using a filtered list
The discount is calculated and stored on the logged-in user
Totals are recalculated automatically
Step 1: Create the Coupon Codes Collection
Create a new collection named:
Coupon Codes
Required Properties
The coupon code users type (case-sensitive)
Dollar amount or decimal percentage
Coupon Value Rules
Fixed Discount Example
Percentage Discount Example
💡 Tip:
Store percentages as decimals.
10% = 0.1, 20% = 0.2, etc.

On your checkout or payment screen:
Add a Text Input
Purpose: User enters the coupon code
Filter:
Name = Coupon Input
Optional Visibility Rule
Coupon Input is not empty
💡 Why this matters
This prevents invalid coupons from appearing and hides UI when no code is entered.

Inside the Coupon Codes list, add a button:
(Optional) Show the coupon name for testing/debugging
This button will trigger the discount logic.
Step 4: Create the Coupon Amount Property
On the Logged-In User collection, create a number property:
Coupon Amount
This property stores the actual dollar value of the discount, regardless of coupon type.
Step 5: Fixed Amount Discount Logic
Update Logged-In User
Is Percent Off = false
Coupon Amount = Amount Off
Example
$5 off → Coupon Amount = 5
Step 6: Percentage Discount Logic
Percentage discounts must be converted into a dollar amount.
Update Logged-In User
Is Percent Off = true
Coupon Amount = Amount Off × Cart Subtotal
Example
$9.00 × 0.1 = $0.90
⚠️ Important
Always calculate the percentage against the subtotal before tax.
Step 7: Show Coupon in Checkout UI
Use conditional visibility to keep the UI clean.
Visibility Rule
Coupon Amount > 0
Display Elements
Discount value (shown as a negative amount)
Optional “Remove Coupon” button
Step 8: Remove Coupon Option
Add a small X or Remove Coupon button.
Update Logged-In User
Coupon Amount = 0
Visibility Rule
Coupon Amount > 0
This allows users to remove a coupon without restarting checkout.
Step 9: Update Subtotal & Total Calculations
Subtotal = Cart Subtotal − Coupon Amount
Total = (Cart Subtotal − Coupon Amount) + Tax
This logic works for:
Best Practices & Notes
Coupon codes are case-sensitive
Store the coupon value on the logged-in user for easy access
Admins can manage coupons directly in Adalo
This pattern works without custom actions or external tools
This setup allows you to:
Validate coupon codes natively
Support both fixed and percentage discounts
Apply coupons dynamically at checkout
Keep all logic inside Adalo
It’s flexible, scalable, and production-ready.