> For the complete documentation index, see [llms.txt](https://apidocs.abit.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.abit.vn/webhook/webhook-don-hang.md).

# Webhook đơn hàng

Ngoài API lấy danh sách đơn hàng, khách hàng, sản phẩm thì Abit có xây dựng Webhook để đẩy dữ liệu về các URL webhook được shop cấu hình trên Abit cho nhiều mục đích khác nhau

Để cấu hình webhook đơn hàng, Quý khách hàng có thể truy cập menu **Cấu hình ⇒ Thông tin shop ⇒ Tab Đối tác**

Click vào icon **Cấu hình gửi thông báo** để tiến hành khai báo URL Webhook để tiếp nhận thông tin mà Abit đẩy về theo URL đó

<figure><img src="https://3069215855-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F91ushNBhdXBKtwOIS6Yg%2Fuploads%2FUREINpN4zJPpJCbQZ3uS%2Fwebhook-abit.png?alt=media&amp;token=a54ac6ce-fdb2-44e4-a7f5-12ae0e624601" alt=""><figcaption><p>Chọn trạng thái đơn hàng khi có biến động về trạng thái thì sẽ bắn thông tin đơn hàng về URL API Webhook</p></figcaption></figure>

{% tabs %}
{% tab title="Json example" %}

```json
{
   "invoice_date":"2025-04-30T17:00:00.000Z",
   "eoi_order_id":"578675043107439962",
   "adjustment":0,
   "sales_commission":0,
   "sub_total":69000,
   "total":76700,
   "discount_amount":0,
   "discount_percent":0,
   "s_h_amount":7700,
   "mahang":"(1)AOTHUN...",
   "campaign":"",
   "campaign_group":"",
   "channel":"TIKTOK_SHOP",
   "nhanvien":"demo",
   "order_source":"TIKTOK_SHOP",
   "message":"SL: 1 - Mã SP: AOTHUN - Tên SP: Ao thun có cổ -  Giá bán: 69000",
   "ecom_doanhso":76700,
   "ecom_username":"7495809628279114074",
   "order_source_name":"VN - Shop thời trang",
   "created_at":"2025-05-01T16:57:31.000Z",
   "products":"[{\"currency\":\"VND\",\"display_status\":\"AWAITING_SHIPMENT\",\"id\":\"578675043107571034\",\"is_gift\":false,\"original_price\":\"95000\",\"package_id\":\"1161280609977664858\",\"package_status\":\"TO_FULFILL\",\"platform_discount\":0,\"product_id\":\"1731307057752475541\",\"product_name\":\"Áo thun nam nữ\",\"sale_price\":\"69000\",\"seller_discount\":26000,\"seller_sku\":\"AOTHUN\",\"shipping_provider_id\":\"6841743441349706241\",\"shipping_provider_name\":\"Ju0026T Express\",\"sku_id\":\"1731307086149617557\",\"sku_image\":\"https://p16-oec-sg.ibyteimg.com/tos-alisg-i-aphluv4xwc-sg/fa5523810cfd4622944b1785f100eaa4~tplv-aphluv4xwc-origin-jpeg.jpeg?dr=15568u0026t=555f072du0026ps=933b5bdeu0026shp=54477afbu0026shcp=3c3d9ffbu0026idc=my2u0026from=1413970683\",\"sku_name\":\"ÁO XE MÁY CỜ, L (48-58kg) (u003C1.68m)\",\"sku_type\":\"NORMAL\",\"tracking_number\":\"\",\"quantity\":1}]",
   "phone_number":"(+84)098*****63",
   "donvi_vc":"JNT",
   "tiendatcoc":0,
   "receiver":"D** A** k***",
   "address":"Viet Nam  Ha Noi  Quoc Oai  Qu****** Ch*******************",
   "tracking_no":"8590632397119",
   "invoicestatus":"Daphatthanhcong",
   "idanh":"",
   "name":"578675043107439961",
   "invoice_no":"EG71409856A45",
   "invoice_id":79069511,
   "updated_at":"2025-05-13T15:15:00.000Z",
   "invoice_status":"Daphatthanhcong"
}
```

{% endtab %}
{% endtabs %}

Trên API của đối tác, cần phản hồi về kết quả nhận tin từ webhook của Abit bắn về để Abit ghi nhận kết quả

```
{"Received":"true"}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://apidocs.abit.vn/webhook/webhook-don-hang.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
