Communitygithub.com

thiết lập thanh toán sepay vietqr cho next.js

Hướng dẫn từ A đến Z tích hợp cổng thanh toán VietQR Sepay vào landing page Next.js: đăng ký tài khoản Sepay, kết nối ngân hàng, scaffold luồng thanh toán đầy đủ gồm tạo order, webhook xác nhận, …

thiết lập thanh toán sepay vietqr cho next.js 是什么?

Kỹ năng này xây dựng toàn bộ hạ tầng thanh toán VietQR cho landing page Next.js thông qua Sepay. Người dùng chỉ cần chọn một trong hai backend lưu trữ lead: Vercel KV hoặc Supabase (khuyến nghị). Quy trình gồm 7 giai đoạn: (0) phát hiện stack Next.js và hỏi người dùng chọn backend; (1) hướng dẫn đăng ký tài khoản Sepay, liên kết ngân hàng nội địa Việt Nam, lấy API key và cấu hình webhook URL; (2A/2B) thiết lập Vercel KV hoặc Supabase; (3) scaffold lớp trừu tượng lưu trữ lead (`lib/leads-store.ts`) độc lập với backend; (4) tạo route `/api/checkout` cho form thanh toán; (5) tạo route `/api/sepay-webhook` xử lý webhook từ Sepay; (6) nhúng VietQR vào landing page theo ba mẫu UX; (7) kế hoạch kiểm thử 5 cấp độ. Kỹ năng này hỗ trợ Claude Code, Cursor hoặc Codex và được thiết kế để người dùng có thể đổi backend chỉ bằng cách sửa một dòng trong file `lib/leads-store.ts`.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/lexuanthanhhy/MKT.LANDINGPAGE.SKILLS/tree/main/.claude/skills/biz-setup-sepay-payment

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Thiết lập Thanh toán Sepay Biz — Hạ tầng thanh toán VietQR End-to-end cho Next.js

Kỹ năng này xây dựng toàn bộ hạ tầng thanh toán cho landing page Next.js sử dụng Sepay (cổng thanh toán VietQR Việt Nam). Sau khi hoàn tất: khách điền form → tạo order → quét QR → chuyển khoản → Sepay webhook về → xác minh + tra cứu lead + kích hoạt email/telegram. Tự động hết, không cần admin xác nhận thủ công.

Triết lý: Sepay là con đường ít kháng cự nhất cho VN — VietQR + bank API thuần, không cần khách đăng ký gì, scan QR bằng app ngân hàng có sẵn. Phí 1.5-2% rẻ hơn Stripe (4-5%), thanh toán T+1, free tier hợp lý cho landing page <100 đơn/tháng.

Tại sao cần lead store: Sepay webhook chỉ gửi content (text khách dán khi chuyển khoản) + amount. Sepay KHÔNG biết khách là ai. Phải có lead store local để map content → lead {name, phone, email, product, amount}.

2 tùy chọn lead store — người dùng chọn 1 ở Giai đoạn 0:

  • Vercel KV (Upstash Redis) — thiết lập 2 phút, TTL gốc, free 30K commands/tháng → < 500 đơn/tháng
  • Supabase Free (Postgres) — thiết lập 5 phút, SQL queries + Studio UI, free tier rộng hơn ~50× → < 2000 đơn/tháng. KHUYẾN NGHỊ.

Các route API (/api/checkout, /api/sepay-webhook, /api/admin/leads) không phụ thuộc vào provider thông qua lib/leads-store.ts re-export mỏng. Đổi provider sau = sửa 1 dòng.

Kỹ năng KHÔNG tự đăng ký Sepay account cho người dùng (cần KYC doanh nghiệp + ngân hàng). Kỹ năng hướng dẫn người dùng từng bước, sau đó tích hợp mã.


Khi nào dùng kỹ năng này

  • Người dùng đang ra mắt sản phẩm số / khoá học / coaching và cần nhận thanh toán trực tuyến.
  • Người dùng đã có landing page Next.js (qua ui-ux-pro-max hoặc tương đương) và muốn thêm luồng thanh toán.
  • Người dùng chuẩn bị tích hợp biz-email-setup hoặc biz-telegram-payment-notify mà chưa có hạ tầng thanh toán → kỹ năng này LÀM TIỀN ĐỀ.

KHÔNG dùng kỹ năng này khi:

  • Người dùng dùng Stripe/PayPal (thanh toán thẻ quốc tế) → use case khác.
  • Người dùng chấp nhận chuyển khoản ngân hàng thủ công + tự xác minh (quy mô nhỏ, không khuyến khích).
  • Người dùng đã có hạ tầng thanh toán và chỉ thiếu thông báo → đi thẳng /biz-email-setup hoặc /biz-telegram-payment-notify.

Workflow tổng quan (7 giai đoạn)

Giai đoạn 0: DETECT next.js stack + HỎI provider (KV / Supabase) — GATE
       ↓
Giai đoạn 1: HƯỚNG DẪN người dùng thiết lập Sepay account — GATE thủ công đợi người dùng xong
       ↓
Giai đoạn 2A (nếu KV): THIẾT LẬP Vercel KV (cài package + env vars + KV namespace)
Giai đoạn 2B (nếu Supabase): THIẾT LẬP Supabase (tạo project + migration SQL + service_role)
       ↓
Giai đoạn 3: SCAFFOLD lib/leads-store.ts (re-export wrapper) + lib/leads-{kv|supabase}.ts (impl)
       ↓
Giai đoạn 4: SCAFFOLD /api/checkout route (form → order → store)
       ↓
Giai đoạn 5: SCAFFOLD /api/sepay-webhook route (xác minh + tra cứu + side effects placeholder)
       ↓
Giai đoạn 6: NHÚNG VietQR vào landing page (chọn 1 trong 3 pattern UX)
       ↓
Giai đoạn 7: KẾ HOẠCH test 5 cấp (store → checkout → webhook → production → (Supabase only) cron ping)

Giai đoạn 0 + 1 có gate đợi người dùng. Giai đoạn 2/3/4/5/6 kỹ năng chủ động.


Giai đoạn 0 — Detect Next.js stack + chọn provider

0.1 Detect stack

test -f next.config.js -o -f next.config.mjs -o -f next.config.ts && echo "Next.js: ✓"
test -d app && echo "Router: App"
test -d pages && echo "Router: Pages"
test -f tsconfig.json && echo "TS: ✓"
test -f pnpm-lock.yaml && echo "pkg: pnpm" || test -f yarn.lock && echo "pkg: yarn" || echo "pkg: npm"

Nếu không phải Next.js: DỪNG. Báo: "Kỹ năng này hiện chỉ hỗ trợ Next.js. Stack hiện tại của anh/chị là [X]. Em port logic sang Vite/static với Vercel function không?" — đợi người dùng.

Nếu cả app/ và pages/: hỏi người dùng dùng cái nào.

0.2 Kiểm tra hạ tầng hiện có

ls app/api/ pages/api/ lib/ 2>/dev/null
grep -E '"@vercel/kv"|"@supabase/supabase-js"|"@upstash/redis"' package.json
grep -E "SEPAY|KV_REST|SUPABASE_" .env.local 2>/dev/null

0.3 HỎI người dùng chọn provider

Em phát hiện anh/chị dùng Next.js [App/Pages] Router + TypeScript + [pnpm/yarn/npm].

Anh/chị muốn lưu lead store ở đâu?

1. Vercel KV (Upstash Redis)
   ✓ Thiết lập nhanh 2 phút (1-click trong Vercel dashboard)
   ✓ Native TTL — không lo project pause
   ✗ Free chỉ 30K commands/tháng → ~500 đơn/tháng
   ✗ Không có SQL — admin filter phức tạp khó

2. Supabase Free (Postgres) — KHUYẾN NGHỊ
   ✓ Free tier rộng nhất (500MB DB + 5GB bandwidth, unlimited query)
   ✓ Postgres = SQL query mạnh, Supabase Studio UI đẹp để view data
   ✓ Type-safe TypeScript auto-generated
   ✓ Thiết lập 5 phút (Console + paste 2 env vars)
   ⚠ Project auto-pause sau 7 ngày silence → em wire Vercel Cron ping `/api/health` mỗi 6 ngày để fix
   ⚠ TTL manual qua pg_cron (đã wire trong migration SQL)
   → Phù hợp < 2000 đơn/tháng, dễ scale admin features

Anh/chị chọn 1 hay 2?

GATE: KHÔNG đi Giai đoạn 1 cho đến khi người dùng chọn. Default suggest Supabase nhưng force chọn explicit.

Sau khi người dùng chọn, tóm tắt plan:

Anh/chị chọn [Vercel KV / Supabase]. Em sẽ:

  1. Hướng dẫn anh/chị thiết lập Sepay account (5-10 phút)
  2. Thiết lập lead store theo provider đã chọn
  3. Wire code: lib/leads-store.ts + /api/checkout + /api/sepay-webhook + nhúng VietQR
  4. Test

Sẵn sàng đi Giai đoạn 1 chưa anh/chị?


Giai đoạn 1 — Hướng dẫn người dùng thiết lập Sepay account

Đọc references/sepay-account-setup.md cho full guide. Tóm tắt 5 bước cho người dùng:

Bước 1 — Đăng ký my.sepay.vn

  1. Truy cập https://my.sepay.vn → Đăng ký
  2. Điền SĐT, email, mật khẩu → verify OTP
  3. Hoàn tất profile: Họ tên + CCCD/CMND (cá nhân) hoặc Mã số thuế (công ty)

Bước 2 — Liên kết tài khoản ngân hàng

Dashboard → Tài khoản ngân hàng → Thêm tài khoản:

  • Chọn ngân hàng (Vietcombank, Techcombank, MB, ACB, VPBank, BIDV, VietinBank, TPBank, ...)
  • Nhập số TK + tên chủ TK (khớp với app banking)
  • Verify tự động (qua bank API) hoặc thủ công (chuyển 1.000-10.000đ với mã xác minh Sepay đưa)

Bước 3 — Lấy API key

Dashboard → Cài đặt → API & Webhook → Tạo API Key mới:

  • Name: landing-page-prod
  • Permissions: webhook:read
  • Copy key (chỉ hiện 1 lần)

Bước 4 — Thiết lập webhook URL

Cùng trang → Webhook → Thêm webhook:

  • URL: https://yourdomain.vn/api/sepay-webhook (sẽ live sau deploy)
  • Auth: API Key → paste key vừa tạo
  • Events: transaction:incoming
  • Save

⚠️ Local dev: dùng ngrok expose localhost:3000 cho Sepay test.

Bước 5 — Paste cho kỹ năng

SEPAY_WEBHOOK_API_KEY=sk_xxxxxxxxxxxxxxxxxxxx
SEPAY_BANK_ACCOUNT_NUMBER=1023456789
SEPAY_BANK_NAME=Vietcombank
SEPAY_ACCOUNT_NAME=NGUYEN VAN A

GATE: KHÔNG đi Giai đoạn 2 cho đến khi người dùng paste đủ.


Giai đoạn 2A — Thiết lập Vercel KV (chỉ nếu người dùng chọn KV ở Giai đoạn 0)

Vercel KV = Upstash Redis managed. Free 30K commands/tháng.

2A.1 Tạo KV namespace

Vercel dashboard → Project → Storage → Create Database → KV (Redis) → name sepay-leads → Create.

Auto-generate 4 env vars:

KV_URL=...
KV_REST_API_URL=...
KV_REST_API_TOKEN=...
KV_REST_API_READ_ONLY_TOKEN=...

Bấm Connect to Project → Vercel inject env (Production + Preview + Development).

2A.2 Kéo env xuống local

npm i -g vercel    # nếu chưa có
vercel link
vercel env pull .env.local

2A.3 Cài package

pnpm add @vercel/kv  # hoặc yarn / npm install

2A.4 Verify

node -e "
const { kv } = require('@vercel/kv');
kv.set('test', 'hello').then(() => kv.get('test')).then(v => {
  console.log('KV OK:', v);
  return kv.del('test');
});
"

Expect KV OK: hello. Đi Giai đoạn 3.


Giai đoạn 2B — Thiết lập Supabase Free (chỉ nếu người dùng chọn Supabase ở Giai đoạn 0)

Đọc references/supabase-setup.md cho full guide chi tiết 6 bước. Tóm tắt:

2B.1 Tạo Supabase account + project

  1. https://supabase.com → Start your project → Login GitHub
  2. New project:
    • Name: sepay-leads-<brand>
    • Database Password: bấm Generate → save
    • Region: ⚠️ Southeast Asia (Singapore) (default us-east latency 250ms+)
    • Pricing: Free
  3. Đợi ~2 phút provision

2B.2 Chạy migration SQL

Sidebar → SQL Editor → New query → paste nội dung templates/supabase-migration.sql → Run.

Tạo 4 bảng + indexes + next_order_id() function + RLS enable + pg_cron daily cleanup job.

Verify output: 4 bảng (leads/phone_index/order_counter/webhook_dedup) + 1 pg_cron job + next_order_id() trả "DH000001".

Reset counter (vì verify đã tăng counter):

UPDATE order_counter SET current_value = 0 WHERE id = 1;
DELETE FROM leads WHERE order_id = 'DH000001';

2B.3 Lấy API credentials

Project Settings → API:

  • Copy Project URL (https://xxxxx.supabase.co)
  • Copy service_role secret (KHÔNG anon key — service_role bypass RLS, dùng cho server)

2B.4 Paste env vars

SUPABASE_URL=https://xxxxx.supabase.co
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJI...

Kỹ năng tự động verify:

  • URL match ^https://[a-z0-9]+\.supabase\.co$
  • Key decode JWT, check role: "service_role" (KHÔNG anon)

Nếu sai → báo lỗi, xin paste lại.

2B.5 Cài package

pnpm add @supabase/supabase-js

2B.6 Wire Vercel Cron ping (chống pause)

Supabase Free tự động pause sau 7 ngày silence. Workaround: ping /api/health mỗi 6 ngày.

Kỹ năng scaffold app/api/health/route.ts (từ templates/api-health-route.ts) + append vercel.json với:

{
  "crons": [
    { "path": "/api/health", "schedule": "0 3 */6 * *" }
  ]
}

⚠️ Vercel Cron Hobby giới hạn 2 cron/tháng. Pattern */6 days = ~5 lần/tháng → vượt quota. Các lựa chọn:

  1. Vercel Pro ($20/tháng) — unlimited cron
  2. GitHub Actions workflow .github/workflows/keep-alive.yml (FREE) — kỹ năng scaffold nếu detect repo GitHub
  3. cron-job.org (FREE) — thiết lập thủ công, paste URL /api/health

Kỹ năng mặc định chọn option 2 (GitHub Actions) nếu repo có .git/config với GitHub remote. Otherwise printout option 3 instruction.

2B.7 Verify

node -e "
const { createClient } = require('@supabase/supabase-js');
const sb = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_SERVICE_ROLE_KEY);
sb.from('order_counter').select('current_value').eq('id', 1).single().then(r => {
  if (r.error) { console.error('FAIL:', r.error.message); process.exit(1); }
  console.log('Supabase OK. current_value =', r.data.current_value);
});
"

Expect Supabase OK. current_value = 0. Đi Giai đoạn 3.


Giai đoạn 3 — Scaffold lib/leads-store.ts + impl

Provider abstraction: Các route API import từ lib/leads-store.ts, không biết underlying là KV hay Postgres.

Nếu chọn KV (Giai đoạn 0)

Scaffold 2 file:

  • lib/leads-store.ts ← copy templates/lib-leads-store-kv.ts (1 dòng export * from './leads-kv')
  • lib/leads-kv.ts ← copy templates/lib-leads-kv.ts (KV impl, ~160 dòng)

Nếu chọn Supabase

Scaffold 3 file:

  • lib/leads-store.ts ← copy templates/lib-leads-store-supabase.ts (re-export Supabase)
  • lib/leads-supabase.ts ← copy templates/lib-leads-supabase.ts (Postgres impl + listLeads cho admin)
  • lib/supabase-admin.ts ← copy templates/lib-supabase-admin.ts (admin client cached singleton với service_role)

API surface CHUNG (cả 2 impl):

  • createLead(input) → { orderId, lead } — atomic ID + insert + secondary index
  • getLeadByOrderId(orderId) → Lead | null
  • getLeadByPhone(phone) → Lead | null — fallback lookup
  • findPendingLeadByAmountAndTime(amount, start, end) → Lead[] — Strategy 3 webhook matching
  • markLeadPaid(orderId, payment) → Lead | null
  • isTransactionProcessed(sepayId) → boolean — dedup
  • markTransactionProcessed(sepayId) → void

TTL: 7 ngày pending / 90 ngày paid. KV qua ex: param. Supabase qua expire_at field + pg_cron daily delete.

Đổi provider sau = sửa 1 dòng leads-store.ts (KHÔNG đụng API code).

Đọc references/leads-kv-schema.md (KV) hoặc references/supabase-leads-schema.md (Supabase) cho rationale chi tiết.


Giai đoạn 4 — Scaffold /api/checkout route

Đọc templates/api-checkout-app-router.ts (App Router) hoặc templates/api-checkout-pages-router.ts (Pages Router). Copy vào path tương ứng.

Cả 2 template import { createLead } from '@/lib/leads-store' — provider-agnostic.

Flow:

Client POST /api/checkout { name, phone, email, productName, amount }
  ↓
Server:
  1. Validate (phone VN format, email regex, amount > 0)
  2. createLead() → { orderId: "DH000123" }
  3. Generate Sepay QR URL: https://qr.sepay.vn/img?acc=X&bank=Y&amount=Z&des=DH000123&template=compact
  4. Return { orderId, amount, bankInfo, content, qrUrl }
  ↓
Client: show QR modal HOẶC redirect /checkout/DH000123

Giai đoạn 5 — Scaffold /api/sepay-webhook route

Đọc templates/api-sepay-webhook-app-router.ts. Copy vào app/api/sepay-webhook/route.ts.

Template import ... from '@/lib/leads-store' — provider-agnostic.

Flow:

Sepay POST /api/sepay-webhook
  Authorization: Apikey {SEPAY_WEBHOOK_API_KEY}
  Body: SepayWebhookPayload
  ↓
Server:
  1. Xác minh auth qua timingSafeEqual — chống timing attack
  2. Early dedup: isTransactionProcessed(payload.id) → return 200 sớm
  3. Record dedup FIRST — idempotent ngay cả khi processing fail
  4. Filter transferType === 'in' (bỏ outgoing)
  5. Multi-strategy matching:
     a. content → order_id (regex /DH\d+/)
     b. content → phone (regex /0\d{9}/) → getLeadByPhone
     c. amount + timestamp ±30min → findPendingLeadByAmountAndTime (chỉ accept length === 1)
  6. Reject underpayment, ACCEPT overpayment
  7. markLeadPaid(orderId, payment) → update store
  8. Fan-out side effects qua try/catch loop (KHÔNG Promise.all)
  9. ALWAYS return 200 (kể cả internal error) — Sepay retry Fibonacci 7 lần nếu non-200

Side effects placeholder cho biz-email-setup + biz-telegram-payment-notify wire vào sau.

Đọc references/sepay-webhook-flow.md cho dedup rationale + retry behavior.


Giai đoạn 6 — Nhúng VietQR vào landing page

3 pattern UX, hỏi người dùng chọn 1:

PatternKhi nàoUX
A. Modal popupSản phẩm đơn / mua impulseSubmit form → modal popup QR ngay tại trang gốc
B. /checkout/[orderId] pageĐa sản phẩm / cần share URL …

…

[đã cắt ngắn để dịch]

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Best practices for Remotion - Video creation in React

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Scaffold trang `/admin` CRM-style trực quan vào Next.js project (Supabase backend) — KHÔNG còn variant Vercel KV. Layout 1CRM-inspired: sidebar 3 tab (Tổng quan / Khách hàng / Email marketing) + popup nhập mã đăng nhập. **Tab Tổng quan**: 4 KPI cards (Tổng leads / Đã thanh toán / Tỷ lệ chuyển đổi / Doanh thu) có delta arrow vs kỳ trước, line chart leads+paid+revenue theo ngày dùng `recharts`, donut trạng thái paid/pending/expired, period selector pill 7d/30d/90d, list 5 thanh toán gần nhất. **Tab Khách hàng**: bảng leads + search + filter trạng thái + filter ngày + CSV export. **Tab Email marketing**: form soạn chiến dịch (tên + tiêu đề + body chọn định dạng **văn bản thường HOẶC HTML** + placeholder `{{name}}` + audience 4 loại all/paid/pending/last_days + tên người gửi) — có nút **Xem trước** mở modal iframe render đúng email thật (text → auto convert + wrap khung; HTML fragment → wrap khung, HTML đầy đủ giữ nguyên) → gửi bulk qua SMTP (reuse `nodemailer` của `biz-email-setup` — KHÔN

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Deploy landing page / website (React, Next.js, Vite, static HTML) lên Vercel — tự kiểm tra Vercel CLI hoặc Vercel MCP đã cài chưa, nếu chưa thì cài qua npm/pnpm và hướng dẫn user authenticate (vercel login), tự detect framework (Next.js / Vite / CRA / static), auto-generate vercel.json khi cần, chạy `vercel --prod`, trả về live URL + inspect URL + hướng dẫn custom domain. USE WHEN user says 'deploy lên vercel', 'đẩy landing page lên vercel', 'publish website', 'go live', 'deploy nextjs', 'deploy react', 'deploy vite', 'tạo URL live', 'đưa lên production', 'biz-deploy-vercel', 'host landing page', 'vercel deploy', 'ship lên vercel', 'đẩy code lên vercel'. Skill này áp dụng cho cả case dùng Vercel CLI lẫn Vercel MCP server.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Setup SMTP-based email auto-responder cho landing page bán hàng — tự động gửi email sau khi user điền form (tên/SĐT/email), KHÔNG cố định vào provider nào. Skill này (1) hỏi user chọn SMTP provider (Gmail/Google Workspace, Resend SMTP, SendGrid, Mailgun, Brevo, Zoho, hoặc SMTP custom của hosting VN) và detect Next.js stack đang dùng, (2) đọc context từ `offer.json` + `conversion-copy.md` (từ `/biz-offer-alex-hormozi`) HOẶC đọc trực tiếp Next.js project đã build qua `ui-ux-pro-max` (file `app/page.tsx`) HOẶC đọc HTML landing page đã deploy để hiểu offer, dream outcome, mechanism, bonus. Lưu ý: skill `biz-sales-page-layout` đã DEPRECATED 2026-05-14 — pipeline mới skip layout/copy.json, (3) **draft 2 email**: email A — auto-responder gửi cho lead (warm welcome + deliver lead magnet/booking confirm/payment link tuỳ offer type), email B — notification gửi cho owner (lead alert + thông tin liên hệ), (4) **show draft cho user duyệt và chỉnh sửa** trước khi wire vào code, (5) cài `nodemailer`

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Cài chatbot AI dạng floating widget góc dưới phải vào project Next.js có sẵn (App Router hoặc Pages Router), responsive đầy đủ web + tablet + mobile, gọi LLM qua OpenRouter (mặc định google/gemini-3-flash-preview, có thể đổi sang anthropic/claude-sonnet-4.6), streaming response, RENDER MARKDOWN trong assistant bubble (bold / list / link / code) qua react-markdown + remark-gfm — KHÔNG hiện raw **bold** dạng text — có knowledge base từ FAQ + tài liệu sản phẩm/khóa học do user cung cấp để chatbot tự động trả lời khách hàng, và TỰ ĐỘNG EXTRACT + LƯU LEAD (tên + SĐT + email) vào Upstash Redis/Vercel KV dưới namespace `chat-lead:{phone}` khi user cung cấp đầy đủ thông tin trong chat — dedupe theo SĐT, TTL 90 ngày, fire-and-forget không block stream. Skill tự detect số lượng project Next.js — nếu có nhiều hơn 1 sẽ hỏi user chọn project nào để cài; tự detect TypeScript/JS, App Router/Pages Router, Tailwind/CSS module, KV/Upstash availability (skip auto-save nếu chưa có); tự install react-markd

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Đóng gói offer **không thể chối từ** (grand slam offer) theo phương pháp Alex Hormozi ($100M Offers) — nhận input pains/gains/customer jobs theo Value Proposition Design (Osterwalder 2014) + sản phẩm/dịch vụ, rồi sinh ra: (1) markdown report tiếng Việt đầy đủ Value Equation scoring + Core Offer + 3-4 Bonus stack + Guarantee + Urgency + Pricing, (2) offer.json structured cho pipeline downstream (`ui-ux-pro-max` build sales page production-ready), (3) conversion copy block (headline + subheadline + CTA) sẵn sàng paste landing page. 2 input mode: (B) user paste sẵn pains + gains + product, (C) user chỉ có sản phẩm — skill phỏng vấn theo VPD framework để surface pain/gain trước. Bonus stack mode hybrid: skill brainstorm 5-7 candidate có justification value rồi user pick/chỉnh 3-4 cái. Tiếng Việt thuần (xưng anh/chị), giá VND charm pricing (X99K), 3-tier decoy structure. USE WHEN user says 'đóng gói offer', 'tạo offer', 'thiết kế offer Hormozi', 'grand slam offer', 'value stack', 'offer sta

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Nâng cấp copy sales page tiếng Việt — biến copy có sẵn (từ `offer.json` + `conversion-copy.md` của `/biz-offer-alex-hormozi`, HOẶC từ Next.js project đã build qua `ui-ux-pro-max`, HOẶC user paste block copy bất kỳ) thành **copy chất lượng cao chốt đơn**: headline punchy hơn, pain agitation đau hơn, mechanism rõ hơn, benefit cụ thể hơn, FAQ xử lý đúng objection của thị trường VN, CTA mạnh hơn. Skill này có 3 INTENSITY LEVEL: (1) **Polish** — light edit + power word + sửa nhịp; (2) **Conversion-optimized** — rewrite 5 block critical + tạo A/B variants cho hero/CTA; (3) **Sales-letter** — long-form story-driven full rewrite kèm P.S.. Mỗi section áp dụng đúng formula thuyết phục (PAR cho pain, BAB cho solution, FEP cho benefit, PVEN cho final CTA, Star-Chain-Hook cho testimonial). Output gồm 4 file: `copy-upgraded.md`, `copy-variants.md` (A/B test bank — 3 hero + 3 CTA + 3 final-CTA), `copy-changes.md` (diff Trước/Sau + lý do), `copy.json` (structured downstream). Giọng văn tiếng Việt thuầ

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

⚠️ DEPRECATED (2026-05-14) — Skill này KHÔNG còn trong pipeline chuẩn. Quy trình mới đã bỏ bước wireframe markdown trung gian: sau `/biz-offer-alex-hormozi` đi THẲNG sang `ui-ux-pro-max` để build Next.js sales page production-ready (có design language nhất quán: style + palette + font pairing, không phải Tailwind defaults). Lý do deprecate: wireframe markdown làm thêm 1 bước trung gian không tạo giá trị — `ui-ux-pro-max` đọc trực tiếp `offer.json` đã đầy đủ anchor + core + bonus + guarantee + urgency + pricing rồi ra HTML production luôn. Chỉ dùng skill này KHI user EXPLICITLY yêu cầu wireframe markdown để review/in/share trước khi build code (rare case). KHÔNG trigger trên các keyword 'tạo sales page', 'tạo landing page bán hàng' nữa — những keyword đó giờ trigger `ui-ux-pro-max`.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Setup Telegram bot notification cho thanh toán thành công từ Sepay webhook trong Next.js project. Skill này: (1) hướng dẫn user 3 bước tạo Telegram bot riêng qua @BotFather + lấy bot token + chat_id (qua @userinfobot cho chat 1-1, hoặc /getUpdates API cho group), (2) tạo helper function `sendTelegramNotification()` reusable trong `lib/telegram.ts`, (3) detect existing Sepay webhook route trong project (thường là `/api/sepay-webhook`, `/api/payment-success`, hoặc tương đương) và wire Telegram call CÙNG CHỖ với email auto-responder (Resend) — gửi parallel qua `Promise.allSettled` để Telegram fail KHÔNG block 200 response trả Sepay (Sepay sẽ retry webhook nếu nhận non-200, gây duplicate notification), (4) draft message format mặc định tiếng Việt: emoji + tên khách + SĐT + email + amount (charm pricing VND định dạng `499.000đ`) + tên sản phẩm + timestamp giờ VN dd/mm/yyyy HH:mm, (5) update `.env.local` với `TELEGRAM_BOT_TOKEN` + `TELEGRAM_CHAT_ID`, add vào `.gitignore`, nhắc user paste vào

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Convert a single MP3 voiceover file into a single HeyGen avatar lip-sync MP4 video. Single-purpose — no planning, no SRT, no chunking, no Remotion compositing. Hybrid path — REST upload (helper script) + HeyGen MCP for video creation, because the post-2026 MCP no longer exposes an asset-upload tool. Reads avatar look pool (`HEYGEN_AVATAR_LOOKS`) from `.env` and HeyGen API key (`HEYGEN_API_KEY`) for the upload step. USE WHEN user says "tạo video heygen từ mp3", "mp3 to heygen", "heygen mp4 từ audio", "convert mp3 sang heygen video", "tạo avatar video từ file mp3", "lip sync mp3 heygen", "biến mp3 thành video heygen", or any time the user has exactly one MP3 file and wants exactly one HeyGen avatar MP4 out.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Demand-side market research cho digital product / service ở Việt Nam — đo cầu thật + WTP + channel-market fit + defensibility qua keyword volume, marketplace sales (Shopee/Unica/Edumall/Gitiho/KyNa), community signal (FB groups, TikTok hashtag, Zalo OA), competitor pricing, unit economics — không phải macro PESTEL. Output: keyword portfolio + Niche Score 100 điểm 7-dimension có evidence + go/no-go decision + falsification protocol. Force triangulate ≥3 sources cho mỗi claim quan trọng. USE WHEN user says 'nghiên cứu thị trường', 'market research', 'validate niche', 'keyword research', 'demand validation', 'niche có nên làm không', 'có ai làm chưa', 'thị trường đủ lớn không', 'có lời không', 'chọn ngách', 'kiểm tra cầu'. Cũng trigger khi user mô tả 1 ý tưởng kinh doanh cụ thể và muốn check feasibility. Skill này KHÔNG fit: high-ticket transactional sale (BĐS, ô tô), B2B enterprise (sales cycle 6+ tháng), hyper-local geo micro-market (1 toà nhà, 1 phường). KHÔNG làm: macro PESTEL/Porter

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Transcribe an MP3 voiceover into an SRT subtitle file and a word-level segments JSON using local OpenAI Whisper. Input is a single MP3 path; output is `<stem>.srt` + `<stem>_segments.json` written next to the MP3 (or to a custom output dir). USE WHEN the user says 'extract srt from mp3', 'trích srt từ mp3', 'transcribe voiceover', 'tạo file srt và segments', 'whisper transcribe', 'bóc transcript có timestamp', 'extract voiceover segments', 'tách SRT từ audio', or any time a downstream skill (plan-short-video-edit, heygen-remotion-short-video-editor) needs an SRT + word-level segments JSON from a voiceover MP3 and one does not already exist.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Convert Vietnamese/English script text to MP3 voiceover using ElevenLabs TTS API. Calls POST /v1/text-to-speech/{voice_id}, streams audio bytes, writes MP3 directly. Locked to Hoang's brand voice ID by default. USE WHEN user says 'tạo mp3 elevenlabs', 'elevenlabs tts', 'eleven labs voice', 'text to speech elevenlabs', 'tạo voiceover elevenlabs', 'đọc text bằng elevenlabs', 'tts elevenlabs to mp3', 'eleven labs script to mp3', 'voiceover bằng elevenlabs', 'giọng elevenlabs'.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

End-to-end orchestrator: **script → final MP4 16:9 (1920×1080) podcast-keynote**.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

End-to-end short-video pipeline — từ kịch bản (Việt/Anh) ra MP4 TikTok/Reels 9:16 hoàn chỉnh. Orchestrator 3 phase ghép skill có sẵn — (1) TTS provider chọn được giữa `mkt-elevenlabs-tts-to-mp3` (default, voice của Hoàng) hoặc `mkt-video-script-to-mp3` (MiniMax speech-2.8-hd), (2) checkpoint user duyệt MP3, (3) `heygen-mp3-to-mp4` lip-sync avatar HeyGen, (4) delegate Phase 3 packaging cho sub-agent `mkt-full-video-phase3-packager` (transcribe + scene outline + checkpoint + fan-out N scene writers parallel + scaffold + preview Studio). API key + voice ID cho cả 2 provider lưu ở `.env`. USE WHEN user nói "tạo full video từ script", "script to tiktok video", "pipeline full video heygen + hyperframe", "tạo video từ kịch bản đến mp4", "elevenlabs heygen hyperframe full pipeline", "minimax heygen pipeline", "kịch bản ra video tiktok", hoặc có sẵn 1 script + (optional) ảnh b-roll và muốn ra MP4 9:16 đóng gói có captions, SFX, b-roll.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Build a TikTok/Reels/YouTube **landscape 16:9 (1920×1080)** short video from a pre-recorded talking-head MP4 using HyperFrames — transcribe Vietnamese audio, scaffold a complete preview-ready 1920×1080 project with a slide pane (1200px) on the left and a floating avatar frame on the right, GSAP timeline có SPLIT↔PIP transitions (slide full-screen + avatar PIP corner thumbnail), breathing yoyo zoom + beat-driven punch-in trên avatar, 5 scene compositions kiểu "tier-row" pattern (post-stack hook / chats-stack problem / hero-orb solution / counter-row recap / terminal-row CTA), optional cream-paper editorial infographic image slots với `<img onerror>` fallback, 6 SFX wired tại scene boundaries, **NO captions** (giọng avatar là spine). USE WHEN user nói "edit video 16:9 từ HeyGen MP4", "scaffold project landscape", "podcast keynote editor", "talking head + slide editor", "build hyperframes 1920×1080", "tạo project 16:9 từ avatar mp4", "scaffold 16:9 hyperframes", "hyperframe landscape vide

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Pipeline đóng gói: từ MP4 quay sẵn (talking head 9:16) tới HyperFrames preview project hoàn chỉnh có captions, SFX, zoom hooks, b-roll toàn cảnh có hiệu ứng rich, và CTA finale.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Audit bài Facebook / Reels / YouTube để phát hiện 4 downward drivers (over-branding, over-production, stock imagery, standardized aesthetic) + frequency-over-quality. Mỗi anti-pattern bị drop ~75% performance nếu hiện diện. USE WHEN user says 'audit content', 'check anti pattern', 'content có lỗi gì không', 'kiểm tra over branding', 'vì sao video bị chết', 'vì sao post không ai xem', 'content audit', 'kiểm tra chất lượng content'.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Tìm viral pattern ở ngành khác (bác sĩ, luật sư, tài chính, bất động sản, thủ công) có thể apply cho niche AI/automation của Hoang. Ngách AI educator VN còn ít format được khai thác — cross-industry adaptation là blue ocean. USE WHEN user says 'tìm format ngành khác', 'cross industry research', 'học format từ ngành khác', 'blue ocean format', 'tìm format chưa ai làm', 'adapt format từ niche khác', 'cross industry viral'.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Rewrite CTA kiểu autocratic (Mua ngay! Follow ngay! Đăng ký liền!) sang 3 variants Democratic / Benevolent / Laissez-faire — reach 85% dân số thay vì chỉ 5% (action-based). Áp dụng cho landing page, caption FB, CTA video, email. USE WHEN user says 'rewrite cta', 'sửa cta', 'cta không autocratic', 'viết lại kêu gọi hành động', 'cta cho landing page', 'cta nhẹ nhàng hơn', 'inclusive cta', 'cta democratic benevolent'.

相关技能