| Chargeback Ref No | Checkout ID | Order ID | Order SN | Buyer ID | Buyer Username | Address | Type | Card | Device ID | Grand Total | Pay Date |
|---|
Upload a ZIP of your output\ folder, select individual PNG files, or select a folder. All methods can be used together โ files accumulate.
Or use the buttons below
Shopee SG Chargeback Automation Portal
check_sessions.py before run_all.py or run_all_multi.py to avoid partial or missing screenshots.
pip install playwright playwright install chromium
pip install pillow gspread google-auth
Place all scripts + fleet-rhino-499805-i8-03adf5832bca.json in the same folder. Session JSONs are saved to the same folder automatically.
| Script | What it does |
|---|---|
| run_all.py | Main script โ reads all cases from Google Sheet, runs all 4 portals sequentially per order, saves screenshots to output\{order_id}\ |
| run_all_multi.py | Faster version โ same as run_all.py but runs all 4 portals in parallel simultaneously. Recommended for large batches (10+ orders) |
| check_sessions.py | Checks whether all 4 portal sessions are valid or expired, tells you which ones need renewal |
| save_session.py | Saves session for order-admin.shopee.sg โ shopee_session.json |
| save_session_dms.py | Saves session for dms.cs.shopee.sg โ dms_session.json |
| save_session_user_admin.py | Saves session for admin.user.shopee.io โ user_admin_session.json |
| save_session_antifraud.py | Saves session for antifraud.admin.shopee.io โ antifraud_session.json |
| status_timeline.py | Individual retry script โ status timeline screenshot for one order |
| dms_order_id.py | Individual retry script โ DMS buyer rating screenshot for one order |
| admin_user.py | Individual retry script โ address binding screenshot for one order |
| antifraud_user.py | Individual retry script โ device binding screenshot for one order |
| antifraud_cc.py | Individual retry script โ credit card binding screenshot for one order |
Understanding the flow helps diagnose issues when screenshots are missing or incorrect.
COMPLETED down to logistics_delivery_doneCANCEL_COMPLETED row โ no timeline highlightis_bsc:is_bsc = 1 (self-collection) โ uses default_delivery_addressis_bsc = 0 (doorstep) โ uses buyer_shipping_address
Before running anything, verify all sessions are valid:
python "C:\Users\giaing.yap\Desktop\playwright test\check_sessions.py"
For any EXPIRED session, run the corresponding save script and log in manually:
python "C:\Users\giaing.yap\Desktop\playwright test\save_session_dms.py"
A browser window will open โ log in, come back to the terminal, press Enter. Session is saved next to the script.
Once all sessions are OK, run the main script. Use run_all_multi.py for larger batches:
python "C:\Users\giaing.yap\Desktop\playwright test\run_all_multi.py"
Or the sequential version:
python "C:\Users\giaing.yap\Desktop\playwright test\run_all.py"
Screenshots are saved to:
output\
โโโ {order_id}\
โโโ {checkout_id}_{order_id}_status_timeline.png
โโโ {checkout_id}_{buyer_id}_admin_user.png
โโโ {checkout_id}_{buyer_id}_antifraud_device.png
โโโ {checkout_id}_{buyer_id}_antifraud_cc.png
โโโ {checkout_id}_{order_id}_dms_rating.png โ only if buyer rating exists
At the end, check the summary for any skipped orders:
============================================================ COMPLETED WITH 2 SKIP(S): [SKIP] antifraud_device | order 232225751202187 | Timeout exceeded [SKIP] antifraud_device | order 234430692270636 | Timeout exceeded ============================================================
Go to the Upload Screenshots tab. Three options โ all accumulate:
output\ folder contents and upload at once. Recommended.Go to the Reports tab:
Select all approved cases and click ๐ฆ Package for Bank. A ZIP named {YYYYMMDD_HHMM}.zip will download:
{YYYYMMDD_HHMM}.zip
โโโ {chargeback_ref_no}/
โโโ {chargeback_ref_no}.pdf
โโโ address_binding_time.pdf
โโโ card_binding_time.pdf
โโโ device_binding_time.pdf
โโโ POD_1 Order ID {order_id}.pdf
โโโ POD_2 Order ID {order_id}.pdf โ if multiple orders
โโโ Rating_1.pdf โ only if buyer rating exists
Note: / in chargeback ref numbers is replaced with - in folder/file names.
If the summary shows skipped orders, use the individual scripts to retrigger only the failed portal. Each script reads all needed data from the Google Sheet automatically โ just pass the order ID:
python "C:\Users\giaing.yap\Desktop\playwright test\antifraud_user.py" 232225751202187 python "C:\Users\giaing.yap\Desktop\playwright test\antifraud_cc.py" 232225751202187 python "C:\Users\giaing.yap\Desktop\playwright test\status_timeline.py" 232225751202187 python "C:\Users\giaing.yap\Desktop\playwright test\dms_order_id.py" 232225751202187 python "C:\Users\giaing.yap\Desktop\playwright test\admin_user.py" 232225751202187
To retrigger multiple orders at once for the same portal:
python "C:\Users\giaing.yap\Desktop\playwright test\antifraud_user.py" 232225751202187 234430692270636
Output saves directly to output\{order_id}\ with the correct filename, ready for upload to the portal.