@rangka-os/create 0.5.0-alpha.27 → 0.5.0-alpha.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/package.json +1 -1
  2. package/template/base/apps/absen_karyawan/app.rk +37 -0
  3. package/template/base/apps/absen_karyawan/dashboards/absen_hari_ini.rk +20 -0
  4. package/template/base/apps/absen_karyawan/dashboards/absen_karyawan_saya.rk +14 -0
  5. package/template/base/apps/absen_karyawan/dashboards/rekap_absen_karyawan.rk +12 -0
  6. package/template/base/apps/jasa_proyek/app.rk +4 -1
  7. package/template/base/apps/kasir/app.rk +5 -1
  8. package/template/base/apps/kasir/dashboards/kasir_ringkas.rk +4 -0
  9. package/template/base/apps/kasir/skills/rangka-app-kasir/SKILL.md +20 -0
  10. package/template/base/apps/pembukuan/app.rk +3 -0
  11. package/template/base/connectors/midtrans/connector.rk +249 -0
  12. package/template/base/connectors/midtrans/fixtures/charge_gopay.json +34 -0
  13. package/template/base/connectors/midtrans/fixtures/charge_qris.json +23 -0
  14. package/template/base/connectors/midtrans/fixtures/charge_va.json +20 -0
  15. package/template/base/connectors/midtrans/fixtures/create_snap.json +4 -0
  16. package/template/base/connectors/midtrans/fixtures/expect.json +88 -0
  17. package/template/base/connectors/midtrans/fixtures/get_status.json +15 -0
  18. package/template/base/connectors/midtrans/fixtures/payment_notified.json +28 -0
  19. package/template/base/connectors/midtrans/fixtures/payment_notified_challenge.json +24 -0
  20. package/template/base/connectors/midtrans/fixtures/payment_notified_expire.json +24 -0
  21. package/template/base/connectors/midtrans/fixtures/payment_notified_other_amount.json +28 -0
  22. package/template/base/connectors/midtrans/fixtures/payment_notified_partial_refund.json +34 -0
  23. package/template/base/connectors/midtrans/fixtures/payment_notified_pending.json +31 -0
  24. package/template/base/connectors/midtrans/fixtures/payment_notified_refund.json +34 -0
  25. package/template/base/connectors/midtrans/fixtures/payment_notified_relabelled.json +28 -0
  26. package/template/base/connectors/midtrans/fixtures/payment_notified_va.json +32 -0
  27. package/template/base/connectors/midtrans/fixtures/signature_vector.txt +3 -0
  28. package/template/base/connectors/midtrans/mock/midtrans_mock.py +335 -0
  29. package/template/base/connectors/rangka_whatsapp/README.md +105 -0
  30. package/template/base/connectors/rangka_whatsapp/connector.rk +141 -0
  31. package/template/base/connectors/rangka_whatsapp/fixtures/expect.json +9 -0
  32. package/template/base/connectors/rangka_whatsapp/fixtures/message_received.json +1 -0
  33. package/template/base/connectors/rangka_whatsapp/fixtures/message_status.json +1 -0
  34. package/template/base/connectors/rangka_whatsapp/fixtures/message_status_refused.json +1 -0
  35. package/template/base/connectors/rangka_whatsapp/fixtures/opted_out.json +1 -0
  36. package/template/base/connectors/rangka_whatsapp/fixtures/send_template.json +1 -0
  37. package/template/base/connectors/rangka_whatsapp/fixtures/send_template_duplicate.json +1 -0
  38. package/template/base/connectors/rangka_whatsapp/fixtures/set_opt_out.json +1 -0
  39. package/template/base/connectors/rangka_whatsapp/mock/rangka_whatsapp_mock.py +354 -0
  40. package/template/base/connectors/shopee/connector.rk +360 -0
  41. package/template/base/connectors/shopee/fixtures/expect.json +119 -0
  42. package/template/base/connectors/shopee/fixtures/get_models.json +52 -0
  43. package/template/base/connectors/shopee/fixtures/get_order_detail.json +396 -0
  44. package/template/base/connectors/shopee/fixtures/get_settlement.json +90 -0
  45. package/template/base/connectors/shopee/fixtures/get_tracking.json +13 -0
  46. package/template/base/connectors/shopee/fixtures/list_items.json +29 -0
  47. package/template/base/connectors/shopee/fixtures/list_orders.json +31 -0
  48. package/template/base/connectors/shopee/fixtures/list_settlements.json +15 -0
  49. package/template/base/connectors/shopee/fixtures/order_changed.json +101 -0
  50. package/template/base/connectors/shopee/fixtures/order_changed_cancelled.json +72 -0
  51. package/template/base/connectors/shopee/fixtures/order_changed_completed.json +101 -0
  52. package/template/base/connectors/shopee/fixtures/order_changed_in_cancel.json +72 -0
  53. package/template/base/connectors/shopee/fixtures/order_changed_unpaid.json +71 -0
  54. package/template/base/connectors/shopee/fixtures/order_settled.json +92 -0
  55. package/template/base/connectors/shopee/fixtures/push_received.json +12 -0
  56. package/template/base/connectors/shopee/fixtures/push_received_tracking.json +11 -0
  57. package/template/base/connectors/shopee/fixtures/update_stock.json +15 -0
  58. package/template/base/connectors/shopee/mock/shopee_mock.py +894 -0
  59. package/template/base/connectors/tiktok_shop/connector.rk +300 -0
  60. package/template/base/connectors/tiktok_shop/fixtures/expect.json +105 -0
  61. package/template/base/connectors/tiktok_shop/fixtures/get_order_detail.json +136 -0
  62. package/template/base/connectors/tiktok_shop/fixtures/get_settlement.json +83 -0
  63. package/template/base/connectors/tiktok_shop/fixtures/get_tracking.json +28 -0
  64. package/template/base/connectors/tiktok_shop/fixtures/list_orders.json +242 -0
  65. package/template/base/connectors/tiktok_shop/fixtures/list_products.json +77 -0
  66. package/template/base/connectors/tiktok_shop/fixtures/list_settlements.json +22 -0
  67. package/template/base/connectors/tiktok_shop/fixtures/list_shops.json +17 -0
  68. package/template/base/connectors/tiktok_shop/fixtures/order_changed.json +129 -0
  69. package/template/base/connectors/tiktok_shop/fixtures/order_changed_cancelled.json +81 -0
  70. package/template/base/connectors/tiktok_shop/fixtures/order_changed_completed.json +106 -0
  71. package/template/base/connectors/tiktok_shop/fixtures/order_changed_on_hold.json +104 -0
  72. package/template/base/connectors/tiktok_shop/fixtures/order_changed_tokopedia.json +106 -0
  73. package/template/base/connectors/tiktok_shop/fixtures/order_changed_unpaid.json +79 -0
  74. package/template/base/connectors/tiktok_shop/fixtures/order_settled.json +73 -0
  75. package/template/base/connectors/tiktok_shop/fixtures/update_stock.json +6 -0
  76. package/template/base/connectors/tiktok_shop/fixtures/webhook_received.json +12 -0
  77. package/template/base/connectors/tiktok_shop/fixtures/webhook_received_cancellation.json +13 -0
  78. package/template/base/connectors/tiktok_shop/mock/tiktok_shop_mock.py +819 -0
  79. package/template/base/connectors/whatsapp_business/connector.rk +3 -1
  80. package/template/base/connectors/whatsapp_business/templates.md +13 -1
  81. package/template/base/modules/accounting/flows/gl_asset_disposal_post.rk +68 -0
  82. package/template/base/modules/accounting/flows/gl_asset_disposal_reverse.rk +194 -0
  83. package/template/base/modules/accounting/flows/gl_depreciation_run_post.rk +43 -0
  84. package/template/base/modules/accounting/flows/gl_depreciation_run_reverse.rk +36 -0
  85. package/template/base/modules/accounting/flows/gl_fixed_asset_post.rk +51 -0
  86. package/template/base/modules/accounting/flows/gl_fixed_asset_reverse.rk +194 -0
  87. package/template/base/modules/accounting/flows/gl_vendor_bill_post.rk +2 -2
  88. package/template/base/modules/accounting/models/gl_entry.rk +2 -0
  89. package/template/base/modules/accounting/module.rk +2 -2
  90. package/template/base/modules/attendance/flows/attendance_missing_digest.rk +30 -0
  91. package/template/base/modules/attendance/flows/attendance_period_on_cancel.rk +15 -0
  92. package/template/base/modules/attendance/flows/attendance_period_on_submit.rk +60 -0
  93. package/template/base/modules/attendance/flows/staff_attendance_cancel_guard.rk +14 -0
  94. package/template/base/modules/attendance/flows/staff_attendance_guard_created.rk +16 -0
  95. package/template/base/modules/attendance/flows/staff_attendance_guard_submitted.rk +37 -0
  96. package/template/base/modules/attendance/flows/staff_attendance_guard_updated.rk +14 -0
  97. package/template/base/modules/attendance/models/attendance_period.rk +62 -0
  98. package/template/base/modules/attendance/models/attendance_summary.rk +37 -0
  99. package/template/base/modules/attendance/models/staff_attendance.rk +281 -0
  100. package/template/base/modules/attendance/models/staff_attendance_guard.rk +50 -0
  101. package/template/base/modules/attendance/module.rk +18 -0
  102. package/template/base/modules/attendance/screens/absen_outlet.rk +22 -0
  103. package/template/base/modules/catalogue/models/item.rk +69 -0
  104. package/template/base/modules/catalogue/module.rk +1 -1
  105. package/template/base/modules/contacts/models/customer.rk +43 -19
  106. package/template/base/modules/contacts/module.rk +1 -1
  107. package/template/base/modules/coretax/module.rk +1 -1
  108. package/template/base/modules/coretax/print/coretax_faktur.rk +3 -2
  109. package/template/base/modules/coretax/print/coretax_faktur.xml +3 -1
  110. package/template/base/modules/coretax/print/rekap_ppn.html +9 -7
  111. package/template/base/modules/courses/flows/charge_invoice_on_submit.rk +15 -0
  112. package/template/base/modules/courses/module.rk +1 -1
  113. package/template/base/modules/courses/screens/absen_kelas.rk +1 -0
  114. package/template/base/modules/fixed_assets/flows/asset_disposal_on_cancel.rk +14 -0
  115. package/template/base/modules/fixed_assets/flows/asset_disposal_on_submit.rk +21 -0
  116. package/template/base/modules/fixed_assets/flows/asset_from_vendor_bill.rk +41 -0
  117. package/template/base/modules/fixed_assets/flows/depreciation_run_fill.rk +28 -0
  118. package/template/base/modules/fixed_assets/flows/depreciation_run_monthly.rk +36 -0
  119. package/template/base/modules/fixed_assets/flows/depreciation_run_on_cancel.rk +30 -0
  120. package/template/base/modules/fixed_assets/flows/depreciation_run_on_submit.rk +34 -0
  121. package/template/base/modules/fixed_assets/flows/fixed_asset_on_cancel.rk +24 -0
  122. package/template/base/modules/fixed_assets/flows/fixed_asset_on_submit.rk +69 -0
  123. package/template/base/modules/fixed_assets/flows/fixed_assets_setup.rk +29 -0
  124. package/template/base/modules/fixed_assets/flows/opening_balance_asset_guard.rk +15 -0
  125. package/template/base/modules/fixed_assets/flows/vendor_bill_asset_guard.rk +14 -0
  126. package/template/base/modules/fixed_assets/imports/asset_list.rk +22 -0
  127. package/template/base/modules/fixed_assets/models/asset_bill_line.rk +24 -0
  128. package/template/base/modules/fixed_assets/models/asset_book.rk +83 -0
  129. package/template/base/modules/fixed_assets/models/asset_category.rk +54 -0
  130. package/template/base/modules/fixed_assets/models/asset_disposal.rk +97 -0
  131. package/template/base/modules/fixed_assets/models/asset_guard.rk +90 -0
  132. package/template/base/modules/fixed_assets/models/depreciation_line.rk +13 -0
  133. package/template/base/modules/fixed_assets/models/depreciation_run.rk +65 -0
  134. package/template/base/modules/fixed_assets/models/fixed_asset.rk +165 -0
  135. package/template/base/modules/fixed_assets/models/fixed_asset_setting.rk +34 -0
  136. package/template/base/modules/fixed_assets/module.rk +30 -0
  137. package/template/base/modules/fixed_assets/print/fixed_asset_register.html +45 -0
  138. package/template/base/modules/fixed_assets/print/fixed_asset_register.rk +17 -0
  139. package/template/base/modules/invoicing/flows/invoice_due_digest.rk +45 -7
  140. package/template/base/modules/invoicing/models/sales_invoice_item.rk +4 -1
  141. package/template/base/modules/invoicing/module.rk +15 -2
  142. package/template/base/modules/kitchen/screens/dapur.rk +1 -0
  143. package/template/base/modules/outlets/models/outlet.rk +69 -0
  144. package/template/base/modules/outlets/module.rk +1 -1
  145. package/template/base/modules/payments/flows/payment_from_midtrans.rk +85 -0
  146. package/template/base/modules/payments/flows/payment_refund_from_midtrans.rk +22 -0
  147. package/template/base/modules/payments/models/payment.rk +2 -1
  148. package/template/base/modules/payments/module.rk +1 -1
  149. package/template/base/modules/payroll/flows/payroll_close_on_cancel.rk +8 -5
  150. package/template/base/modules/payroll/flows/payroll_close_on_submit.rk +8 -5
  151. package/template/base/modules/payroll/flows/payroll_reminder.rk +106 -0
  152. package/template/base/modules/payroll/flows/payroll_run_overlap_guard_created.rk +5 -3
  153. package/template/base/modules/payroll/flows/payroll_run_overlap_guard_updated.rk +5 -3
  154. package/template/base/modules/payroll/flows/payslip_from_recap.rk +1 -1
  155. package/template/base/modules/payroll/imports/payroll_profile_list.rk +27 -0
  156. package/template/base/modules/payroll/models/payroll_close.rk +10 -6
  157. package/template/base/modules/payroll/models/payroll_run.rk +64 -15
  158. package/template/base/modules/payroll/models/payslip.rk +48 -9
  159. package/template/base/modules/payroll/module.rk +22 -5
  160. package/template/base/modules/payroll/print/payslip.html +4 -1
  161. package/template/base/modules/pos/models/pos_sale.rk +136 -9
  162. package/template/base/modules/pos/models/pos_sale_item.rk +33 -1
  163. package/template/base/modules/pos/module.rk +5 -3
  164. package/template/base/modules/pos/print/pos_receipt.html +7 -3
  165. package/template/base/modules/pos/screens/kasir.rk +7 -2
  166. package/template/base/modules/procurement/flows/reorder_draft_po.rk +57 -0
  167. package/template/base/modules/procurement/models/vendor_bill.rk +21 -2
  168. package/template/base/modules/procurement/module.rk +11 -2
  169. package/template/base/modules/projects/screens/absen.rk +1 -0
  170. package/template/base/modules/promotions/flows/promo_code_batch_on_submit.rk +26 -0
  171. package/template/base/modules/promotions/flows/promotion_apply.rk +110 -0
  172. package/template/base/modules/promotions/flows/promotion_apply_on_create.rk +110 -0
  173. package/template/base/modules/promotions/flows/promotion_apply_on_delete.rk +111 -0
  174. package/template/base/modules/promotions/flows/promotion_apply_on_update.rk +110 -0
  175. package/template/base/modules/promotions/flows/promotion_on_sale.rk +95 -0
  176. package/template/base/modules/promotions/flows/promotion_on_sale_cancel.rk +43 -0
  177. package/template/base/modules/promotions/models/promo_code.rk +27 -0
  178. package/template/base/modules/promotions/models/promo_code_batch.rk +36 -0
  179. package/template/base/modules/promotions/models/promo_guard.rk +44 -0
  180. package/template/base/modules/promotions/models/promotion.rk +197 -0
  181. package/template/base/modules/promotions/models/promotion_ledger.rk +35 -0
  182. package/template/base/modules/promotions/module.rk +20 -0
  183. package/template/base/modules/rental/models/rental_unit.rk +13 -3
  184. package/template/base/modules/rental/module.rk +2 -2
  185. package/template/base/modules/rental/screens/alat_keluar.rk +1 -0
  186. package/template/base/modules/rental/screens/alat_kembali.rk +1 -0
  187. package/template/base/modules/rental/screens/jadwal_alat.rk +1 -0
  188. package/template/base/modules/stock/flows/stock_low_alert.rk +65 -0
  189. package/template/base/modules/stock/flows/stock_negative_alert.rk +14 -5
  190. package/template/base/modules/stock/models/stock_reorder.rk +34 -0
  191. package/template/base/modules/stock/module.rk +17 -2
  192. package/template/base/modules/subscriptions/screens/catat_tagih.rk +1 -0
  193. package/template/base/modules/subscriptions/screens/rute_tagih.rk +1 -0
  194. package/template/base/modules/users/flows/summary_daily.rk +83 -0
  195. package/template/base/modules/users/flows/summary_monthly.rk +83 -0
  196. package/template/base/modules/users/flows/summary_weekly.rk +83 -0
  197. package/template/base/modules/users/models/business_summary.rk +67 -0
  198. package/template/base/modules/users/models/summary_setting.rk +35 -0
  199. package/template/base/modules/users/models/user.rk +11 -3
  200. package/template/base/modules/users/module.rk +21 -2
  201. package/template/base/modules/users/roles/employee.rk +8 -0
  202. package/template/base/modules/users/roles/outlet_supervisor.rk +7 -0
  203. package/template/base/modules/whatsapp/flows/whatsapp_customer_opt_out.rk +16 -0
  204. package/template/base/modules/whatsapp/flows/whatsapp_customer_opt_out_new.rk +17 -0
  205. package/template/base/modules/whatsapp/flows/whatsapp_message_status.rk +24 -0
  206. package/template/base/modules/whatsapp/flows/whatsapp_opted_out.rk +26 -0
  207. package/template/base/modules/whatsapp/models/whatsapp_message.rk +99 -0
  208. package/template/base/modules/whatsapp/models/whatsapp_opt_out.rk +44 -0
  209. package/template/base/modules/whatsapp/module.rk +23 -0
  210. package/template/base/modules/whatsapp_booking/flows/whatsapp_booking_tomorrow.rk +48 -0
  211. package/template/base/modules/whatsapp_booking/module.rk +13 -0
  212. package/template/base/modules/whatsapp_order_ready/flows/whatsapp_pickup_on_sale.rk +19 -0
  213. package/template/base/modules/whatsapp_order_ready/flows/whatsapp_ticket_ready.rk +40 -0
  214. package/template/base/modules/whatsapp_order_ready/models/whatsapp_pickup.rk +22 -0
  215. package/template/base/modules/whatsapp_order_ready/module.rk +14 -0
  216. package/template/base/modules/whatsapp_receipt/flows/whatsapp_receipt_on_sale.rk +43 -0
  217. package/template/base/modules/whatsapp_receipt/module.rk +13 -0
  218. package/template/base/modules/whatsapp_reminder/flows/whatsapp_invoice_overdue.rk +64 -0
  219. package/template/base/modules/whatsapp_reminder/module.rk +15 -0
  220. package/template/base/modules/workforce/imports/worker_list.rk +4 -1
@@ -0,0 +1,300 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/connector.json
2
+ # TikTok Shop and Tokopedia (Indonesia) through the TikTok Shop Partner API: orders, settlements, stock, tracking.
3
+ # One connector is both storefronts. Tokopedia's own Open API was shut down on 30 Sep 2025; Tokopedia orders now come
4
+ # from the same TikTok Shop API, each order says where it was placed in commerce_platform (TIKTOK_SHOP, TOKOPEDIA,
5
+ # TIKTOK_SHOP_APP), and both storefronts draw from one stock per SKU and warehouse (there is no per-storefront stock).
6
+ # Shared mapping for every marketplace connector: marketplace/README.md (events, flags, lines, rules).
7
+ # Status: spec, no account used. Paths and fields from the Partner Center API reference
8
+ # (partner.tiktokshop.com/docv2) as read on 19 Nov 2026, each endpoint with its own version in the path; to confirm in
9
+ # a Development Shop (free sandbox seller account in Partner Center, Indonesia local supported). Research notes:
10
+ # Juragan's research_notes/Marketplace connector APIs Indonesia/tiktok_shop_tokopedia.md.
11
+ # Signing: every call to open-api.tiktokglobalshop.com carries app_key, timestamp (Unix seconds, accepted from 5 minutes
12
+ # before to 30 seconds after the platform's clock) and sign = lower-case hex HMAC-SHA256(app_secret, app_secret + path +
13
+ # the sorted query as key+value without sign and access_token + the raw body + app_secret). The access token goes in
14
+ # the x-tts-access-token header and is not signed. The token endpoints on auth.tiktok-shops.com are not signed.
15
+ # Polling is the main path: a webhook only says that an order changed (and says CANCEL where the API says CANCELLED),
16
+ # and TikTok Shop asks partners not to rely on webhooks alone, so every flag comes from the polled order.
17
+ # experimental: says how the kernel must sign and refresh (Juragan proposals/marketplace-connector-runtime.md, parts A
18
+ # and C). Until the kernel reads it, tiktok_shop/mock/tiktok_shop_mock.py poll is the relay that signs, refreshes,
19
+ # pages and posts each event to the flows tiktok_shop_order_staged and tiktok_shop_order_settled.
20
+ # One shop per company: the keys below are the keys of one shop (shop_cipher from list_shops).
21
+ # No buyer data: the buyer's name, phone and address (recipient_address, buyer_nickname, buyer_email) are never
22
+ # requested on purpose and never emitted; events carry the order, its lines and money only.
23
+ name: tiktok_shop
24
+ label: {id: TikTok Shop dan Tokopedia}
25
+ summary:
26
+ id: Ambil pesanan dan pencairan dana TikTok Shop dan Tokopedia, kirim stok ke toko.
27
+ en: Pull TikTok Shop and Tokopedia orders and settlements, push stock to the shop.
28
+ category: sales
29
+ icon: shopping-bag-2-line
30
+ version: 0.1.0
31
+ vendor: TikTok Shop (TikTok dan Tokopedia)
32
+ docs: https://partner.tiktokshop.com/docv2/page/tts-api-concepts-overview
33
+ hosts: [open-api.tiktokglobalshop.com, auth.tiktok-shops.com]
34
+ auth:
35
+ type: hmac
36
+ fields:
37
+ - name: app_key
38
+ label: {id: App key}
39
+ required: true
40
+ help: {id: 'Partner Center > App & Service > detail app'}
41
+ - name: app_secret
42
+ label: {id: App secret}
43
+ secret: true
44
+ required: true
45
+ help: {id: 'Partner Center > App & Service > detail app'}
46
+ - name: shop_cipher
47
+ label: {id: Shop cipher}
48
+ required: true
49
+ help: {id: 'Kode toko dari daftar toko yang memberi izin (list_shops)'}
50
+ - name: access_token
51
+ label: {id: Access token}
52
+ secret: true
53
+ required: true
54
+ help: {id: 'Diisi setelah pemilik toko memberi izin. Berlaku 7 hari, diperbarui otomatis'}
55
+ - name: refresh_token
56
+ label: {id: Refresh token}
57
+ secret: true
58
+ # Not read by the kernel yet (Juragan proposals/marketplace-connector-runtime.md): until then
59
+ # tiktok_shop/mock/tiktok_shop_mock.py poll signs and refreshes.
60
+ experimental:
61
+ sign:
62
+ in: query
63
+ param: sign
64
+ alg: hmac-sha256
65
+ key: app_secret
66
+ encoding: hex
67
+ timestamp: {param: timestamp, unit: seconds}
68
+ # request.target is the path only; request.body is the raw body as sent (empty for a GET), left out for a
69
+ # multipart/form-data upload, which no action here sends
70
+ base: '{auth.app_secret}{request.target}{request.sorted_query}{request.body}{auth.app_secret}'
71
+ exclude: [sign, access_token]
72
+ refresh:
73
+ request:
74
+ method: GET
75
+ url: https://auth.tiktok-shops.com/api/v2/token/refresh
76
+ # these auth fields go into the query under their own names (the vendor takes the app secret there)
77
+ query_from_auth: [app_key, app_secret, refresh_token]
78
+ query: {grant_type: refresh_token}
79
+ # the token host takes no sign parameter (an addition to the proposal's vocabulary, which only knows public: true)
80
+ sign: false
81
+ # access_token_expire_in and refresh_token_expire_in are Unix seconds (not durations). The answer always carries a
82
+ # refresh_token: it is stored before the new access token is used, whether or not it changed
83
+ output: {access_token: data.access_token, refresh_token: data.refresh_token, expires_at: data.access_token_expire_in, refresh_expires_at: data.refresh_token_expire_in}
84
+ before: 1d
85
+ # 105002: access token expired; refresh, then send the call once more
86
+ on_error: [105002]
87
+ triggers:
88
+ # A hint only. Registered per shop and topic (Partner Center or PUT /event/202309/webhooks), delivered at least
89
+ # once (dedupe on tts_notification_id), answered with an empty 200 within 3 seconds. Authorization is lower-case hex
90
+ # HMAC-SHA256(app_secret, app_key + raw body), no prefix. The kernel ignores payload today and computes the HMAC over
91
+ # the raw body only, so it refuses every push with 401: it fails closed until part B of the proposal lands.
92
+ # Type 1 (order status change) says CANCEL where the order API says CANCELLED and has no PARTIALLY_SHIPPING, which
93
+ # is why no flag is derived here: a flow listening to this only asks for the next poll.
94
+ - name: webhook_received
95
+ label: {id: Kabar dari TikTok Shop}
96
+ via: webhook
97
+ verify:
98
+ signature:
99
+ header: Authorization
100
+ alg: hmac-sha256
101
+ key: app_secret
102
+ encoding: hex
103
+ payload: '{auth.app_key}{request.body}'
104
+ emit:
105
+ shop_id: shop_id
106
+ # 1 order status change, 11 cancellation status change, 12 return status change, ...
107
+ type: type
108
+ order_id: data.order_id
109
+ # type 1 only (null for other types)
110
+ status: data.order_status
111
+ updated_at: data.update_time
112
+ sent_at: timestamp
113
+ notification_id: tts_notification_id
114
+ # Orders changed in the last two days (update_time from midnight UTC two days back), oldest change first, page by
115
+ # page over next_page_token (empty on the last page). The search answer is the full order object (the same schema
116
+ # as order detail 202507, commerce_platform, payment and line_items included), so no detail call per order is made;
117
+ # if the sandbox shows fields missing from search, this becomes each: over list_orders with get_order_detail.
118
+ # The same order is emitted again on later polls: the kernel drops an event only when every emitted value is
119
+ # unchanged, and the relay posts every event of the window on every poll, so every flow has the idempotency key of
120
+ # marketplace/README.md ("Flow keys"). After an outage longer than two days, run the relay once with
121
+ # poll --since-days N. lines are TikTok's line_items unchanged: there is no quantity field, each unit sold is its own
122
+ # entry. A COD order is AWAITING_SHIPMENT, so sold, with paid_time absent. Returns set no flag (not read in v0.1).
123
+ - name: order_changed
124
+ label: {id: Pesanan baru atau berubah}
125
+ via: poll
126
+ every: 10m
127
+ action: list_orders
128
+ input:
129
+ update_time_ge: "(days_between('1970-01-01', today()) - 2) * 86400"
130
+ page_token: page
131
+ next: next
132
+ for_each: orders[]
133
+ emit:
134
+ channel: "'tiktok_shop'"
135
+ storefront: item.commerce_platform
136
+ order_id: item.id
137
+ status: item.status
138
+ sold: "item.status == 'AWAITING_SHIPMENT' || item.status == 'PARTIALLY_SHIPPING' || item.status == 'AWAITING_COLLECTION' || item.status == 'IN_TRANSIT' || item.status == 'DELIVERED' || item.status == 'COMPLETED'"
139
+ shipped: "item.status == 'IN_TRANSIT' || item.status == 'DELIVERED' || item.status == 'COMPLETED'"
140
+ completed: "item.status == 'COMPLETED'"
141
+ cancelled: "item.status == 'CANCELLED'"
142
+ created_at: item.create_time
143
+ # absent until the order is paid
144
+ paid_at: item.paid_time
145
+ updated_at: item.update_time
146
+ currency: item.payment.currency
147
+ # money is a decimal string as TikTok sends it (whole rupiah for IDR)
148
+ buyer_total: item.payment.total_amount
149
+ lines: item.line_items
150
+ # Settlements: the paid daily statements of the last seven days (one statement per seller per day, generated at
151
+ # 00:00 UTC; Get Payments is closed to SEA, so payment_time of the statement is when the money was released), then
152
+ # the statement's transactions (202501; the 202309 paths were sunset on 31 Dec 2025), one record per order.
153
+ # A record of another type (RESERVE, an adjustment such as CHARGE_BACK) has an empty order_id and is not an order
154
+ # settlement: the settlement flow runs only if income.type == 'ORDER' (key channel:order_id:settled) and a person
155
+ # reviews the other records against the receivable. Fees and taxes keep TikTok's sign: negative is a cost, positive
156
+ # refunds it (never the absolute value); money is a decimal string, which a flow converts with double().
157
+ # service_fee is null: TikTok reports no single service fee but a dozen named program fees (sfp_service_fee_amount,
158
+ # voucher_xtra_service_fee_amount, mall_service_fee_amount, ...), which stay in income.fee_tax_breakdown.fee.
159
+ # adjusted_net is null: TikTok reports adjustments as their own records, not per order. After an outage longer than
160
+ # seven days, run the relay once with poll --settled-days N.
161
+ - name: order_settled
162
+ label: {id: Dana pesanan cair}
163
+ via: poll
164
+ every: 1h
165
+ action: get_settlement
166
+ each: {action: list_settlements, items: statements, as: statement, key: statement.id}
167
+ input:
168
+ statement_id: statement.id
169
+ page_token: page
170
+ next: next
171
+ for_each: transactions[]
172
+ emit:
173
+ channel: "'tiktok_shop'"
174
+ order_id: item.order_id
175
+ currency: statement.currency
176
+ settled_at: statement.payment_time
177
+ net: item.settlement_amount
178
+ adjusted_net: "null"
179
+ commission_fee: item.fee_tax_breakdown.fee.platform_commission_amount
180
+ service_fee: "null"
181
+ transaction_fee: item.fee_tax_breakdown.fee.transaction_fee_amount
182
+ # PPh 22 withheld under PMK 37/2025
183
+ withheld_tax: item.fee_tax_breakdown.tax.article_22_income_tax_withheld
184
+ income: item
185
+ actions:
186
+ - name: list_orders
187
+ label: {id: Daftar pesanan}
188
+ request:
189
+ method: POST
190
+ url: https://open-api.tiktokglobalshop.com/order/202309/orders/search
191
+ headers: {x-tts-access-token: '{auth.access_token}', Content-Type: application/json}
192
+ query: {app_key: '{auth.app_key}', shop_cipher: '{auth.shop_cipher}', page_size: '50', page_token: '{input.page_token}', sort_field: update_time, sort_order: ASC}
193
+ body: {update_time_ge: '{input.update_time_ge}'}
194
+ input:
195
+ - {name: update_time_ge, type: int, default: "(days_between('1970-01-01', today()) - 2) * 86400", help: {id: 'Detik epoch (UTC)'}}
196
+ - {name: page_token, type: data, help: {id: 'Kosong untuk halaman pertama'}}
197
+ output: {orders: data.orders, next: data.next_page_token, total: data.total_count}
198
+ retry: {max: 5, backoff: exponential, on: [429, 500, 502, 503]}
199
+ - name: get_order_detail
200
+ label: {id: Rincian pesanan}
201
+ request:
202
+ method: GET
203
+ url: https://open-api.tiktokglobalshop.com/order/202507/orders
204
+ headers: {x-tts-access-token: '{auth.access_token}'}
205
+ query: {app_key: '{auth.app_key}', shop_cipher: '{auth.shop_cipher}', ids: '{input.ids}'}
206
+ input:
207
+ - {name: ids, type: data, required: true, help: {id: 'Nomor pesanan, dipisah koma (maks 50)'}}
208
+ output: {orders: data.orders}
209
+ retry: {max: 5, backoff: exponential, on: [429, 500, 502, 503]}
210
+ - name: list_settlements
211
+ label: {id: Daftar pencairan dana}
212
+ request:
213
+ method: GET
214
+ url: https://open-api.tiktokglobalshop.com/finance/202309/statements
215
+ headers: {x-tts-access-token: '{auth.access_token}'}
216
+ query: {app_key: '{auth.app_key}', shop_cipher: '{auth.shop_cipher}', sort_field: statement_time, statement_time_ge: '{input.statement_time_ge}', payment_status: PAID, page_size: '100'}
217
+ input:
218
+ - {name: statement_time_ge, type: int, default: "(days_between('1970-01-01', today()) - 7) * 86400", help: {id: 'Detik epoch (UTC)'}}
219
+ output: {statements: data.statements, next: data.next_page_token}
220
+ retry: {max: 5, backoff: exponential, on: [429, 500, 502, 503]}
221
+ - name: get_settlement
222
+ label: {id: Rincian pencairan per pesanan}
223
+ request:
224
+ method: GET
225
+ url: https://open-api.tiktokglobalshop.com/finance/202501/statements/{input.statement_id}/statement_transactions
226
+ headers: {x-tts-access-token: '{auth.access_token}'}
227
+ query: {app_key: '{auth.app_key}', shop_cipher: '{auth.shop_cipher}', sort_field: order_create_time, page_size: '100', page_token: '{input.page_token}'}
228
+ input:
229
+ - {name: statement_id, type: data, required: true}
230
+ - {name: page_token, type: data}
231
+ output: {transactions: data.transactions, next: data.next_page_token, settlement: data.total_settlement_amount}
232
+ retry: {max: 5, backoff: exponential, on: [429, 500, 502, 503]}
233
+ # Absolute quantity per SKU and warehouse (the legacy mode: sku_warehouse_stock_update_mode, new in Oct 2026, is not
234
+ # sent). One number serves both storefronts. The quantity is the available stock of marketplace/README.md rule 1,
235
+ # pushed only right after a successful order poll that staged every new order. revision (required, unique per push
236
+ # and increasing: the push time in milliseconds) is in the idempotency key, so every new push is sent while a retry
237
+ # of the same job is sent once; retries are short, a failed push waits for the next poll. A partial failure answers code 0 with data.errors (output failures): a flow treats a
238
+ # non-empty failures as a failed push and tells the owner. An empty warehouse_id is read as the shop's default
239
+ # warehouse; to confirm in the Development Shop.
240
+ - name: update_stock
241
+ label: {id: Kirim stok}
242
+ request:
243
+ method: POST
244
+ url: https://open-api.tiktokglobalshop.com/product/202309/products/{input.product_id}/inventory/update
245
+ headers: {x-tts-access-token: '{auth.access_token}', Content-Type: application/json}
246
+ query: {app_key: '{auth.app_key}', shop_cipher: '{auth.shop_cipher}'}
247
+ body:
248
+ skus:
249
+ - id: '{input.sku_id}'
250
+ inventory:
251
+ - {warehouse_id: '{input.warehouse_id}', quantity: '{input.quantity}'}
252
+ input:
253
+ - {name: product_id, type: data, required: true}
254
+ - {name: sku_id, type: data, required: true}
255
+ - {name: quantity, type: int, required: true, help: {id: 'Stok tersedia, angka utuh (bukan selisih)'}}
256
+ - {name: warehouse_id, type: data, default: "''", help: {id: 'Kosongkan untuk gudang utama toko'}}
257
+ - {name: revision, type: data, required: true, help: {id: 'Unik untuk setiap kiriman dan terus naik, misalnya waktu kirim dalam milidetik'}}
258
+ output: {failures: data.errors}
259
+ retry: {max: 2, backoff: fixed, on: [429, 500, 502, 503]}
260
+ idempotency: input.product_id + ':' + input.sku_id + ':' + input.warehouse_id + ':' + string(input.quantity) + ':' + string(input.revision)
261
+ # The tracking number of a package (packages[].id or line_items[].package_id of the order).
262
+ - name: get_tracking
263
+ label: {id: Nomor resi}
264
+ request:
265
+ method: GET
266
+ url: https://open-api.tiktokglobalshop.com/fulfillment/202309/packages/{input.package_id}
267
+ headers: {x-tts-access-token: '{auth.access_token}'}
268
+ query: {app_key: '{auth.app_key}', shop_cipher: '{auth.shop_cipher}'}
269
+ input:
270
+ - {name: package_id, type: data, required: true}
271
+ output: {tracking_number: data.tracking_number, shipping_provider: data.shipping_provider_name, package_status: data.package_status, orders: data.orders}
272
+ retry: {max: 3, backoff: exponential, on: [429, 500, 502, 503]}
273
+ # To find product_id and sku_id of a seller SKU (the join key with the item's sku in Rangka).
274
+ - name: list_products
275
+ label: {id: Daftar produk}
276
+ request:
277
+ method: POST
278
+ url: https://open-api.tiktokglobalshop.com/product/202502/products/search
279
+ headers: {x-tts-access-token: '{auth.access_token}', Content-Type: application/json}
280
+ query: {app_key: '{auth.app_key}', shop_cipher: '{auth.shop_cipher}', page_size: '100', page_token: '{input.page_token}'}
281
+ body: {status: '{input.status}', seller_skus: '{input.seller_skus}'}
282
+ input:
283
+ - {name: seller_skus, type: json, default: '[]', help: {id: 'SKU penjual yang dicari; kosong untuk semua'}}
284
+ - {name: status, type: data, default: "'ACTIVATE'"}
285
+ - {name: page_token, type: data}
286
+ output: {products: data.products, next: data.next_page_token, total: data.total_count}
287
+ retry: {max: 5, backoff: exponential, on: [429, 500, 502, 503]}
288
+ # The shops that authorized the app, with the cipher each shop-scoped call needs (no shop_cipher on this call).
289
+ - name: list_shops
290
+ label: {id: Daftar toko}
291
+ request:
292
+ method: GET
293
+ url: https://open-api.tiktokglobalshop.com/authorization/202309/shops
294
+ headers: {x-tts-access-token: '{auth.access_token}'}
295
+ query: {app_key: '{auth.app_key}'}
296
+ output: {shops: data.shops}
297
+ retry: {max: 3, backoff: exponential, on: [429, 500, 502, 503]}
298
+ limits:
299
+ rate: dynamic per app and shop (HTTP 429, code 36009002); Development Shop 1000 requests per hour
300
+ note: {id: 'Perlu app di TikTok Shop Partner Center: seller developer untuk toko sendiri (satu toko), atau ISV. Toko uji (Development Shop) gratis'}
@@ -0,0 +1,105 @@
1
+ {
2
+ "order_changed.json": {
3
+ "channel": "tiktok_shop",
4
+ "storefront": "TIKTOK_SHOP",
5
+ "order_id": "577001234500000101",
6
+ "status": "AWAITING_SHIPMENT",
7
+ "sold": true,
8
+ "shipped": false,
9
+ "completed": false,
10
+ "cancelled": false,
11
+ "created_at": 1794963600,
12
+ "paid_at": 1794963660,
13
+ "updated_at": 1794963700,
14
+ "currency": "IDR",
15
+ "buyer_total": "56000"
16
+ },
17
+ "order_changed_tokopedia.json": {
18
+ "channel": "tiktok_shop",
19
+ "storefront": "TOKOPEDIA",
20
+ "order_id": "577001234500000102",
21
+ "status": "IN_TRANSIT",
22
+ "sold": true,
23
+ "shipped": true,
24
+ "completed": false,
25
+ "cancelled": false,
26
+ "paid_at": 1794967230,
27
+ "buyer_total": "46000"
28
+ },
29
+ "order_changed_unpaid.json": {
30
+ "storefront": "TIKTOK_SHOP",
31
+ "status": "UNPAID",
32
+ "sold": false,
33
+ "shipped": false,
34
+ "completed": false,
35
+ "cancelled": false,
36
+ "paid_at": null
37
+ },
38
+ "order_changed_on_hold.json": {
39
+ "storefront": "TOKOPEDIA",
40
+ "status": "ON_HOLD",
41
+ "sold": false,
42
+ "shipped": false,
43
+ "completed": false,
44
+ "cancelled": false
45
+ },
46
+ "order_changed_cancelled.json": {
47
+ "status": "CANCELLED",
48
+ "sold": false,
49
+ "shipped": false,
50
+ "completed": false,
51
+ "cancelled": true
52
+ },
53
+ "order_changed_completed.json": {
54
+ "status": "COMPLETED",
55
+ "sold": true,
56
+ "shipped": true,
57
+ "completed": true,
58
+ "cancelled": false
59
+ },
60
+ "order_settled.json": {
61
+ "channel": "tiktok_shop",
62
+ "order_id": "577001234500000106",
63
+ "currency": "IDR",
64
+ "settled_at": 1794985200,
65
+ "net": "26550",
66
+ "adjusted_net": null,
67
+ "commission_fee": "-1200",
68
+ "service_fee": null,
69
+ "transaction_fee": "-600",
70
+ "withheld_tax": "-150"
71
+ },
72
+ "webhook_received.json": {
73
+ "shop_id": "7495000000000000001",
74
+ "type": 1,
75
+ "order_id": "577001234500000101",
76
+ "status": "AWAITING_SHIPMENT",
77
+ "updated_at": 1794963700,
78
+ "sent_at": 1794963700,
79
+ "notification_id": "7380000000000000101"
80
+ },
81
+ "webhook_received_cancellation.json": {
82
+ "type": 11,
83
+ "order_id": "577001234500000105",
84
+ "status": null,
85
+ "updated_at": null
86
+ },
87
+ "list_orders.json": {
88
+ "next": "",
89
+ "total": 2
90
+ },
91
+ "list_settlements.json": {
92
+ "next": ""
93
+ },
94
+ "get_settlement.json": {
95
+ "next": "",
96
+ "settlement": "26550"
97
+ },
98
+ "update_stock.json": {
99
+ "failures": null
100
+ },
101
+ "get_tracking.json": {
102
+ "tracking_number": "JX0000000102",
103
+ "package_status": "FULFILLING"
104
+ }
105
+ }
@@ -0,0 +1,136 @@
1
+ {
2
+ "code": 0,
3
+ "message": "Success",
4
+ "request_id": "202611180100000101890810281E8C7001",
5
+ "data": {
6
+ "orders": [
7
+ {
8
+ "id": "577001234500000101",
9
+ "status": "AWAITING_SHIPMENT",
10
+ "commerce_platform": "TIKTOK_SHOP",
11
+ "order_type": "NORMAL",
12
+ "create_time": 1794963600,
13
+ "update_time": 1794963700,
14
+ "is_on_hold_order": false,
15
+ "is_cod": false,
16
+ "is_sample_order": false,
17
+ "is_replacement_order": false,
18
+ "is_buyer_request_cancel": false,
19
+ "cancel_reason": "",
20
+ "cancellation_initiator": "",
21
+ "shipping_type": "TIKTOK",
22
+ "fulfillment_type": "FULFILLMENT_BY_SELLER",
23
+ "delivery_type": "HOME_DELIVERY",
24
+ "delivery_option_name": "Reguler",
25
+ "shipping_provider": "J&T Express",
26
+ "shipping_provider_id": "7100000000000000001",
27
+ "tracking_number": "",
28
+ "warehouse_id": "7300000000000000001",
29
+ "payment_method_name": "QRIS",
30
+ "packages": [
31
+ {
32
+ "id": "1152000000000000101"
33
+ }
34
+ ],
35
+ "line_items": [
36
+ {
37
+ "id": "7001234500000001101",
38
+ "product_id": "1729000000000000501",
39
+ "product_name": "Tahu goreng original",
40
+ "sku_id": "1729000000000005011",
41
+ "sku_name": "Original, isi 10",
42
+ "seller_sku": "TH-ORI",
43
+ "original_price": "15000",
44
+ "sale_price": "15000",
45
+ "platform_discount": "0",
46
+ "seller_discount": "0",
47
+ "currency": "IDR",
48
+ "display_status": "AWAITING_SHIPMENT",
49
+ "package_id": "1152000000000000101",
50
+ "package_status": "TO_FULFILL",
51
+ "tracking_number": "",
52
+ "shipping_provider_id": "7100000000000000001",
53
+ "shipping_provider_name": "J&T Express",
54
+ "is_gift": false,
55
+ "item_tax": [],
56
+ "buyer_service_fee": "0",
57
+ "distance_shipping_fee": "0",
58
+ "distance_fee": "0"
59
+ },
60
+ {
61
+ "id": "7001234500000002101",
62
+ "product_id": "1729000000000000501",
63
+ "product_name": "Tahu goreng original",
64
+ "sku_id": "1729000000000005011",
65
+ "sku_name": "Original, isi 10",
66
+ "seller_sku": "TH-ORI",
67
+ "original_price": "15000",
68
+ "sale_price": "15000",
69
+ "platform_discount": "0",
70
+ "seller_discount": "0",
71
+ "currency": "IDR",
72
+ "display_status": "AWAITING_SHIPMENT",
73
+ "package_id": "1152000000000000101",
74
+ "package_status": "TO_FULFILL",
75
+ "tracking_number": "",
76
+ "shipping_provider_id": "7100000000000000001",
77
+ "shipping_provider_name": "J&T Express",
78
+ "is_gift": false,
79
+ "item_tax": [],
80
+ "buyer_service_fee": "0",
81
+ "distance_shipping_fee": "0",
82
+ "distance_fee": "0"
83
+ },
84
+ {
85
+ "id": "7001234500000003101",
86
+ "product_id": "1729000000000000502",
87
+ "product_name": "Tahu goreng pedas",
88
+ "sku_id": "1729000000000005021",
89
+ "sku_name": "Pedas, isi 10",
90
+ "seller_sku": "TH-PDS",
91
+ "original_price": "18000",
92
+ "sale_price": "16000",
93
+ "platform_discount": "0",
94
+ "seller_discount": "2000",
95
+ "currency": "IDR",
96
+ "display_status": "AWAITING_SHIPMENT",
97
+ "package_id": "1152000000000000101",
98
+ "package_status": "TO_FULFILL",
99
+ "tracking_number": "",
100
+ "shipping_provider_id": "7100000000000000001",
101
+ "shipping_provider_name": "J&T Express",
102
+ "is_gift": false,
103
+ "item_tax": [],
104
+ "buyer_service_fee": "0",
105
+ "distance_shipping_fee": "0",
106
+ "distance_fee": "0"
107
+ }
108
+ ],
109
+ "payment": {
110
+ "currency": "IDR",
111
+ "original_total_product_price": "48000",
112
+ "seller_discount": "2000",
113
+ "platform_discount": "0",
114
+ "sub_total": "46000",
115
+ "original_shipping_fee": "12000",
116
+ "shipping_fee_seller_discount": "0",
117
+ "shipping_fee_platform_discount": "2000",
118
+ "shipping_fee_cofunded_discount": "0",
119
+ "shipping_fee": "10000",
120
+ "tax": "0",
121
+ "product_tax": "0",
122
+ "shipping_fee_tax": "0",
123
+ "buyer_service_fee": "0",
124
+ "handling_fee": "0",
125
+ "shipping_insurance_fee": "0",
126
+ "item_insurance_fee": "0",
127
+ "distance_shipping_fee": "0",
128
+ "distance_fee": "0",
129
+ "total_amount": "56000"
130
+ },
131
+ "paid_time": 1794963660,
132
+ "rts_sla_time": 1795136400
133
+ }
134
+ ]
135
+ }
136
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "code": 0,
3
+ "message": "Success",
4
+ "request_id": "202611180100000101890810281E8C7001",
5
+ "data": {
6
+ "id": "7300000000000009001",
7
+ "create_time": 1794960000,
8
+ "status": "SETTLED",
9
+ "currency": "IDR",
10
+ "payable_amount": "26550",
11
+ "total_reserve_amount": "0",
12
+ "total_settlement_amount": "26550",
13
+ "total_settlement_breakdown": {
14
+ "total_revenue_amount": "30000",
15
+ "total_shipping_cost_amount": "0",
16
+ "total_fee_tax_amount": "-3450",
17
+ "total_adjustment_amount": "0"
18
+ },
19
+ "total_count": 1,
20
+ "next_page_token": "",
21
+ "transactions": [
22
+ {
23
+ "id": "7300000000000009201",
24
+ "type": "ORDER",
25
+ "order_id": "577001234500000106",
26
+ "order_create_time": 1794528000,
27
+ "adjustment_id": "",
28
+ "adjustment_order_id": "",
29
+ "adjustment_amount": "0",
30
+ "settlement_amount": "26550",
31
+ "revenue_amount": "30000",
32
+ "revenue_breakdown": {
33
+ "subtotal_before_discount_amount": "30000",
34
+ "seller_discount_amount": "0",
35
+ "refund_subtotal_before_discount_amount": "0",
36
+ "seller_discount_refund_amount": "0",
37
+ "cod_service_fee_amount": "0",
38
+ "refund_cod_service_fee_amount": "0",
39
+ "distant_item_fee_amount": "0"
40
+ },
41
+ "shipping_cost_amount": "0",
42
+ "shipping_cost_breakdown": {
43
+ "actual_shipping_fee_amount": "-10000",
44
+ "shipping_fee_discount_amount": "0",
45
+ "customer_paid_shipping_fee_amount": "10000",
46
+ "return_shipping_fee_amount": "0",
47
+ "replacement_shipping_fee_amount": "0",
48
+ "exchange_shipping_fee_amount": "0",
49
+ "shipping_insurance_fee_amount": "0",
50
+ "seller_self_shipping_service_fee_amount": "0",
51
+ "failed_delivery_subsidy_amount": "0",
52
+ "distant_shipping_fee_amount": "0"
53
+ },
54
+ "fee_tax_amount": "-3450",
55
+ "fee_tax_breakdown": {
56
+ "fee": {
57
+ "platform_commission_amount": "-1200",
58
+ "transaction_fee_amount": "-600",
59
+ "dynamic_commission_amount": "-300",
60
+ "sfp_service_fee_amount": "-1200",
61
+ "affiliate_commission_amount": "0",
62
+ "voucher_xtra_service_fee_amount": "0",
63
+ "mall_service_fee_amount": "0",
64
+ "credit_card_handling_fee_amount": "0"
65
+ },
66
+ "tax": {
67
+ "article_22_income_tax_withheld": "-150",
68
+ "vat_amount": "0",
69
+ "pit_amount": "0"
70
+ }
71
+ },
72
+ "supplementary_component": {
73
+ "customer_payment_amount": "40000",
74
+ "customer_refund_amount": "0",
75
+ "platform_discount_amount": "0",
76
+ "platform_discount_refund_amount": "0",
77
+ "seller_cofunded_discount_amount": "0",
78
+ "platform_cofunded_discount_amount": "0"
79
+ }
80
+ }
81
+ ]
82
+ }
83
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "code": 0,
3
+ "message": "Success",
4
+ "request_id": "202611180100000101890810281E8C7001",
5
+ "data": {
6
+ "package_id": "1152000000000000102",
7
+ "orders": [
8
+ {
9
+ "id": "577001234500000102"
10
+ }
11
+ ],
12
+ "package_status": "FULFILLING",
13
+ "package_sub_status": "",
14
+ "shipping_provider_name": "J&T Express",
15
+ "shipping_provider_id": "7100000000000000001",
16
+ "shipping_type": "TIKTOK",
17
+ "delivery_option_name": "Reguler",
18
+ "tracking_number": "JX0000000102",
19
+ "handover_method": "PICKUP",
20
+ "order_line_item_ids": [
21
+ "7001234500000001102",
22
+ "7001234500000002102"
23
+ ],
24
+ "create_time": 1794988000,
25
+ "update_time": 1794990000,
26
+ "warehouse_id": "7300000000000000001"
27
+ }
28
+ }