Introduction
Ha Tang is a developer platform for businesses in Vietnam, built from modules: transactional email, customer support chat, bank-transfer payments, a product catalogue and a CRM. Each business turns on the modules it needs. They all share one account, one team, one set of API keys and one stream of webhooks, so a single integration covers everything you use.
The modules
| Module | What it does | Start here |
|---|---|---|
| Resend-compatible email API and SMTP relay, several sending domains, templates, audiences, broadcasts, automations and inbound mail | Email overview | |
| Support (Customer Support) | Website chat widget, native SDKs for iOS, Android, Flutter and React Native, one inbox for Zalo (OA and personal), Messenger, Instagram, TikTok, TikTok Shop, WhatsApp, Telegram, LINE, X and email, plus tickets and an AI assistant | Support overview |
| Payments | VietQR transfers straight into your own bank account, automatic matching and e-invoices | Payments overview |
| Products | Product catalogue and orders, product cards and payment links sent inside a conversation | Support REST API |
| CRM | One customer profile across every channel, custom fields, filters by stage, label and channel, and Zalo ZNS messages | Support REST API |
There is no "website" or "sales channel" layer above the modules. Each module owns its own resources and can have many of them: Email has several sending domains, and Support has several widget sites and mobile apps.
An owner or admin turns modules on and off in Business settings → Modules. See Businesses and modules.
One API key, one webhook stream
Every module is served by the same REST API at https://api.hatang.dev, with the same conventions:
- One kind of API key. A key starts with
ht_and carries scopes such asemail:sendorchat:read. Send it asAuthorization: Bearer ht_123.... - One error format. Every error is a JSON object
{ statusCode, name, message }. See Errors. - One webhook stream. A webhook endpoint subscribes to events from any module (
email.delivered,chat.message.created,payment.succeeded, …) and every delivery is signed the same way. See Webhooks. - Shared rules for rate limits, pagination and idempotency.
Two more hosts serve specific clients:
| Host | Used by |
|---|---|
https://api.hatang.dev | Your server: REST API for every module |
https://chat.hatang.dev | The chat widget and the mobile chat SDKs (realtime gateway) |
smtp.hatang.dev:5870 (STARTTLS) | Apps that send email over SMTP |
https://app.hatang.dev | The dashboard, for you and your team |
How to use this hub
The hub has two parts:
- Guides (this part) explain how to do something end to end: send your first email, put the chat widget on a site, take a payment, verify a webhook. Start with Getting started, then open the guides of the modules you use.
- References list every detail: the REST API reference, the chat gateway reference, the webhook events, the error codes, the limits and the realtime protocol.
Code samples in the guides come in cURL, Node.js (with @hatang/sdk), Python and PHP. Pick a language once and every page follows it.
Integration checklist
- Create an account at app.hatang.dev and pick the modules you need.
- Create an API key with the scopes of those modules (Authentication).
- Call the API at
https://api.hatang.dev, or use the Node SDK@hatang/sdk. - Add a webhook endpoint to hear about events.
- Invite your team and give each person the access they need (Team and roles).