Habify BaseHabify Base
Kỹ thuật Nền tảng Habify (Payments & Tax Engineering Team)Updated: 2026-11-248 min read

Integrate SePay QR/Cards & 7 Vietnam E-Invoice / POS Suppliers (Decree 70)

End-user payments flow directly into your company bank account via SePay (Bank QR transfer or Visa, Mastercard, JCB cards), triggering idempotent webhooks and automatic e-invoice issuance.

Key Takeaways

  • Supports both SePay methods: Bank Transfer (QR Code) and International Cards (Visa, Mastercard, JCB)
  • Pre-wired adapters for 7 Vietnamese e-invoice providers and Decree 70/2025 POS series (M)
  • Supports both individual buyers without tax IDs and corporate buyers with MST
  • Funds settle directly into your bank account with zero intermediary custody

Need a SePay Merchant Account?

Customer VietQR transfers and Visa/Mastercard/JCB card payments settle directly into your own bank account. Register with SePay before connecting credentials in your project.

Step 1: Store BYO SePay Merchant Credentials in the Envelope Vault

Open Habify Base Console (Project → BYO Services → Payment) and save your own SePay Merchant credentials. Secrets are encrypted with a per-project AES-256-GCM DEK and assigned an opaque webhook endpoint.

ts
await habifyServer.payment.upsertMerchantProfile({
  provider: "sepay",
  merchant_code: process.env.SEPAY_MERCHANT_ID!,
  api_secret: process.env.SEPAY_SECRET_KEY!,
  mode: "live",
  supported_methods: ["BANK_TRANSFER", "CARD"]
});

Step 2: Configure Seller Legal Profile & E-Invoice Supplier

Select one of the 7 supported Vietnamese e-invoice suppliers, configure your serial prefix (including POS series M for Decree 70/2025), and specify tax regime (VAT or household business sales receipt).

ts
await habifyServer.invoice.upsertSellerProfile({
  supplier_code: "viettel_sinvoice",
  tax_code: "0319523808",
  invoice_series: "1C26MYY",
  invoice_type: "vat",
  default_tax_rate: "10",
  credentials: {
    username: process.env.EINVOICE_USER!,
    password: process.env.EINVOICE_PASS!
  }
});

Step 3: Create SePay Checkout & Issue E-Invoice on Verified Webhook

Create the payment via the Unified Gateway (which enforces owner_ref = project_id). After verifying the dual-secret HMAC payment.succeeded webhook, call habifyServer.invoice.issue() with buyer details.

ts
const payment = await habifyServer.payment.createPayment({
  request_id: `ord_${orderId}`,
  amount_minor: 490000,
  currency: "VND",
  payment_method: "BANK_TRANSFER", // or "CARD" (Visa, Mastercard, JCB)
  return_url: "https://yourapp.vn/checkout/return",
  items: [{ name: "Goi Pro 1 thang", quantity: 1, unit_amount: 490000 }]
});

Frequently Asked Questions

Does Habify hold end-user funds collected via SePay?

No. All BYO transactions settle directly into your own SePay merchant bank account. Habify never touches or custodies end-user funds.

Which card networks does SePay CARD method support?

SePay CARD checkout supports Visa, Mastercard, and JCB via hosted SePay checkout.