Orders API: The Foundation of Digital Commerce
The Orders API is the core of StateSet Commerce Network, providing comprehensive order lifecycle management from creation to fulfillment. With native USDC integration, real-time tracking, and enterprise-grade automation, it’s designed to handle millions of orders with sub-second latency.🚀 Quick Start
🎯 Key Features
Native USDC Payments
- Pay fees in USDC (no gas token required)
- Instant settlement with Circle integration
- Built-in refund and partial payment support
- Cross-chain transfers via IBC
Enterprise Automation
- Smart contract workflows
- Automated fraud detection
- Inventory management integration
- Real-time webhook notifications
Global Scale
- 10,000+ orders per second
- Sub-second transaction finality
- 99.99% uptime SLA
- Multi-region data replication
📊 Order Lifecycle
Order States
State | Description | Next States |
---|---|---|
CREATED | Order created, awaiting payment | PAID , CANCELLED |
PAID | Payment confirmed | FULFILLED , HELD , REFUNDED |
FULFILLED | Items prepared for shipping | SHIPPED , CANCELLED |
SHIPPED | Order in transit | DELIVERED , RETURNED |
DELIVERED | Order completed successfully | RETURNED |
HELD | Order temporarily paused | RELEASED , CANCELLED |
CANCELLED | Order cancelled | Terminal state |
RETURNED | Order returned by customer | REFUNDED |
REFUNDED | Refund processed | Terminal state |
DISPUTED | Order under dispute | RESOLVED |
💻 API Reference
Create Order
Pay Order
Get Order
List Orders
Parameter | Type | Description |
---|---|---|
customer_id | string | Filter by customer ID |
status | string | Filter by order status |
created_after | string | Orders created after this date (ISO 8601) |
created_before | string | Orders created before this date (ISO 8601) |
amount_min | string | Minimum order amount |
amount_max | string | Maximum order amount |
limit | integer | Number of orders to return (max 100) |
offset | integer | Number of orders to skip |
🔄 Advanced Features
Bulk Order Operations
Subscription Orders
Smart Contract Integration
Multi-Party Orders
📡 Webhooks & Events
Event Types
Event | Description | Payload |
---|---|---|
order.created | New order created | { order, customer } |
order.paid | Payment completed | { order, payment } |
order.fulfilled | Order fulfilled | { order, items } |
order.shipped | Order shipped | { order, tracking } |
order.delivered | Order delivered | { order, delivery } |
order.cancelled | Order cancelled | { order, reason } |
order.refunded | Refund processed | { order, refund } |
order.disputed | Dispute opened | { order, dispute } |
Webhook Configuration
🔍 Analytics & Reporting
Order Analytics
Custom Reports
🛡️ Security & Compliance
Fraud Detection
PCI DSS Compliance
GDPR Compliance
🌍 Global Commerce Features
Multi-Currency Support
Cross-Border Tax Calculation
Regulatory Compliance
🔧 SDK Examples
Node.js / TypeScript
Python
Go
Rust
🚀 Performance & Scale
Benchmarks
Operation | Throughput | Latency (p95) | Cost |
---|---|---|---|
Create Order | 10,000 ops/sec | 45ms | $0.001 |
Pay Order | 8,000 ops/sec | 65ms | $0.01 |
Update Status | 15,000 ops/sec | 25ms | $0.0005 |
Query Order | 50,000 ops/sec | 5ms | Free |
Scaling Patterns
Caching Strategy
📈 Monitoring & Observability
Metrics
Health Checks
🔗 Related APIs
- Orders Create - Create new orders
- Orders Pay - Process payments
- Orders Ship - Handle shipping
- Orders Refund - Process refunds
- Finance API - Financial instruments
- USDC Guide - Native USDC integration
Cross-Chain Payment Integration
StateSet Orders module natively integrates with the CCTP module to enable seamless cross-chain USDC payments. Customers can pay for orders on any supported chain, and the funds are automatically transferred to StateSet for settlement.Accepting Cross-Chain Payments
Automated Cross-Chain Settlement
Cross-Chain Refunds
Events
Additional events for cross-chain payments:Ready to get started? Create your first order →