Building E-commerce with Next.js in Thailand
10 May 2026 · by Yunmin Shin
What Makes Thai E-Commerce Different?
Building an e-commerce site for Thailand requires understanding how Thai consumers shop online. The patterns differ meaningfully from Western markets.
Thai shoppers heavily research products via LINE, Facebook, and TikTok before purchasing. They prefer to confirm orders via LINE message and pay via PromptPay QR or bank transfer. Delivery speed expectations are high — same-day delivery is common in Bangkok via services like Lalamove and Kerry Express. Customer service via LINE chat is expected, not optional.
Your Next.js e-commerce architecture needs to support these patterns from day one.
What Is the Right Architecture?
For most Bangkok e-commerce businesses in the 0–500 orders per day range, this stack works well:
- Next.js App Router for the frontend and API
- Supabase (PostgreSQL) for products, orders, inventory, and user data
- Omise for PromptPay QR and card payments
- Cloudinary for product image hosting and transformation
- Upstash Redis for cart sessions and caching
- LINE Messaging API for order notifications to customers and staff
Avoid overcomplicating the architecture early. A well-built monolith on this stack handles significant traffic before requiring decomposition.
How Do You Build the Product Catalog?
Structure your database with products, product_variants, categories, and inventory tables. Product variants handle size, color, and other options — each variant has its own SKU, price, and stock level.
Use Next.js generateStaticParams to statically generate product pages at build time. Product pages served from the CDN edge load in under 100ms for Bangkok users and are fully indexed by search engines. Use revalidatePath to update individual product pages when inventory or pricing changes, without a full rebuild.
How Do You Handle the Cart?
Store cart state in two places simultaneously:
- Browser localStorage for immediate, offline-capable access
- Server-side database or Redis session for persistence across devices and for calculating server-side totals
Always calculate the final order total on the server before processing payment. Never trust client-submitted totals — a savvy user can modify their cart total in the browser.
How Do You Implement PromptPay Checkout?
The payment flow for PromptPay:
- User clicks "Pay" — your server creates a charge via Omise API and receives a QR code URL.
- Display the QR code to the user with a 15-minute countdown timer.
- The user opens their banking app, scans the QR, and confirms payment.
- Omise sends a webhook to your server confirming the payment.
- Your server updates the order status and sends a LINE notification to the customer and the merchant.
Implement the webhook endpoint at a secret URL and verify the Omise webhook signature to prevent fake payment confirmations.
How Do You Notify Customers via LINE?
Use the LINE Messaging API to send order confirmation and shipping update messages directly to customers' LINE accounts. Customers opt in by adding your LINE Official Account. The messages feel personal and have significantly higher open rates than email in Thailand.
Ready to Build Something Fast?
Get a free quote on LINE. We reply within 24 hours.
Ready to build something fast and scalable?
Get a free project quote on LINE. We reply within 24 hours.
무료 견적 on LINE