Order Settlements Quickstart Guide
Table of Contents
- Introduction
- Core Concepts
- Setting Up Your Environment
- StateSet API Integration
- TikTok Shop Integration
- Amazon Integration
- Shopify Integration
- Consolidating Settlement Data
- Reporting and Analytics
- Automated Reconciliation
- Error Handling and Logging
- Best Practices and Optimization
Introduction
This guide demonstrates how to use StateSet’s API to manage order settlements across multiple e-commerce platforms: TikTok Shop, Amazon, Shopify, and StateSet’s own system. By following this guide, you’ll learn how to consolidate settlement data, process it efficiently, and gain insights into your multi-channel e-commerce operations.Core Concepts
Before diving into the implementation, let’s review some core concepts related to order settlements:- Settlement: A financial report that summarizes transactions over a specific period, including order revenue, fees, refunds, and adjustments.
- Payout: The actual transfer of funds from the e-commerce platform to the seller’s bank account.
- Reconciliation: The process of matching settlement data with actual received payments and internal order records.
- Fees: Charges applied by e-commerce platforms for their services (e.g., referral fees, fulfillment fees).
- Adjustments: Corrections or changes to settlement amounts due to various factors (e.g., customer claims, charge backs).
Setting Up Your Environment
- Sign up for StateSet at StateSet.com/sign-up
- Generate an API key in the StateSet Cloud Console
- Install the StateSet Node.js SDK:
- Set up environment variables:
- Initialize the StateSet client:
StateSet API Integration
First, let’s set up the core functionality using StateSet’s API:TikTok Shop Integration
Now, let’s integrate TikTok Shop settlements:Amazon Integration
Integrate Amazon Seller Central settlements:Shopify Integration
Integrate Shopify settlements:Consolidating Settlement Data
Now that we have integrations for each platform, let’s create a function to consolidate all settlement data:Reporting and Analytics
Create summary reports and analytics based on the consolidated data:Automated Reconciliation
Implement an automated reconciliation process to match settlements with internal order data:Error Handling and Logging
Implement robust error handling and logging:Next steps
Order operations
The pipeline that produces the orders being settled.
COGS quickstart
The cost side of the same transaction.
Reporting
Period reports that reconcile settlements.
Payments API
Endpoint reference for the payment records.