API Reference
This document provides a comprehensive reference of all SplitRoute API endpoints.
Base URL
All API endpoints are relative to the base URL:
https://api.splitroute.com
Authentication
Most endpoints require authentication using an API key. Include your API key in the X-API-Key
header:
HTTP
1 X-API-Key: your_api_key_here
Endpoints
Invoices
Method | Endpoint | Description | Authentication |
---|---|---|---|
POST | /api/v1/invoices | Create a new invoice | API Key (optional for free tier) |
GET | /api/v1/invoices/{invoice_id} | Get invoice by ID | None |
GET | /api/v1/invoices/secret/{secret_id} | Get invoice by secret ID | None |
API Keys
Method | Endpoint | Description | Authentication |
---|---|---|---|
POST | /api/v1/api-keys/register | Register for a free API key | None |
POST | /api/v1/api-keys/purchase | Purchase a paid API key tier | API Key |
Currencies
Method | Endpoint | Description | Authentication |
---|---|---|---|
GET | /api/v1/currencies | Get supported currencies | None |
WebSockets
Endpoint | Description | Authentication |
---|---|---|
wss://api.splitroute.com/api/v1/ws/invoices/{invoice_id} | Invoice status updates | None |
Request and Response Formats
For detailed information about request and response formats for each endpoint, please refer to the specific documentation sections:
Status Codes
The API uses standard HTTP status codes:
Status Code | Description |
---|---|
200 OK | The request was successful |
201 Created | The resource was successfully created |
400 Bad Request | The request was invalid or cannot be served |
401 Unauthorized | Authentication is required or failed |
403 Forbidden | The authenticated user doesn't have permission |
404 Not Found | The requested resource doesn't exist |
422 Unprocessable Entity | The request was well-formed but contains semantic errors |
429 Too Many Requests | Rate limit exceeded |
500 Internal Server Error | An error occurred on the server |
Error Handling
Error responses follow a consistent format:
JSON
1 { 2 "error": "error_code", 3 "message": "Human-readable error message", 4 "details": { 5 "field": "Additional information about the error" 6 } 7 }
For more information about error handling, see Error Handling.
Rate Limits
Rate limits vary based on your API key tier:
Tier | Rate Limit | Burst Limit |
---|---|---|
No AUTH | 1000 requests/hour shared | 100 requests/minute shared |
FREE | 1000 requests/hour | 100 requests/minute |
BASIC | 2000 requests/hour individual | 100 requests/minute |
PRO | 5000 requests/hour individual | 200 requests/minute |
ENTERPRISE | 20000 | 500 requests/minute |
For more information about rate limits, see Rate Limits.