Commerce API›Tổng quanOverview

Tài liệu API v1API v1 documentation

Commerce API

API bán hàng dành cho website, ứng dụng và bot đại lý. Đọc danh mục, kiểm tra ví, tạo đơn và nhận hàng số qua một chuẩn thống nhất.A commerce API for storefronts, apps and reseller bots. Read the catalog, inspect the wallet, create orders and receive digital delivery through one consistent contract.

https://kzispro.ggff.net/api/v1
  • 16 lệnhoperations
  • Phản hồi JSONJSON responses
  • Xác thực BearerBearer authentication

Bắt đầu & xác thựcGetting started & authentication

Một Bearer key, bốn phạm vi quyền.One Bearer key, four permission scopes.

Tạo API key trong bot Telegram của shop: Tài khoản → API bán hàng → Tạo API Key. Key chỉ hiện một lần. Mọi yêu cầu riêng tư phải gửi key qua header Authorization; tuyệt đối không đưa key xuống trình duyệt.Create the API key in the shop's Telegram bot: Account → Sales API → Create API key. The key is shown once. Every private request must send it in the Authorization header; never ship it in browser code.

Header xác thựcAuthentication headerÁp dụng cho mọi lệnh trừ nhóm Core.Required by every endpoint except Core.
Authorization: Bearer $SHOP_API_KEY
  • profile:readXem tài khoản, số dư và lịch sử ví.Read the account, wallet balance and wallet history.
  • catalog:readXem danh mục, sản phẩm, giá và tồn kho.Read categories, products, prices and stock.
  • orders:readXem đơn hàng của mình và hàng đã giao.Read own orders and delivered goods.
  • orders:writeTạo đơn thanh toán bằng ví.Create orders paid from the wallet.
curl "https://kzispro.ggff.net/api/v1/products?page=1&page_size=10" \  -H "Authorization: Bearer $SHOP_API_KEY"
const res = await fetch("https://kzispro.ggff.net/api/v1/products?page=1&page_size=10", {  headers: { Authorization: `Bearer ${process.env.SHOP_API_KEY}` },});const { success, data, error } = await res.json();
import os, requests res = requests.get(    "https://kzispro.ggff.net/api/v1/products?page=1&page_size=10",    headers={"Authorization": f"Bearer {os.environ['SHOP_API_KEY']}"},    timeout=30,)print(res.json())

Tham chiếu tương tácInteractive reference

Toàn bộ API tại một chỗ.The whole API in one place.

Chọn một lệnh để xem cURL, JavaScript, Python, request body và response mẫu.Pick an operation to see cURL, JavaScript, Python, the request body and a sample response.

GET/Công khaiPublic

Thông tin APIAPI info

Tên API, phiên bản và các quyền. Không cần key.API name, version and scopes. No key needed.

curl "https://kzispro.ggff.net/api/v1"
const res = await fetch("https://kzispro.ggff.net/api/v1");const { success, data, error } = await res.json();
import os, requests res = requests.get(    "https://kzispro.ggff.net/api/v1",    timeout=30,)print(res.json())
Response mẫuSample response200 OK
{  "success": true,  "data": {    "name": "Commerce API",    "version": "v1",    "auth": "Bearer API key",    "scopes": [      "profile:read",      "catalog:read",      "orders:read",      "orders:write"    ]  }}
GET/healthCông khaiPublic

Trạng thái hệ thốngHealth

API đang bật hay tắt. Không cần key.Whether the API is switched on. No key needed.

curl "https://kzispro.ggff.net/api/v1/health"
const res = await fetch("https://kzispro.ggff.net/api/v1/health");const { success, data, error } = await res.json();
import os, requests res = requests.get(    "https://kzispro.ggff.net/api/v1/health",    timeout=30,)print(res.json())
Response mẫuSample response200 OK
{  "success": true,  "data": {    "status": "ok",    "time": "2026-12-01T10:00:00Z"  }}
GET/meprofile:read

Hồ sơ & víProfile & wallet

Tài khoản của chủ key, kèm số dư ví và tổng đơn.Account of the key owner with wallet balance and totals.

curl "https://kzispro.ggff.net/api/v1/me" \  -H "Authorization: Bearer $SHOP_API_KEY"
const res = await fetch("https://kzispro.ggff.net/api/v1/me", {  headers: { Authorization: `Bearer ${process.env.SHOP_API_KEY}` },});const { success, data, error } = await res.json();
import os, requests res = requests.get(    "https://kzispro.ggff.net/api/v1/me",    headers={"Authorization": f"Bearer {os.environ['SHOP_API_KEY']}"},    timeout=30,)print(res.json())
Response mẫuSample response200 OK
{  "success": true,  "data": {    "telegram_id": 123456789,    "username": "reseller",    "first_name": "An",    "language": "vi",    "created_at": "2026-11-01T08:00:00Z",    "balance": 500000,    "currency": "VND",    "paid_orders": 12,    "total_spent": 1450000,    "scopes": [      "profile:read",      "catalog:read",      "orders:read",      "orders:write"    ]  }}
GET/walletprofile:read

Số dư víWallet balance

Số dư ví (VND).Wallet balance in VND.

curl "https://kzispro.ggff.net/api/v1/wallet" \  -H "Authorization: Bearer $SHOP_API_KEY"
const res = await fetch("https://kzispro.ggff.net/api/v1/wallet", {  headers: { Authorization: `Bearer ${process.env.SHOP_API_KEY}` },});const { success, data, error } = await res.json();
import os, requests res = requests.get(    "https://kzispro.ggff.net/api/v1/wallet",    headers={"Authorization": f"Bearer {os.environ['SHOP_API_KEY']}"},    timeout=30,)print(res.json())
Response mẫuSample response200 OK
{  "success": true,  "data": {    "balance": 500000,    "currency": "VND"  }}
GET/wallet/transactions?page=1&page_size=20profile:read

Lịch sử víWallet history

Lịch sử ví, mới nhất trước.Wallet history, newest first.

curl "https://kzispro.ggff.net/api/v1/wallet/transactions?page=1&page_size=20" \  -H "Authorization: Bearer $SHOP_API_KEY"
const res = await fetch("https://kzispro.ggff.net/api/v1/wallet/transactions?page=1&page_size=20", {  headers: { Authorization: `Bearer ${process.env.SHOP_API_KEY}` },});const { success, data, error } = await res.json();
import os, requests res = requests.get(    "https://kzispro.ggff.net/api/v1/wallet/transactions?page=1&page_size=20",    headers={"Authorization": f"Bearer {os.environ['SHOP_API_KEY']}"},    timeout=30,)print(res.json())
Response mẫuSample response200 OK
{  "success": true,  "data": [    {      "id": 91,      "type": "PURCHASE",      "amount": -45000,      "balance_after": 455000,      "order_code": "ORD-AB12CD34EF",      "created_at": "2026-12-01T10:00:02Z"    }  ],  "meta": {    "page": 1,    "page_size": 20,    "total": 1  }}
GET/categoriescatalog:read

Danh mụcCategories

Danh mục đang hiển thị, kèm số sản phẩm đang bán.Categories shown in the shop, with the number of products on sale.

curl "https://kzispro.ggff.net/api/v1/categories" \  -H "Authorization: Bearer $SHOP_API_KEY"
const res = await fetch("https://kzispro.ggff.net/api/v1/categories", {  headers: { Authorization: `Bearer ${process.env.SHOP_API_KEY}` },});const { success, data, error } = await res.json();
import os, requests res = requests.get(    "https://kzispro.ggff.net/api/v1/categories",    headers={"Authorization": f"Bearer {os.environ['SHOP_API_KEY']}"},    timeout=30,)print(res.json())
Response mẫuSample response200 OK
{  "success": true,  "data": [    {      "id": 3,      "parent_id": null,      "name": "ChatGPT",      "slug": "chatgpt",      "image_url": "",      "products": 4    }  ]}
GET/categories/{id}catalog:read

Chi tiết danh mụcCategory detail

Một danh mục và các sản phẩm của nó.One category with its products.

curl "https://kzispro.ggff.net/api/v1/categories/{id}" \  -H "Authorization: Bearer $SHOP_API_KEY"
const res = await fetch("https://kzispro.ggff.net/api/v1/categories/{id}", {  headers: { Authorization: `Bearer ${process.env.SHOP_API_KEY}` },});const { success, data, error } = await res.json();
import os, requests res = requests.get(    "https://kzispro.ggff.net/api/v1/categories/{id}",    headers={"Authorization": f"Bearer {os.environ['SHOP_API_KEY']}"},    timeout=30,)print(res.json())
Response mẫuSample response200 OK
{  "success": true,  "data": {    "id": 3,    "parent_id": null,    "name": "ChatGPT",    "slug": "chatgpt",    "image_url": "",    "products": 1,    "items": [      {        "id": 17,        "name": "ChatGPT Plus 1M",        "price": 45000,        "stock": 8,        "in_stock": true      }    ]  }}
GET/products?category_id=3&q=plus&page=1&page_size=20catalog:read

Danh sách sản phẩmProducts

Sản phẩm đang bán, giá hiện tại và tồn kho. Các bộ lọc đều không bắt buộc.Products on sale with the current price and stock. All filters are optional.

curl "https://kzispro.ggff.net/api/v1/products?category_id=3&q=plus&page=1&page_size=20" \  -H "Authorization: Bearer $SHOP_API_KEY"
const res = await fetch("https://kzispro.ggff.net/api/v1/products?category_id=3&q=plus&page=1&page_size=20", {  headers: { Authorization: `Bearer ${process.env.SHOP_API_KEY}` },});const { success, data, error } = await res.json();
import os, requests res = requests.get(    "https://kzispro.ggff.net/api/v1/products?category_id=3&q=plus&page=1&page_size=20",    headers={"Authorization": f"Bearer {os.environ['SHOP_API_KEY']}"},    timeout=30,)print(res.json())
Response mẫuSample response200 OK
{  "success": true,  "data": [    {      "id": 17,      "category_id": 3,      "name": "ChatGPT Plus 1M",      "sku": "GPT-PLUS-1M",      "description": "",      "type": "ACCOUNT",      "price": 45000,      "regular_price": 50000,      "stock": 8,      "in_stock": true,      "quantity_prices": [        {          "min_quantity": 5,          "unit_price": 43000        }      ],      "flash_sale": {        "sale_price": 45000,        "starts_at": "2026-12-01T00:00:00Z",        "ends_at": "2026-12-02T00:00:00Z",        "remaining": 20      }    }  ],  "meta": {    "page": 1,    "page_size": 20,    "total": 1  }}
GET/products/{id}catalog:read

Chi tiết sản phẩmProduct detail

Một sản phẩm đang bán.One product on sale.

curl "https://kzispro.ggff.net/api/v1/products/{id}" \  -H "Authorization: Bearer $SHOP_API_KEY"
const res = await fetch("https://kzispro.ggff.net/api/v1/products/{id}", {  headers: { Authorization: `Bearer ${process.env.SHOP_API_KEY}` },});const { success, data, error } = await res.json();
import os, requests res = requests.get(    "https://kzispro.ggff.net/api/v1/products/{id}",    headers={"Authorization": f"Bearer {os.environ['SHOP_API_KEY']}"},    timeout=30,)print(res.json())
Response mẫuSample response200 OK
{  "success": true,  "data": {    "id": 17,    "category_id": 3,    "name": "ChatGPT Plus 1M",    "price": 45000,    "regular_price": 50000,    "stock": 8,    "in_stock": true,    "quantity_prices": [],    "flash_sale": null  }}
GET/flash-salescatalog:read

Flash sale đang chạyLive flash sales

Sản phẩm đang có flash sale.Products with a flash sale running now.

curl "https://kzispro.ggff.net/api/v1/flash-sales" \  -H "Authorization: Bearer $SHOP_API_KEY"
const res = await fetch("https://kzispro.ggff.net/api/v1/flash-sales", {  headers: { Authorization: `Bearer ${process.env.SHOP_API_KEY}` },});const { success, data, error } = await res.json();
import os, requests res = requests.get(    "https://kzispro.ggff.net/api/v1/flash-sales",    headers={"Authorization": f"Bearer {os.environ['SHOP_API_KEY']}"},    timeout=30,)print(res.json())
Response mẫuSample response200 OK
{  "success": true,  "data": [    {      "id": 17,      "name": "ChatGPT Plus 1M",      "price": 45000,      "regular_price": 50000,      "stock": 8,      "in_stock": true,      "flash_sale": {        "sale_price": 45000,        "ends_at": "2026-12-02T00:00:00Z",        "remaining": 20      }    }  ]}
POST/ordersorders:write

Tạo & thanh toán đơnCreate & pay order

Tạo đơn và trừ tiền ví trong một bước. Bắt buộc có header Idempotency-Key.Creates an order and pays it from the wallet in one step. Needs the Idempotency-Key header.

curl -X POST "https://kzispro.ggff.net/api/v1/orders" \  -H "Authorization: Bearer $SHOP_API_KEY" \  -H "Idempotency-Key: order-20260101-0001" \  -H "Content-Type: application/json" \  -d '{"items": [{"product_id": 17, "quantity": 2}], "coupon_code": "", "expected_total": 90000}'
const res = await fetch("https://kzispro.ggff.net/api/v1/orders", {  method: "POST",  headers: {    Authorization: `Bearer ${process.env.SHOP_API_KEY}`,    "Idempotency-Key": "order-20260101-0001",    "Content-Type": "application/json",  },  body: JSON.stringify({"items": [{"product_id": 17, "quantity": 2}], "coupon_code": "", "expected_total": 90000}),});const { success, data, error } = await res.json();
import os, requests res = requests.post(    "https://kzispro.ggff.net/api/v1/orders",    headers={        "Authorization": f"Bearer {os.environ['SHOP_API_KEY']}",        "Idempotency-Key": "order-20260101-0001",    },    json={"items": [{"product_id": 17, "quantity": 2}], "coupon_code": "", "expected_total": 90000},    timeout=30,)print(res.json())
Request bodyRequest bodyapplication/json
{  "items": [    {      "product_id": 17,      "quantity": 2    }  ],  "coupon_code": "",  "expected_total": 90000}
Response mẫuSample response201 Created
{  "success": true,  "data": {    "code": "ORD-AB12CD34EF",    "status": "COMPLETED",    "payment_status": "VERIFIED",    "delivery_status": "DELIVERED",    "total": 90000,    "items": [      {        "product_id": 17,        "product_name": "ChatGPT Plus 1M",        "quantity": 2,        "unit_price": 45000      }    ]  }}
GET/orders?status=COMPLETED&page=1&page_size=20orders:read

Lịch sử đơn hàngOrder history

Đơn hàng của chủ key, mới nhất trước.Orders of the key owner, newest first.

curl "https://kzispro.ggff.net/api/v1/orders?status=COMPLETED&page=1&page_size=20" \  -H "Authorization: Bearer $SHOP_API_KEY"
const res = await fetch("https://kzispro.ggff.net/api/v1/orders?status=COMPLETED&page=1&page_size=20", {  headers: { Authorization: `Bearer ${process.env.SHOP_API_KEY}` },});const { success, data, error } = await res.json();
import os, requests res = requests.get(    "https://kzispro.ggff.net/api/v1/orders?status=COMPLETED&page=1&page_size=20",    headers={"Authorization": f"Bearer {os.environ['SHOP_API_KEY']}"},    timeout=30,)print(res.json())
Response mẫuSample response200 OK
{  "success": true,  "data": [    {      "code": "ORD-AB12CD34EF",      "status": "COMPLETED",      "payment_status": "VERIFIED",      "delivery_status": "DELIVERED",      "total": 90000,      "currency": "VND",      "created_at": "2026-12-01T10:00:02Z"    }  ],  "meta": {    "page": 1,    "page_size": 20,    "total": 1  }}
GET/orders/statsorders:read

Thống kê đơn hàngOrder stats

Số đơn và số tiền theo trạng thái.Order count and spend by status.

curl "https://kzispro.ggff.net/api/v1/orders/stats" \  -H "Authorization: Bearer $SHOP_API_KEY"
const res = await fetch("https://kzispro.ggff.net/api/v1/orders/stats", {  headers: { Authorization: `Bearer ${process.env.SHOP_API_KEY}` },});const { success, data, error } = await res.json();
import os, requests res = requests.get(    "https://kzispro.ggff.net/api/v1/orders/stats",    headers={"Authorization": f"Bearer {os.environ['SHOP_API_KEY']}"},    timeout=30,)print(res.json())
Response mẫuSample response200 OK
{  "success": true,  "data": {    "total_orders": 12,    "total_spent": 1450000,    "by_status": {      "COMPLETED": {        "orders": 12,        "amount": 1450000      }    }  }}
GET/orders/{code}orders:read

Chi tiết đơn hàngOrder detail

Một đơn hàng và các dòng sản phẩm.One order with its lines.

curl "https://kzispro.ggff.net/api/v1/orders/{code}" \  -H "Authorization: Bearer $SHOP_API_KEY"
const res = await fetch("https://kzispro.ggff.net/api/v1/orders/{code}", {  headers: { Authorization: `Bearer ${process.env.SHOP_API_KEY}` },});const { success, data, error } = await res.json();
import os, requests res = requests.get(    "https://kzispro.ggff.net/api/v1/orders/{code}",    headers={"Authorization": f"Bearer {os.environ['SHOP_API_KEY']}"},    timeout=30,)print(res.json())
Response mẫuSample response200 OK
{  "success": true,  "data": {    "code": "ORD-AB12CD34EF",    "status": "COMPLETED",    "payment_status": "VERIFIED",    "delivery_status": "DELIVERED",    "total": 90000,    "items": [      {        "product_id": 17,        "product_name": "ChatGPT Plus 1M",        "quantity": 2,        "unit_price": 45000      }    ]  }}
GET/orders/{code}/statusorders:read

Trạng thái đơn hàngOrder status

Trạng thái ngắn gọn để kiểm tra định kỳ.Short status for polling.

curl "https://kzispro.ggff.net/api/v1/orders/{code}/status" \  -H "Authorization: Bearer $SHOP_API_KEY"
const res = await fetch("https://kzispro.ggff.net/api/v1/orders/{code}/status", {  headers: { Authorization: `Bearer ${process.env.SHOP_API_KEY}` },});const { success, data, error } = await res.json();
import os, requests res = requests.get(    "https://kzispro.ggff.net/api/v1/orders/{code}/status",    headers={"Authorization": f"Bearer {os.environ['SHOP_API_KEY']}"},    timeout=30,)print(res.json())
Response mẫuSample response200 OK
{  "success": true,  "data": {    "code": "ORD-AB12CD34EF",    "status": "COMPLETED",    "payment_status": "VERIFIED",    "delivery_status": "DELIVERED",    "updated_at": "2026-12-01T10:00:05Z"  }}
GET/orders/{code}/deliveryorders:read

Thông tin giao hàngDelivery

Hàng đã giao. Rỗng cho đến khi đơn được giao.The delivered goods. Empty until the order is delivered.

curl "https://kzispro.ggff.net/api/v1/orders/{code}/delivery" \  -H "Authorization: Bearer $SHOP_API_KEY"
const res = await fetch("https://kzispro.ggff.net/api/v1/orders/{code}/delivery", {  headers: { Authorization: `Bearer ${process.env.SHOP_API_KEY}` },});const { success, data, error } = await res.json();
import os, requests res = requests.get(    "https://kzispro.ggff.net/api/v1/orders/{code}/delivery",    headers={"Authorization": f"Bearer {os.environ['SHOP_API_KEY']}"},    timeout=30,)print(res.json())
Response mẫuSample response200 OK
{  "success": true,  "data": {    "code": "ORD-AB12CD34EF",    "status": "COMPLETED",    "delivery_status": "DELIVERED",    "delivered": true,    "items": [      {        "product_id": 17,        "product_name": "ChatGPT Plus 1M",        "content": "user@example.com|password",        "delivered_at": "2026-12-01T10:00:05Z"      }    ]  }}

Quy trình mua hàngPurchase flow

Từ sản phẩm đến hàng đã giao trong bốn bước.From product to delivered goods in four steps.

Đơn được trừ tiền ví và giao hàng tự động. Gửi lại cùng Idempotency-Key chỉ trừ tiền một lần.Orders are paid from the wallet and delivered automatically. Repeating the same Idempotency-Key charges only once.

1Đọc sản phẩmRead the catalog

GET /products trả giá, tồn kho và flash sale hiện tại.returns the current price, stock and flash sale.

2Kiểm tra víCheck the wallet

GET /wallet cho biết số dư dùng được.returns the spendable balance.

3Tạo đơnCreate the order

POST /orders kèm Idempotency-Key; có thể gửi expected_total để chặn đổi giá.with an Idempotency-Key; send expected_total to guard against price changes.

4Nhận hàngCollect delivery

GọiPoll /orders/{code}/status đến khiuntil DELIVERED, rồi đọcthen read /orders/{code}/delivery.

curl -X POST "https://kzispro.ggff.net/api/v1/orders" \  -H "Authorization: Bearer $SHOP_API_KEY" \  -H "Idempotency-Key: order-20260101-0001" \  -H "Content-Type: application/json" \  -d '{"items": [{"product_id": 17, "quantity": 2}], "coupon_code": "", "expected_total": 90000}'
const res = await fetch("https://kzispro.ggff.net/api/v1/orders", {  method: "POST",  headers: {    Authorization: `Bearer ${process.env.SHOP_API_KEY}`,    "Idempotency-Key": "order-20260101-0001",    "Content-Type": "application/json",  },  body: JSON.stringify({"items": [{"product_id": 17, "quantity": 2}], "coupon_code": "", "expected_total": 90000}),});const { success, data, error } = await res.json();
import os, requests res = requests.post(    "https://kzispro.ggff.net/api/v1/orders",    headers={        "Authorization": f"Bearer {os.environ['SHOP_API_KEY']}",        "Idempotency-Key": "order-20260101-0001",    },    json={"items": [{"product_id": 17, "quantity": 2}], "coupon_code": "", "expected_total": 90000},    timeout=30,)print(res.json())

Hoàn tiền do shop duyệt thủ công, không thực hiện qua API.Refunds are approved manually by the shop and are not available through the API.

Mã lỗiError codes

Lỗi luôn có mã rõ ràng.Every failure has a clear code.

Phản hồi lỗi có dạngError responses look like {"success": false, "data": null, "error": {"code": "…", "message": "…"}}. Hãy xử lý theo trường code, không theo message.Branch on code, not on message.

400VALIDATION_ERRORThiếu trường hoặc giá trị không hợp lệ.A field is missing or invalid.
400IDEMPOTENCY_KEY_REQUIREDPOST /orders cần header Idempotency-Key gồm 8-100 chữ, số, '-' hoặc '_'.POST /orders needs an Idempotency-Key header of 8-100 letters, digits, '-' or '_'.
401INVALID_API_KEYThiếu key, key sai hoặc đã bị huỷ.The key is missing, wrong or revoked.
402INSUFFICIENT_BALANCEVí không đủ tiền. Chưa trừ khoản nào.The wallet does not cover the order. Nothing was charged.
403INSUFFICIENT_SCOPEKey không có quyền cho lệnh này.The key lacks the scope for this endpoint.
403ACCOUNT_RESTRICTEDTài khoản đang bị khoá.The account is blocked.
403CHANNEL_REQUIREDTài khoản phải tham gia kênh bắt buộc của shop trước khi mua.The account must join the shop's required channel before buying.
404NOT_FOUNDKhông có sản phẩm, danh mục hoặc đơn hàng này trong tài khoản.No such product, category or order for this account.
409OUT_OF_STOCKKhông đủ hàng. Chưa trừ khoản nào.Not enough stock. Nothing was charged.
409PRICE_CHANGEDTổng tiền khác expected_total. Chưa trừ khoản nào.The total differs from expected_total. Nothing was charged.
409CONFLICTIdempotency-Key đã dùng cho một đơn khác.The Idempotency-Key was already used for a different order.
429RATE_LIMITEDQuá nhiều yêu cầu. Chờ một phút rồi thử lại.Too many requests. Wait a minute and retry.
503API_DISABLEDShop đang tắt API.The API is switched off by the shop.
503MAINTENANCEShop đang bảo trì; tạm ngừng mua hàng.The shop is under maintenance; purchases are paused.

Giới hạn & retryLimits & retries

Giới hạn rõ ràng, thử lại an toàn.Explicit limits and safe retries.

Giới hạn tính theo IP trước khi xác thực và theo API key sau đó, trong cửa sổ một phút.Limits apply per IP before authentication and per API key afterwards, over a one-minute window.

360/ phútmin

Yêu cầu theo IPRequests per IP

120/ phútmin

Tổng yêu cầu mỗi API keyTotal requests per API key

30/ phútmin

Lượt tạo đơn mỗi API keyOrder creations per API key

Cách thử lại nên dùngRecommended retry policy

429Chờ một phút, thêm độ trễ ngẫu nhiên rồi thử lại.Wait a minute, add jitter, then retry.

5xx / timeoutLùi dần 1s, 2s, 4s; tối đa 3 lần.Exponential backoff 1s, 2s, 4s; at most 3 attempts.

POST /ordersLuôn dùng lại đúng Idempotency-Key ban đầu.Always reuse the original Idempotency-Key.

Bảo mậtSecurity

Giữ key ở phía máy chủ.Keep the key on your server.

Key chỉ hiện một lầnThe key is shown once

Shop chỉ lưu mã băm. Mất key thì tạo lại trong bot; key cũ hết hiệu lực ngay.The shop stores only a hash. If you lose it, regenerate in the bot; the old key stops working at once.

Chỉ gọi từ máy chủServer-side only

Lưu key trong biến môi trường, luôn dùng HTTPS, không đưa vào ứng dụng di động hay mã chạy trên trình duyệt.Store the key in an environment variable, always use HTTPS and never embed it in mobile apps or browser code.

Dữ liệu theo tài khoảnScoped to the account

Key chỉ thấy ví và đơn hàng của tài khoản Telegram đã tạo ra nó. Nội dung hàng chỉ trả về sau khi đơn đã giao.A key only sees the wallet and orders of the Telegram account that created it. Goods are returned only after delivery.

Đã sao chépCopied