VI | EN
Message us on Messenger
Developer resources

Đơn chưa quyết toán — TikTok Shop API

tiktok.finance.202507.orders.unsettled · call it through Quantri360 with one API key for your own accounts / assets that you connected and authorized — 360 handles request signing and refreshing the authorization you granted.

tiktok.finance.202507.orders.unsettled

GET/finance/202507/orders/unsettledVia 360: GET https://partner.quantri360.com/v1/tiktok/finance/202507/orders/unsettled
Description

Đơn (và khoản điều chỉnh) CHƯA quyết toán kèm số ƯỚC TÍNH: doanh thu, phí / thuế chi tiết, tiền dự kiến về, lý do chưa quyết toán và lịch dự kiến — dùng hiển thị "dự kiến tiền về" ngay khi đơn mới phát sinh.

  • Gọi qua /v1/tiktok/finance/202507/orders/unsettled với Authorization: Bearer <key>; dùng platform_shop_id khi có nhiều shop. 360 tự gắn app_key, shop_cipher, sign và access_token.
  • API chỉ đọc; code = 0 mới là thành công.
  • Mọi số là ƯỚC TÍNH, có thể đổi tới lúc quyết toán — số cuối lấy ở statement_transactions. Giao dịch đã quyết toán KHÔNG còn trả về ở đây.
  • Chỉ có giao dịch tạo từ 2025-01-01. Bộ lọc thời gian theo NGÀY TẠO ĐƠN.
  • Đơn hủy / hoàn trả est_settlement_amount = "0".
  • Phí cấp ĐƠN (không chia theo SKU) — muốn số theo SKU phải tự chia (vd theo giá bán); vn_fix_infrastructure_fee là phí cố định mỗi đơn.
  • sort_field BẮT BUỘC. Lỗi 36009003 "Internal error" thỉnh thoảng xảy ra — thử lại sau 1–2 giây. Giãn ≥ 1 giây giữa các lần gọi.

Request

Endpoint

GET https://partner.quantri360.com/v1/tiktok/finance/202507/orders/unsettled

Authentication & shop

NameInTypeSampleDescription
AuthorizationheaderheaderBearer q360_live_ab12cd34_…Khóa API của brand (tạo ở mục API key). Bắt buộc với mọi request. Brand suy từ key — không truyền mã brand.
platform_shop_idquerystring100001Gian hàng (lấy ở GET /v1/platforms → shops[].platform_shop_id). BẮT BUỘC khi brand có > 1 gian hàng trên nền tảng; 360 bỏ tham số này trước khi chuyển tiếp.

Request parameters

NameInTypeRequiredSampleDescription
sort_fieldquerystringYesorder_create_timeChỉ nhận order_create_time.
sort_orderquerystringNoDESCASC (mặc định) · DESC.
search_time_gequeryintNo1793000000Đơn TẠO từ (Unix giây). Bỏ trống = từ 2025-01-01.
search_time_ltqueryintNo1793300000Đơn tạo trước (Unix giây). Bỏ trống = đến hiện tại.
page_sizequeryintNo1001–100, mặc định 20.
page_tokenquerystringNonext_page_token của trang trước.

Pagination

Lặp khi data.next_page_token khác rỗng, thêm query page_token (giữ nguyên bộ lọc).

Request examples

curl -s "https://partner.quantri360.com/v1/tiktok/finance/202507/orders/unsettled?platform_shop_id=7494000000000000000&sort_field=order_create_time&sort_order=DESC&search_time_ge=1793000000&search_time_lt=1793300000&page_size=100" \
  -H "Authorization: Bearer $KEY"
Python
import requests

KEY = "q360_live_..."  # khóa API của brand
r = requests.get(
    "https://partner.quantri360.com/v1/tiktok/finance/202507/orders/unsettled",
    params={
        "platform_shop_id": "7494000000000000000",
        "sort_field": "order_create_time",
        "sort_order": "DESC",
        "search_time_ge": 1793000000,
        "search_time_lt": 1793300000,
        "page_size": 100
    },
    headers={"Authorization": f"Bearer {KEY}"},
    timeout=60,
)
print(r.status_code)
print(r.json())
Node.js
const KEY = 'q360_live_...'; // khóa API của brand
const url = new URL('https://partner.quantri360.com/v1/tiktok/finance/202507/orders/unsettled');
for (const [k, v] of Object.entries({"platform_shop_id":"7494000000000000000","sort_field":"order_create_time","sort_order":"DESC","search_time_ge":1793000000,"search_time_lt":1793300000,"page_size":100})) url.searchParams.set(k, typeof v === 'object' ? JSON.stringify(v) : String(v));
const r = await fetch(url, {
  method: 'GET',
  headers: { Authorization: `Bearer ${KEY}` },
});
console.log(r.status, await r.json());
PHP
<?php
$key = 'q360_live_...'; // khóa API của brand
$url = 'https://partner.quantri360.com/v1/tiktok/finance/202507/orders/unsettled' . '?' . http_build_query(['platform_shop_id' => '7494000000000000000', 'sort_field' => 'order_create_time', 'sort_order' => 'DESC', 'search_time_ge' => 1793000000, 'search_time_lt' => 1793300000, 'page_size' => 100]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key]);
$res = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, "\n", $res;

Response

Response fields (as returned by TikTok Shop)

NameTypeSampleDescription
codeint00 = thành công; khác 0 xem message (105001–105003 = token, 360 đã tự làm mới một lần).
messagestringSuccessThông điệp của TikTok.
request_idstringDEMO_REQUEST_A_01Mã request TikTok.
dataobjectDữ liệu.
total_countnumber1Tổng giao dịch chưa quyết toán khớp.
next_page_tokenstringTiếp theo trang con trỏ.
sum_est_revenue_amountstring10000Tổng doanh thu ước tính (toàn bộ kết quả, không chỉ trang này).
sum_est_fee_amountstring10000Tổng phí ước tính.
sum_est_adjustment_amountstring10000Tổng ước tính điều chỉnh số tiền.
sum_est_settlement_amountstring10000Tổng tiền dự kiến về.
transactionsobject[]Transactions.
idstring100000000000000001Mã giao dịch.
typestringORDER`ORDER` hoặc loại điều chỉnh (như statement_transactions).
statusstringUNSETTLEDLuôn `UNSETTLED`.
order_idstring100000000000000001Đơn hàng mã.
order_create_timenumber1793491200Unix giây.
order_delivery_timenumber1793491200Unix giây — vắng khi chưa giao.
adjustment_idstring100000000000000001Giao dịch điều chỉnh.
adjustment_order_idstring100000000000000001Điều chỉnh đơn hàng mã.
est_adjustment_amountstring10000Ước tính điều chỉnh số tiền.
unsettled_reasonstringMinh họaLý do chưa quyết toán.
estimated_settlementstringMinh họaLịch dự kiến: chuỗi tương đối (chưa giao) hoặc Unix giây (đã giao).
currencystringVNDTiền tệ.
est_revenue_amountstring10000Doanh thu ước tính.
est_fee_tax_amountstring10000Phí + thuế ước tính (âm).
est_shipping_cost_amountstring10000Ước tính vận chuyển chi phí số tiền.
est_settlement_amountstring10000Tiền dự kiến về.
revenue_breakdownobjectNhư statement_transactions.
cod_service_fee_amountstring10000Cod dịch vụ phí số tiền.
distant_item_fee_amountstring10000Distant item phí số tiền.
refund_cod_service_fee_amountstring10000Hoàn tiền cod dịch vụ phí số tiền.
refund_subtotal_before_discount_amountstring10000Hoàn tiền tạm tính trước giảm giá số tiền.
seller_discount_amountstring10000Người bán giảm giá số tiền.
seller_discount_refund_amountstring10000Người bán giảm giá hoàn tiền số tiền.
subtotal_before_discount_amountstring10000Tạm tính trước giảm giá số tiền.
fee_tax_breakdownobject{fee, tax} — như statement_transactions (giá trị ước tính).
feeobjectPhí.
affiliate_ads_commission_amountstring10000Affiliate quảng cáo hoa hồng số tiền.
affiliate_commission_amountstring10000Affiliate hoa hồng số tiền.
affiliate_commission_before_pit_amountstring10000Affiliate hoa hồng trước pit số tiền.
affiliate_partner_commission_amountstring10000Affiliate partner hoa hồng số tiền.
auto_post_shoppable_video_commission_feestring10000Auto post shoppable video hoa hồng phí.
bonus_cashback_service_fee_amountstring10000Bonus cashback dịch vụ phí số tiền.
buyer_fault_return_shipping_feestring10000Người mua fault return vận chuyển phí.
campaign_period_fee_cfp_amountstring10000Chiến dịch period phí cfp số tiền.
campaign_period_fee_cfp_tax_amountstring10000Chiến dịch period phí cfp thuế số tiền.
campaign_period_fee_sp_amountstring10000Chiến dịch period phí sp số tiền.
campaign_period_fee_sp_tax_amountstring10000Chiến dịch period phí sp thuế số tiền.
cps_shop_ads_commission_tax_amountstring10000Cps gian hàng quảng cáo hoa hồng thuế số tiền.
credit_card_handling_fee_amountstring10000Credit card xử lý phí số tiền.
dynamic_commission_amountstring10000Dynamic hoa hồng số tiền.
failed_delivery_shipping_feestring10000Failed delivery vận chuyển phí.
flash_sales_service_fee_amountstring10000Flash doanh số dịch vụ phí số tiền.
insurance_feestring10000Insurance phí.
live_specials_fee_amountstring10000Live specials phí số tiền.
mall_service_fee_amountstring10000Mall dịch vụ phí số tiền.
new_customer_growth_package_feestring10000New khách hàng growth kiện phí.
pit_withheld_from_ads_commission_amountstring10000Pit withheld from quảng cáo hoa hồng số tiền.
platform_commission_amountstring10000Nền tảng hoa hồng số tiền.
platform_special_service_fee_amountstring10000Nền tảng special dịch vụ phí số tiền.
referral_fee_amountstring10000Referral phí số tiền.
refund_administration_fee_amountstring10000Hoàn tiền administration phí số tiền.
retail_delivery_fee_amountstring10000Retail delivery phí số tiền.
retail_delivery_fee_payment_amountstring10000Retail delivery phí thanh toán số tiền.
retail_delivery_fee_refund_amountstring10000Retail delivery phí hoàn tiền số tiền.
seller_funded_user_spoint_service_feestring10000Người bán funded người dùng spoint dịch vụ phí.
seller_growth_fee_amountstring10000Người bán growth phí số tiền.
sfp_service_fee_amountstring10000Sfp dịch vụ phí số tiền.
shipping_insurance_fee_tax_amountstring10000Vận chuyển insurance phí thuế số tiền.
smart_promotion_fee_amountstring10000Smart khuyến mãi phí số tiền.
store_gmv_growth_package_feestring10000Store gmv growth kiện phí.
target_product_gmv_growth_package_feestring10000Mục tiêu sản phẩm gmv growth kiện phí.
transaction_fee_amountstring10000Giao dịch phí số tiền.
vn_fix_infrastructure_feestring10000Vn fix infrastructure phí.
taxobjectThuế.
auto_post_shoppable_video_sales_taxstringMinh họaAuto post shoppable video doanh số thuế.
cedular_taxstringMinh họaCedular thuế.
customs_clearance_amountstring10000Customs clearance số tiền.
customs_duty_amountstring10000Customs duty số tiền.
gst_amountstring10000Gst số tiền.
import_vat_amountstring10000Import vat số tiền.
new_customer_growth_package_fee_taxstring10000New khách hàng growth kiện phí thuế.
sales_tax_amountstring10000Doanh số thuế số tiền.
sales_tax_payment_amountstring10000Doanh số thuế thanh toán số tiền.
sales_tax_referral_fee_amountstring10000Doanh số thuế referral phí số tiền.
sales_tax_refund_amountstring10000Doanh số thuế hoàn tiền số tiền.
smart_promotion_fee_tax_amountstring10000Smart khuyến mãi phí thuế số tiền.
sst_amountstring10000Sst số tiền.
store_gmv_growth_package_fee_sales_taxstring10000Store gmv growth kiện phí doanh số thuế.
target_product_gmv_growth_package_taxstringMinh họaMục tiêu sản phẩm gmv growth kiện thuế.
vat_amountstring10000Vat số tiền.
shipping_cost_breakdownobjectVận chuyển chi phí phân rã.
actual_shipping_fee_amountstring10000Actual vận chuyển phí số tiền.
customer_paid_shipping_fee_amountstring10000Khách hàng đã trả vận chuyển phí số tiền.
distant_shipping_fee_amountstring10000Distant vận chuyển phí số tiền.
exchange_shipping_fee_amountstring10000Quy đổi vận chuyển phí số tiền.
fbt_key_merchant_subsidystringMinh họaFbt key merchant subsidy.
fbt_overall_merchant_subsidystringMinh họaFbt overall merchant subsidy.
hazmat_handling_feestring10000Hazmat xử lý phí.
hazmat_noncompliance_feestring10000Hazmat noncompliance phí.
international_leg_logistics_amountstring10000International leg logistics số tiền.
logistics_service_feestring10000Logistics dịch vụ phí.
non_standard_dimension_feestring10000Non standard kích thước phí.
non_standard_weight_feestring10000Non standard cân nặng phí.
replacement_shipping_fee_amountstring10000Replacement vận chuyển phí số tiền.
return_shipping_fee_amountstring10000Return vận chuyển phí số tiền.
sfr_reimbursementstringMinh họaSfr reimbursement.
shipping_app_service_fee_amountstring10000Vận chuyển app dịch vụ phí số tiền.
shipping_fee_discount_amountstring10000Vận chuyển phí giảm giá số tiền.
shipping_insurance_fee_amountstring10000Vận chuyển insurance phí số tiền.
signature_confirmation_fee_amountstring10000Signature confirmation phí số tiền.
supplementary_componentobjectBổ sung component.
customer_shipping_fee_offset_amountstring10000Khách hàng vận chuyển phí offset số tiền.
fbm_shipping_cost_amountstring10000Fbm vận chuyển chi phí số tiền.
fbt_fulfillment_fee_amountstring10000Fbt fulfillment phí số tiền.
fbt_shipping_cost_amountstring10000Fbt vận chuyển chi phí số tiền.
platform_shipping_fee_discount_amountstring10000Nền tảng vận chuyển phí giảm giá số tiền.
promo_shipping_incentive_amountstring10000Promo vận chuyển incentive số tiền.
seller_shipping_fee_discount_amountstring10000Người bán vận chuyển phí giảm giá số tiền.
shipping_fee_subsidy_amountstring10000Vận chuyển phí subsidy số tiền.
tiktok_shop_shipping_incentive_amountstring10000Tiktok gian hàng vận chuyển incentive số tiền.

Response sample

{
  "code": 0,
  "message": "Success",
  "request_id": "DEMO_REQUEST_A_01",
  "data": {
    "total_count": 1,
    "next_page_token": "",
    "sum_est_revenue_amount": "10000",
    "sum_est_fee_amount": "10000",
    "sum_est_adjustment_amount": "10000",
    "sum_est_settlement_amount": "10000",
    "transactions": [
      {
        "id": "100000000000000001",
        "type": "ORDER",
        "status": "UNSETTLED",
        "order_id": "100000000000000001",
        "order_create_time": 1793491200,
        "order_delivery_time": 1793491200,
        "adjustment_id": "100000000000000001",
        "adjustment_order_id": "100000000000000001",
        "est_adjustment_amount": "10000",
        "unsettled_reason": "Minh họa",
        "estimated_settlement": "Minh họa",
        "currency": "VND",
        "est_revenue_amount": "10000",
        "est_fee_tax_amount": "10000",
        "est_shipping_cost_amount": "10000",
        "est_settlement_amount": "10000",
        "revenue_breakdown": {
          "cod_service_fee_amount": "10000",
          "distant_item_fee_amount": "10000",
          "refund_cod_service_fee_amount": "10000",
          "refund_subtotal_before_discount_amount": "10000",
          "seller_discount_amount": "10000",
          "seller_discount_refund_amount": "10000",
          "subtotal_before_discount_amount": "10000"
        },
        "fee_tax_breakdown": {
          "fee": {
            "affiliate_ads_commission_amount": "10000",
            "affiliate_commission_amount": "10000",
            "affiliate_commission_before_pit_amount": "10000",
            "affiliate_partner_commission_amount": "10000",
            "auto_post_shoppable_video_commission_fee": "10000",
            "bonus_cashback_service_fee_amount": "10000",
            "buyer_fault_return_shipping_fee": "10000",
            "campaign_period_fee_cfp_amount": "10000",
            "campaign_period_fee_cfp_tax_amount": "10000",
            "campaign_period_fee_sp_amount": "10000",
            "campaign_period_fee_sp_tax_amount": "10000",
            "cps_shop_ads_commission_tax_amount": "10000",
            "credit_card_handling_fee_amount": "10000",
            "dynamic_commission_amount": "10000",
            "failed_delivery_shipping_fee": "10000",
            "flash_sales_service_fee_amount": "10000",
            "insurance_fee": "10000",
            "live_specials_fee_amount": "10000",
            "mall_service_fee_amount": "10000",
            "new_customer_growth_package_fee": "10000",
            "pit_withheld_from_ads_commission_amount": "10000",
            "platform_commission_amount": "10000",
            "platform_special_service_fee_amount": "10000",
            "referral_fee_amount": "10000",
            "refund_administration_fee_amount": "10000",
            "retail_delivery_fee_amount": "10000",
            "retail_delivery_fee_payment_amount": "10000",
            "retail_delivery_fee_refund_amount": "10000",
            "seller_funded_user_spoint_service_fee": "10000",
            "seller_growth_fee_amount": "10000",
            "sfp_service_fee_amount": "10000",
            "shipping_insurance_fee_tax_amount": "10000",
            "smart_promotion_fee_amount": "10000",
            "store_gmv_growth_package_fee": "10000",
            "target_product_gmv_growth_package_fee": "10000",
            "transaction_fee_amount": "10000",
            "vn_fix_infrastructure_fee": "10000"
          },
          "tax": {
            "auto_post_shoppable_video_sales_tax": "Minh họa",
            "cedular_tax": "Minh họa",
            "customs_clearance_amount": "10000",
            "customs_duty_amount": "10000",
            "gst_amount": "10000",
            "import_vat_amount": "10000",
            "new_customer_growth_package_fee_tax": "10000",
            "sales_tax_amount": "10000",
            "sales_tax_payment_amount": "10000",
            "sales_tax_referral_fee_amount": "10000",
            "sales_tax_refund_amount": "10000",
            "smart_promotion_fee_tax_amount": "10000",
            "sst_amount": "10000",
            "store_gmv_growth_package_fee_sales_tax": "10000",
            "target_product_gmv_growth_package_tax": "Minh họa",
            "vat_amount": "10000"
          }
        },
        "shipping_cost_breakdown": {
          "actual_shipping_fee_amount": "10000",
          "customer_paid_shipping_fee_amount": "10000",
          "distant_shipping_fee_amount": "10000",
          "exchange_shipping_fee_amount": "10000",
          "fbt_key_merchant_subsidy": "Minh họa",
          "fbt_overall_merchant_subsidy": "Minh họa",
          "hazmat_handling_fee": "10000",
          "hazmat_noncompliance_fee": "10000",
          "international_leg_logistics_amount": "10000",
          "logistics_service_fee": "10000",
          "non_standard_dimension_fee": "10000",
          "non_standard_weight_fee": "10000",
          "replacement_shipping_fee_amount": "10000",
          "return_shipping_fee_amount": "10000",
          "sfr_reimbursement": "Minh họa",
          "shipping_app_service_fee_amount": "10000",
          "shipping_fee_discount_amount": "10000",
          "shipping_insurance_fee_amount": "10000",
          "signature_confirmation_fee_amount": "10000",
          "supplementary_component": {
            "customer_shipping_fee_offset_amount": "10000",
            "fbm_shipping_cost_amount": "10000",
            "fbt_fulfillment_fee_amount": "10000",
            "fbt_shipping_cost_amount": "10000",
            "platform_shipping_fee_discount_amount": "10000",
            "promo_shipping_incentive_amount": "10000",
            "seller_shipping_fee_discount_amount": "10000",
            "shipping_fee_subsidy_amount": "10000"
          },
          "tiktok_shop_shipping_incentive_amount": "10000"
        }
      }
    ]
  }
}

Get started

  1. Sign up for Partner
  2. Enable a data type of the Tài chính / đối soát group on the platform page
  3. Create an API key (tick the TikTok Shop channel)
  4. Call it as in the examples above