Documentation Index
Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
Use this file to discover all available pages before exploring further.
API Reference
Complete documentation for all StateSet Commerce Network APIs. All API endpoints are RESTful and return JSON responses.๐ Base URLs
- Production
- Testnet
๐ Authentication
All requests must include your API key in the Authorization header:๐ Core APIs
Stablecoin API
Issue, redeem, and transfer ssUSD stablecoinsKey Endpoints:
POST /stablecoin/issuePOST /stablecoin/redeemPOST /stablecoin/transferGET /stablecoin/balance
Payments API
Process payments and handle transactionsKey Endpoints:
POST /payments/createGET /payments/{id}POST /payments/refundGET /payments/list
Orders API
Manage e-commerce orders and fulfillmentKey Endpoints:
POST /orders/createPATCH /orders/{id}POST /orders/{id}/fulfillGET /orders/list
Finance API
Trade finance, factoring, and lendingKey Endpoints:
POST /finance/invoices/factorPOST /finance/po/financePOST /finance/loans/createGET /finance/options
AI Agents API
Deploy and manage autonomous agentsKey Endpoints:
POST /agents/createPOST /agents/{id}/executeGET /agents/{id}/activityPATCH /agents/{id}/config
Global Commerce API
Cross-border trade and complianceKey Endpoints:
POST /global/orders/createPOST /global/compliance/checkGET /global/tax/calculatePOST /global/shipping/quote
๐ง Common Parameters
Pagination
Most list endpoints support pagination:| Parameter | Type | Description | Default |
|---|---|---|---|
limit | integer | Number of records to return | 10 |
starting_after | string | Cursor for pagination | null |
ending_before | string | Cursor for reverse pagination | null |
Filtering
List endpoints support filtering:Expanding Objects
Request nested objects in a single call:๐จ Request Format
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer token with your API key |
Content-Type | Yes* | application/json for POST/PUT/PATCH |
Idempotency-Key | No | Unique key for safe retries |
X-Account-Id | No | Act on behalf of a connected account |
Request Body
All POST, PUT, and PATCH requests accept JSON:๐ค Response Format
Success Response
Error Response
๐ Idempotency
Ensure safe retries with idempotency keys:๐ Rate Limits
| Plan | Requests/Second | Daily Limit | Burst |
|---|---|---|---|
| Free | 10 | 1,000 | 20 |
| Starter | 100 | 100,000 | 200 |
| Growth | 1,000 | 10,000,000 | 2,000 |
| Enterprise | Custom | Custom | Custom |
๐ CORS
The API supports CORS for browser-based requests:๐ Security
API Key Types
| Key Type | Prefix | Usage |
|---|---|---|
| Secret | sk_test_ / sk_live_ | Server-side only |
| Public | pk_test_ / pk_live_ | Client-side safe |
| Restricted | rk_test_ / rk_live_ | Limited permissions |
Best Practices
- Never expose secret keys in client-side code
- Use HTTPS for all requests
- Verify webhooks with signature validation
- Implement retry logic with exponential backoff
- Monitor rate limits and implement caching
๐ก Webhooks
Register webhooks to receive real-time events:๐งช Testing
Test Mode
Use test API keys to simulate transactions:- No real money movement
- Immediate transaction processing
- Special test card numbers available
Test Data
| Resource | Test ID Format | Example |
|---|---|---|
| Customer | cust_test_* | cust_test_123 |
| Payment | pay_test_* | pay_test_456 |
| Order | ord_test_* | ord_test_789 |
๐ฑ SDK Support
Official SDKs available for:Node.js
Python
Go
๐ Support Resources
API Status
Real-time API status and incidents
Postman Collection
Import our complete API collection
Discord Community
Get help from developers
Support Portal
Contact our support team