API Integration
Testing AliExpress Sandbox Credentials for Live Integration
Pushing untested AliExpress API credentials directly to your live Fetch Order Tracking integration is a critical error. Without prior validation in a controlled environment, you risk operational disruptions, inaccurate order tracking, missed refund detection, and potential data integrity issues. The AliExpress sandbox environment provides a safe, isolated space to confirm your API configuration and data flow before interacting with real customer orders and financial data.
Why Sandbox Testing is Non-Negotiable
The primary purpose of the AliExpress sandbox is to replicate the production environment without affecting live operations. This isolation is crucial for:
- Configuration Validation: Ensuring your
app_key,app_secret, andaccess_tokenare correctly formatted and authorized. - Data Flow Verification: Confirming that Fetch Order Tracking can successfully pull order data, logistics updates, and refund requests as expected.
- Error Handling: Identifying and resolving API errors (e.g.,
ISV_INVALID_SIGNATURE,ISV_MISSING_APP_KEY) before they impact your business. - Feature Testing: Verifying that specific Fetch Order Tracking features, like refund detection based on
gmt_refundorend_reason, function correctly with AliExpress data.
Obtaining AliExpress Sandbox Credentials
Your first step is to acquire sandbox-specific credentials from the AliExpress Developer Portal. These are distinct from your production credentials.
- Register for a Developer Account: If you haven't already, sign up on the AliExpress Open Platform.
- Create a Sandbox Application: Navigate to the 'My Applications' section and create a new application, explicitly selecting the 'Sandbox' environment. This will provide you with a unique sandbox
app_keyandapp_secret. - Generate a Sandbox Access Token: Unlike production tokens which often require user authorization flows, sandbox tokens are typically generated through specific developer tools or console functions within the sandbox environment. Follow the AliExpress developer documentation to generate a temporary sandbox
access_token. This token will grant your application permission to access sandbox data. - Create Test Seller and Buyer Accounts: Within the sandbox environment, you'll need at least one test seller account (associated with your developer account) and one test buyer account. These accounts are used to simulate real transactions.
Simulating Test Orders in the Sandbox
To test your integration, you need actual order data within the sandbox. This involves using your test buyer account to place orders from your test seller account.
- Log in as Test Buyer: Use your sandbox buyer account to log in to the sandbox version of AliExpress.
- Place Orders: Browse products listed by your sandbox seller account and place several test orders. Vary the order types: some single-item, some multi-item.
- Simulate Status Changes:
- Payment: Ensure test orders are marked as paid.
- Shipping: As the test seller, mark some orders as shipped. Provide dummy tracking numbers and logistics companies.
- Delivery: As the test buyer, confirm receipt for some shipped orders (
BUYER_ACCEPT_GOODS). - Disputes/Refunds: Initiate a dispute or refund request for at least one order as the test buyer. This is critical for testing
gmt_refundandend_reasondetection.
The value of sandbox testing lies in its ability to simulate edge cases. Don't just test a single, perfect order. Test various order statuses, logistics scenarios, and critically, refund workflows to ensure your integration can handle the full spectrum of AliExpress data.
Integrating Sandbox Credentials with Fetch Order Tracking
Fetch Order Tracking provides a dedicated mechanism to configure and test with sandbox credentials.
- Navigate to Integration Settings: In your Fetch Order Tracking dashboard, go to the AliExpress integration settings.
- Enable Sandbox Mode: Locate the 'Sandbox Mode' toggle or checkbox and enable it. This tells Fetch Order Tracking to use the sandbox API endpoint (e.g.,
https://api-sg.aliexpress.com/syncfor sync API calls) instead of the production one. - Input Sandbox Credentials: Enter your sandbox
app_key,app_secret, and the generated sandboxaccess_tokeninto the respective fields. - Save and Sync: Save the updated settings and initiate a manual sync or wait for the next scheduled sync cycle.
Verifying Data Flow and Field Accuracy
Once Fetch Order Tracking attempts to sync, meticulously verify the data pulled into your Google Sheet.
Order Data Verification (aliexpress.solution.order.get / aliexpress.solution.order.list)
- Order IDs: Confirm that the test order IDs placed in the sandbox are present in your sheet.
order_status: Check that statuses likeWAIT_SELLER_SEND_GOODS,WAIT_BUYER_ACCEPT_GOODS, andFINISHaccurately reflect your simulated order states.- Timestamps: Verify
gmt_create,gmt_pay, andgmt_sendfields are populated and accurate relative to your simulated actions. - Buyer/Seller Info: Ensure test buyer and seller details are correctly pulled.
Logistics Data Verification (aliexpress.solution.order.fulfill.get)
- Tracking Numbers: Confirm that dummy tracking numbers entered during shipping simulation are present.
logistics_status: Check for accurate statuses likeSELLER_SEND_GOODSorBUYER_ACCEPT_GOODS.
Refund and Dispute Data Verification (aliexpress.solution.issue.get)
This is a critical area for dropshippers, as it directly impacts your ability to detect and manage refunds.
- Refund Detection: For orders where you simulated a refund request, confirm that the refund is detected in your sheet.
gmt_refund: Verify this timestamp is populated when a refund is initiated or processed in the sandbox.end_reason: Check that the reason for the refund or dispute (if applicable) is correctly captured. This field is vital for categorizing refund types.- Refund Amount: Ensure the simulated refund amount is correctly reflected.
Error Monitoring
Keep an eye on Fetch Order Tracking's error logs or notification systems. Common sandbox-related errors include:
ISV_INVALID_SIGNATURE: Incorrectapp_secretor an issue with signature generation.ISV_MISSING_APP_KEY: Yourapp_keyis not recognized.INVALID_ACCESS_TOKEN: Theaccess_tokenis expired, invalid, or belongs to the wrong environment.
Transitioning to Live Production
Once your sandbox testing is complete and you're confident in the integration's stability and accuracy:
- Generate Production Credentials: Obtain your live
app_key,app_secret, and a productionaccess_tokenfrom the AliExpress Developer Portal. Remember, production tokens often have a different generation and refresh mechanism than sandbox ones. - Update Fetch Order Tracking: In your Fetch Order Tracking AliExpress integration settings:
- Disable Sandbox Mode: Toggle off the 'Sandbox Mode' checkbox.
- Replace Credentials: Input your production
app_key,app_secret, and the live productionaccess_token.
- Save and Monitor: Save the production settings. Fetch Order Tracking will now begin pulling live order data. Closely monitor the initial syncs to ensure everything is functioning as expected with real data.
Thorough sandbox testing eliminates guesswork and prevents costly errors in your dropshipping operations. By systematically validating your AliExpress API integration, you ensure Fetch Order Tracking delivers accurate, timely data for every order and refund. For further details on maximizing your tracking and refund detection, explore our full feature set here.