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
1X-API-Key: your_api_key_here

Endpoints

Invoices

MethodEndpointDescriptionAuthentication
POST/api/v1/invoicesCreate a new invoiceAPI Key (optional for free tier)
GET/api/v1/invoices/{invoice_id}Get invoice by IDNone
GET/api/v1/invoices/secret/{secret_id}Get invoice by secret IDNone

API Keys

MethodEndpointDescriptionAuthentication
POST/api/v1/api-keys/registerRegister for a free API keyNone
POST/api/v1/api-keys/purchasePurchase a paid API key tierAPI Key

Currencies

MethodEndpointDescriptionAuthentication
GET/api/v1/currenciesGet supported currenciesNone

WebSockets

EndpointDescriptionAuthentication
wss://api.splitroute.com/api/v1/ws/invoices/{invoice_id}Invoice status updatesNone

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 CodeDescription
200 OKThe request was successful
201 CreatedThe resource was successfully created
400 Bad RequestThe request was invalid or cannot be served
401 UnauthorizedAuthentication is required or failed
403 ForbiddenThe authenticated user doesn't have permission
404 Not FoundThe requested resource doesn't exist
422 Unprocessable EntityThe request was well-formed but contains semantic errors
429 Too Many RequestsRate limit exceeded
500 Internal Server ErrorAn 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:

TierRate LimitBurst Limit
No AUTH1000 requests/hour shared100 requests/minute shared
FREE1000 requests/hour100 requests/minute
BASIC2000 requests/hour individual100 requests/minute
PRO5000 requests/hour individual200 requests/minute
ENTERPRISE20000500 requests/minute

For more information about rate limits, see Rate Limits.