# 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 |
|---|---|---|
| **Email** | Resend-compatible email API and SMTP relay, several sending domains, templates, audiences, broadcasts, automations and inbound mail | [Email overview](https://hatang.dev/docs/guides/email/overview.md) |
| **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](https://hatang.dev/docs/guides/support/overview.md) |
| **Payments** | VietQR transfers straight into your own bank account, automatic matching and e-invoices | [Payments overview](https://hatang.dev/docs/guides/payments/overview.md) |
| **Products** | Product catalogue and orders, product cards and payment links sent inside a conversation | [Support REST API](https://hatang.dev/docs/guides/support/rest-api.md) |
| **CRM** | One customer profile across every channel, custom fields, filters by stage, label and channel, and Zalo ZNS messages | [Support REST API](https://hatang.dev/docs/guides/support/rest-api.md) |

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](https://hatang.dev/help/getting-started/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](https://hatang.dev/docs/guides/getting-started/authentication.md) such as `email:send` or `chat:read`. Send it as `Authorization: Bearer ht_123...`.
- **One error format.** Every error is a JSON object `{ statusCode, name, message }`. See [Errors](https://hatang.dev/docs/guides/getting-started/errors.md).
- **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](https://hatang.dev/docs/guides/getting-started/webhooks.md).
- **Shared rules** for [rate limits](https://hatang.dev/docs/guides/getting-started/rate-limits.md), [pagination](https://hatang.dev/docs/guides/getting-started/pagination.md) and [idempotency](https://hatang.dev/docs/guides/getting-started/idempotency.md).

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](https://hatang.dev/docs/reference/api.md), the [chat gateway reference](https://hatang.dev/docs/reference/chat-gateway.md), the [webhook events](https://hatang.dev/docs/reference/webhooks.md), the [error codes](https://hatang.dev/docs/reference/errors.md), the [limits](https://hatang.dev/docs/reference/limits.md) and the [realtime protocol](https://hatang.dev/docs/reference/realtime-protocol.md).

Code samples in the guides come in cURL, Node.js (with [`@hatang/sdk`](https://hatang.dev/docs/guides/getting-started/api-libraries.md)), Python and PHP. Pick a language once and every page follows it.

## Integration checklist

1. Create an account at [app.hatang.dev](https://app.hatang.dev) and pick the modules you need.
2. Create an API key with the scopes of those modules ([Authentication](https://hatang.dev/docs/guides/getting-started/authentication.md)).
3. Call the API at `https://api.hatang.dev`, or use the Node SDK `@hatang/sdk`.
4. Add a [webhook endpoint](https://hatang.dev/docs/guides/getting-started/webhooks.md) to hear about events.
5. Invite your team and give each person the access they need ([Team and roles](https://hatang.dev/help/account/employees-and-roles)).

## Next steps

- [Quickstart: send your first email](https://hatang.dev/docs/guides/getting-started/quickstart-email.md)
- [Quickstart: add live chat to your site](https://hatang.dev/docs/guides/getting-started/quickstart-chat.md)
- [Payments quickstart](https://hatang.dev/docs/guides/payments/quickstart.md)
- [Authentication](https://hatang.dev/docs/guides/getting-started/authentication.md)

Source: https://hatang.dev/docs/guides/getting-started/introduction
