tiktok.finance.202501.orders.order_id.statement_transactions
GET/finance/202501/orders/{order_id}/statement_transactionsGọi qua 360: GET https://partner.quantri360.com/v1/tiktok/finance/202501/orders/{order_id}/statement_transactions
Mô tả API
Quyết toán của MỘT đơn chi tiết tới từng SKU: doanh thu, từng loại phí / thuế, ship, tiền về — và sao kê chứa nó. Dùng để tính lãi lỗ chính xác từng đơn / từng SKU sau khi TikTok quyết toán.
- Gọi qua /v1/tiktok/finance/202501/orders/{order_id}/statement_transactions 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.
- Đơn CHƯA quyết toán vẫn trả
code 0nhưng mọi số = "0",order_create_time = 0,sku_transactions: []— dùng GET /finance/202507/orders/unsettled để xem số ước tính. - Đơn hoàn sau quyết toán có thêm dòng SKU (doanh thu âm, phí dương) ở sao kê sau — cộng các dòng cùng
sku_id. - Bản 202309 tương ứng đã không còn dùng được — dùng 202501.
- Giới hạn tần suất chặt — giãn ≥ 1 giây giữa các lần gọi.
Request
Địa chỉ
GET https://partner.quantri360.com/v1/tiktok/finance/202501/orders/{order_id}/statement_transactions
Xác thực & gian hàng
| Tên | Vị trí | Kiểu | Mẫu | Mô tả |
|---|---|---|---|---|
| Authorization | header | header | Bearer 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_id | query | string | 100001 | Gian 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. |
Tham số request
| Tên | Vị trí | Kiểu | Bắt buộc | Mẫu | Mô tả |
|---|---|---|---|---|---|
| order_id | path | string | Có | 586700000000000001 | Mã đơn TikTok. |
Ví dụ request
curl -s "https://partner.quantri360.com/v1/tiktok/finance/202501/orders/586700000000000001/statement_transactions?platform_shop_id=7494000000000000000" \ -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/202501/orders/586700000000000001/statement_transactions",
params={
"platform_shop_id": "7494000000000000000"
},
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/202501/orders/586700000000000001/statement_transactions');
for (const [k, v] of Object.entries({"platform_shop_id":"7494000000000000000"})) 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/202501/orders/586700000000000001/statement_transactions' . '?' . http_build_query(['platform_shop_id' => '7494000000000000000']); $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
Tham số phản hồi (nguyên của TikTok Shop)
| Tên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| code | int | 0 | 0 = thành công; khác 0 xem message (105001–105003 = token, 360 đã tự làm mới một lần). |
| message | string | Success | Thông điệp của TikTok. |
| request_id | string | DEMO_REQUEST_A_01 | Mã request TikTok. |
| data | object | Dữ liệu. | |
| order_id | string | 100000000000000001 | Đơn hàng mã. |
| order_create_time | number | 1793491200 | Unix giây (`0` khi đơn chưa quyết toán). |
| currency | string | VND | Tiền tệ. |
| revenue_amount | string | 10000 | Doanh thu đơn. |
| fee_and_tax_amount | string | 10000 | Tổng phí + thuế cấp đơn (tên trường cấp đơn là `fee_and_tax_amount`, cấp SKU là `fee_tax_amount`). |
| shipping_cost_amount | string | 10000 | Chi phí vận chuyển. |
| settlement_amount | string | 10000 | Tiền về của đơn. |
| total_count | number | 1 | Số dòng SKU. |
| sku_transactions | object[] | Mỗi SKU (mỗi lần quyết toán) một dòng. | |
| sku_id | string | 100000000000000001 | Sku mã. |
| sku_name | string | Minh họa | Tên phân loại. |
| product_name | string | Minh họa | Tên sản phẩm. |
| quantity | string | Minh họa | Số lượng (CHUỖI). |
| statement_id | string | 100000000000000001 | Sao kê chứa dòng này. |
| settlement_amount | string | 10000 | Quyết toán số tiền. |
| revenue_amount | string | 10000 | Doanh thu số tiền. |
| revenue_breakdown | object | Như statement_transactions. | |
| cod_service_fee_amount | string | 10000 | Cod dịch vụ phí số tiền. |
| distant_item_fee_amount | string | 10000 | Distant item phí số tiền. |
| refund_cod_service_fee_amount | string | 10000 | Hoàn tiền cod dịch vụ phí số tiền. |
| refund_subtotal_before_discount_amount | string | 10000 | Hoàn tiền tạm tính trước giảm giá số tiền. |
| seller_discount_amount | string | 10000 | Người bán giảm giá số tiền. |
| seller_discount_refund_amount | string | 10000 | Người bán giảm giá hoàn tiền số tiền. |
| subtotal_before_discount_amount | string | 10000 | Tạm tính trước giảm giá số tiền. |
| fee_tax_amount | string | 10000 | Phí thuế số tiền. |
| fee_tax_breakdown | object | {fee, tax} — như statement_transactions. | |
| fee | object | Phí. | |
| affiliate_ads_commission_amount | string | 10000 | Affiliate quảng cáo hoa hồng số tiền. |
| affiliate_commission_amount | string | 10000 | Affiliate hoa hồng số tiền. |
| affiliate_commission_amount_before_pit | string | 10000 | Affiliate hoa hồng số tiền trước pit. |
| affiliate_commission_deposit | string | Minh họa | Affiliate hoa hồng deposit. |
| affiliate_commission_release | string | Minh họa | Affiliate hoa hồng release. |
| affiliate_partner_commission_amount | string | 10000 | Affiliate partner hoa hồng số tiền. |
| auto_post_shoppable_video_commission_fee | string | 10000 | Auto post shoppable video hoa hồng phí. |
| bonus_cashback_service_fee_amount | string | 10000 | Bonus cashback dịch vụ phí số tiền. |
| brand_amplification_program_commission | string | Minh họa | Brand amplification program hoa hồng. |
| brand_amplification_program_fee_tax | string | 10000 | Brand amplification program phí thuế. |
| brand_campaign_fee | string | 10000 | Brand chiến dịch phí. |
| brand_campaign_fee_tax | string | 10000 | Brand chiến dịch phí thuế. |
| buyer_fault_return_shipping_fee | string | 10000 | Người mua fault return vận chuyển phí. |
| campaign_period_fee_cfp_amount | string | 10000 | Chiến dịch period phí cfp số tiền. |
| campaign_period_fee_cfp_tax_amount | string | 10000 | Chiến dịch period phí cfp thuế số tiền. |
| campaign_period_fee_sp_amount | string | 10000 | Chiến dịch period phí sp số tiền. |
| campaign_period_fee_sp_tax_amount | string | 10000 | Chiến dịch period phí sp thuế số tiền. |
| category_led_campaign_fee_amount | string | 10000 | Category led chiến dịch phí số tiền. |
| category_led_campaign_fee_tax_amount | string | 10000 | Category led chiến dịch phí thuế số tiền. |
| cofunded_creator_bonus_amount | string | 10000 | Cofunded creator bonus số tiền. |
| cofunded_promotion_service_fee_amount | string | 10000 | Cofunded khuyến mãi dịch vụ phí số tiền. |
| cps_shop_ads_commission_tax_amount | string | 10000 | Cps gian hàng quảng cáo hoa hồng thuế số tiền. |
| credit_card_handling_fee_amount | string | 10000 | Credit card xử lý phí số tiền. |
| dt_handling_fee_amount | string | 10000 | Dt xử lý phí số tiền. |
| dynamic_commission_amount | string | 10000 | Dynamic hoa hồng số tiền. |
| epr_pob_service_fee_amount | string | 10000 | Epr pob dịch vụ phí số tiền. |
| external_affiliate_marketing_fee_amount | string | 10000 | External affiliate marketing phí số tiền. |
| failed_delivery_shipping_fee | string | 10000 | Failed delivery vận chuyển phí. |
| fee_per_item_sold_amount | string | 10000 | Phí mỗi item sold số tiền. |
| flash_sales_service_fee_amount | string | 10000 | Flash doanh số dịch vụ phí số tiền. |
| gmv_max_ad_fee_amount | string | 10000 | Gmv max ad phí số tiền. |
| gmv_max_coupon_fee | string | 10000 | Gmv max coupon phí. |
| installation_service_fee | string | 10000 | Installation dịch vụ phí. |
| insurance_fee | string | 10000 | Insurance phí. |
| live_specials_fee_amount | string | 10000 | Live specials phí số tiền. |
| mall_service_fee_amount | string | 10000 | Mall dịch vụ phí số tiền. |
| new_customer_growth_package_fee | string | 10000 | New khách hàng growth kiện phí. |
| platform_commission_amount | string | 10000 | Nền tảng hoa hồng số tiền. |
| platform_semi_managed_commission_fee | string | 10000 | Nền tảng semi managed hoa hồng phí. |
| platform_semi_managed_commission_fee_tax | string | 10000 | Nền tảng semi managed hoa hồng phí thuế. |
| platform_special_service_fee_amount | string | 10000 | Nền tảng special dịch vụ phí số tiền. |
| pre_order_service_fee_amount | string | 10000 | Pre đơn hàng dịch vụ phí số tiền. |
| referral_fee_amount | string | 10000 | Referral phí số tiền. |
| refund_administration_fee_amount | string | 10000 | Hoàn tiền administration phí số tiền. |
| seller_funded_user_spoint_service_fee | string | 10000 | Người bán funded người dùng spoint dịch vụ phí. |
| seller_growth_fee_amount | string | 10000 | Người bán growth phí số tiền. |
| seller_paylater_handling_fee_amount | string | 10000 | Người bán paylater xử lý phí số tiền. |
| sfp_service_fee_amount | string | 10000 | Sfp dịch vụ phí số tiền. |
| shipping_fee_guarantee_service_fee | string | 10000 | Vận chuyển phí guarantee dịch vụ phí. |
| shipping_insurance_fee_tax_amount | string | 10000 | Vận chuyển insurance phí thuế số tiền. |
| smart_promotion_fee_amount | string | 10000 | Smart khuyến mãi phí số tiền. |
| store_gmv_growth_package_fee | string | 10000 | Store gmv growth kiện phí. |
| tap_shop_ads_commission | string | Minh họa | Tap gian hàng quảng cáo hoa hồng. |
| target_product_gmv_growth_package_fee | string | 10000 | Mục tiêu sản phẩm gmv growth kiện phí. |
| transaction_fee_amount | string | 10000 | Giao dịch phí số tiền. |
| tsp_commission_amount | string | 10000 | Tsp hoa hồng số tiền. |
| vn_fix_infrastructure_fee | string | 10000 | Vn fix infrastructure phí. |
| voucher_xtra_service_fee_amount | string | 10000 | Voucher xtra dịch vụ phí số tiền. |
| tax | object | Thuế. | |
| anti_dumping_duty_amount | string | 10000 | Anti dumping duty số tiền. |
| article_22_income_tax_withheld | string | Minh họa | Article 22 income thuế withheld. |
| auto_post_shoppable_video_sales_tax | string | Minh họa | Auto post shoppable video doanh số thuế. |
| cedular_tax | string | Minh họa | Cedular thuế. |
| customs_clearance_amount | string | 10000 | Customs clearance số tiền. |
| customs_duty_amount | string | 10000 | Customs duty số tiền. |
| gst_amount | string | 10000 | Gst số tiền. |
| import_vat_amount | string | 10000 | Import vat số tiền. |
| isr_amount | string | 10000 | Isr số tiền. |
| iva_amount | string | 10000 | Iva số tiền. |
| new_customer_growth_package_fee_tax | string | 10000 | New khách hàng growth kiện phí thuế. |
| pit_amount | string | 10000 | Pit số tiền. |
| sales_tax_referral_fee_amount | string | 10000 | Doanh số thuế referral phí số tiền. |
| smart_promotion_fee_tax_amount | string | 10000 | Smart khuyến mãi phí thuế số tiền. |
| sst_amount | string | 10000 | Sst số tiền. |
| store_gmv_growth_package_fee_sales_tax | string | 10000 | Store gmv growth kiện phí doanh số thuế. |
| target_product_gmv_growth_package_tax | string | Minh họa | Mục tiêu sản phẩm gmv growth kiện thuế. |
| vat_amount | string | 10000 | Vat số tiền. |
| shipping_cost_amount | string | 10000 | Vận chuyển chi phí số tiền. |
| shipping_cost_breakdown | object | Vận chuyển chi phí phân rã. | |
| actual_shipping_fee_amount | string | 10000 | Actual vận chuyển phí số tiền. |
| customer_paid_shipping_fee_amount | string | 10000 | Khách hàng đã trả vận chuyển phí số tiền. |
| distant_shipping_fee_amount | string | 10000 | Distant vận chuyển phí số tiền. |
| exchange_shipping_fee_amount | string | 10000 | Quy đổi vận chuyển phí số tiền. |
| failed_delivery_subsidy_amount | string | 10000 | Failed delivery subsidy số tiền. |
| fbt_free_shipping_fee_amount | string | 10000 | Fbt free vận chuyển phí số tiền. |
| fbt_fulfillment_fee_reimbursement_amount | string | 10000 | Fbt fulfillment phí reimbursement số tiền. |
| fbt_key_merchant_subsidy | string | Minh họa | Fbt key merchant subsidy. |
| fbt_overall_merchant_subsidy | string | Minh họa | Fbt overall merchant subsidy. |
| free_return_subsidy_amount | string | 10000 | Free return subsidy số tiền. |
| hazmat_handling_fee | string | 10000 | Hazmat xử lý phí. |
| hazmat_noncompliance_fee | string | 10000 | Hazmat noncompliance phí. |
| international_leg_logistics_amount | string | 10000 | International leg logistics số tiền. |
| logistics_service_fee | string | 10000 | Logistics dịch vụ phí. |
| non_standard_dimension_fee | string | 10000 | Non standard kích thước phí. |
| non_standard_weight_fee | string | 10000 | Non standard cân nặng phí. |
| replacement_shipping_fee_amount | string | 10000 | Replacement vận chuyển phí số tiền. |
| return_shipping_fee_amount | string | 10000 | Return vận chuyển phí số tiền. |
| return_shipping_fee_paid_buyer_amount | string | 10000 | Return vận chuyển phí đã trả người mua số tiền. |
| return_shipping_label_fee_amount | string | 10000 | Return vận chuyển label phí số tiền. |
| seller_self_shipping_service_fee_amount | string | 10000 | Người bán self vận chuyển dịch vụ phí số tiền. |
| shipping_app_service_fee_amount | string | 10000 | Vận chuyển app dịch vụ phí số tiền. |
| shipping_fee_discount_amount | string | 10000 | Vận chuyển phí giảm giá số tiền. |
| shipping_insurance_fee_amount | string | 10000 | Vận chuyển insurance phí số tiền. |
| signature_confirmation_fee_amount | string | 10000 | Signature confirmation phí số tiền. |
| supplementary_component | object | Bổ sung component. | |
| customer_shipping_fee_offset_amount | string | 10000 | Khách hàng vận chuyển phí offset số tiền. |
| fbm_shipping_cost_amount | string | 10000 | Fbm vận chuyển chi phí số tiền. |
| fbt_fulfillment_fee_amount | string | 10000 | Fbt fulfillment phí số tiền. |
| fbt_shipping_cost_amount | string | 10000 | Fbt vận chuyển chi phí số tiền. |
| platform_shipping_fee_discount_amount | string | 10000 | Nền tảng vận chuyển phí giảm giá số tiền. |
| promo_shipping_incentive_amount | string | 10000 | Promo vận chuyển incentive số tiền. |
| refunded_customer_shipping_fee_amount | string | 10000 | Refunded khách hàng vận chuyển phí số tiền. |
| return_refund_subsidy_amount | string | 10000 | Return hoàn tiền subsidy số tiền. |
| seller_shipping_fee_discount_amount | string | 10000 | Người bán vận chuyển phí giảm giá số tiền. |
| shipping_fee_guarantee_reimbursement | string | 10000 | Vận chuyển phí guarantee reimbursement. |
| shipping_fee_subsidy_amount | string | 10000 | Vận chuyển phí subsidy số tiền. |
| tiktok_shop_shipping_incentive_amount | string | 10000 | Tiktok gian hàng vận chuyển incentive số tiền. |
| supplementary_component | object | {} | Số tham khảo. |
Mẫu phản hồi
{
"code": 0,
"message": "Success",
"request_id": "DEMO_REQUEST_A_01",
"data": {
"order_id": "100000000000000001",
"order_create_time": 1793491200,
"currency": "VND",
"revenue_amount": "10000",
"fee_and_tax_amount": "10000",
"shipping_cost_amount": "10000",
"settlement_amount": "10000",
"total_count": 1,
"sku_transactions": [
{
"sku_id": "100000000000000001",
"sku_name": "Minh họa",
"product_name": "Minh họa",
"quantity": "Minh họa",
"statement_id": "100000000000000001",
"settlement_amount": "10000",
"revenue_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_amount": "10000",
"fee_tax_breakdown": {
"fee": {
"affiliate_ads_commission_amount": "10000",
"affiliate_commission_amount": "10000",
"affiliate_commission_amount_before_pit": "10000",
"affiliate_commission_deposit": "Minh họa",
"affiliate_commission_release": "Minh họa",
"affiliate_partner_commission_amount": "10000",
"auto_post_shoppable_video_commission_fee": "10000",
"bonus_cashback_service_fee_amount": "10000",
"brand_amplification_program_commission": "Minh họa",
"brand_amplification_program_fee_tax": "10000",
"brand_campaign_fee": "10000",
"brand_campaign_fee_tax": "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",
"category_led_campaign_fee_amount": "10000",
"category_led_campaign_fee_tax_amount": "10000",
"cofunded_creator_bonus_amount": "10000",
"cofunded_promotion_service_fee_amount": "10000",
"cps_shop_ads_commission_tax_amount": "10000",
"credit_card_handling_fee_amount": "10000",
"dt_handling_fee_amount": "10000",
"dynamic_commission_amount": "10000",
"epr_pob_service_fee_amount": "10000",
"external_affiliate_marketing_fee_amount": "10000",
"failed_delivery_shipping_fee": "10000",
"fee_per_item_sold_amount": "10000",
"flash_sales_service_fee_amount": "10000",
"gmv_max_ad_fee_amount": "10000",
"gmv_max_coupon_fee": "10000",
"installation_service_fee": "10000",
"insurance_fee": "10000",
"live_specials_fee_amount": "10000",
"mall_service_fee_amount": "10000",
"new_customer_growth_package_fee": "10000",
"platform_commission_amount": "10000",
"platform_semi_managed_commission_fee": "10000",
"platform_semi_managed_commission_fee_tax": "10000",
"platform_special_service_fee_amount": "10000",
"pre_order_service_fee_amount": "10000",
"referral_fee_amount": "10000",
"refund_administration_fee_amount": "10000",
"seller_funded_user_spoint_service_fee": "10000",
"seller_growth_fee_amount": "10000",
"seller_paylater_handling_fee_amount": "10000",
"sfp_service_fee_amount": "10000",
"shipping_fee_guarantee_service_fee": "10000",
"shipping_insurance_fee_tax_amount": "10000",
"smart_promotion_fee_amount": "10000",
"store_gmv_growth_package_fee": "10000",
"tap_shop_ads_commission": "Minh họa",
"target_product_gmv_growth_package_fee": "10000",
"transaction_fee_amount": "10000",
"tsp_commission_amount": "10000",
"vn_fix_infrastructure_fee": "10000",
"voucher_xtra_service_fee_amount": "10000"
},
"tax": {
"anti_dumping_duty_amount": "10000",
"article_22_income_tax_withheld": "Minh họa",
"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",
"isr_amount": "10000",
"iva_amount": "10000",
"new_customer_growth_package_fee_tax": "10000",
"pit_amount": "10000",
"sales_tax_referral_fee_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_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",
"failed_delivery_subsidy_amount": "10000",
"fbt_free_shipping_fee_amount": "10000",
"fbt_fulfillment_fee_reimbursement_amount": "10000",
"fbt_key_merchant_subsidy": "Minh họa",
"fbt_overall_merchant_subsidy": "Minh họa",
"free_return_subsidy_amount": "10000",
"hazmat_handling_fee": "10000",
"hazmat_noncompliance_fee": "10000",
"international_leg_logistics_amount": "10000",
"logistics_service_fee": "10000",
"non_standard_dimens
Bắt đầu dùng
- Đăng ký tài khoản Partner
- Mở loại dữ liệu thuộc nhóm Tài chính / đối soát ở trang nền tảng
- Tạo API key (tick kênh TikTok Shop)
- Gọi theo ví dụ ở trên