API Reference
The Selva API provides a comprehensive set of endpoints for payment processing, account management, and webhook subscriptions.
Interactive API Documentation
Explore all available endpoints, try requests, and view responses using our interactive API documentation powered by Scalar.
The API reference above is automatically generated from our OpenAPI specification and provides an interactive interface to explore all endpoints, view request/response schemas, and test API calls directly from your browser.
Endpoint Categories
Authentication
GET /oauth/authorize- Initiate OAuth authorization flowPOST /oauth/token- Exchange authorization code for access token
Accounts
GET /api/accounts- List all accountsPOST /api/accounts- Create a new accountGET /api/accounts/information- Get account informationGET /api/accounts/{identifier}/information- Get account information by identifierGET /api/accounts/{id}/balance- Get account balanceGET /api/accounts/{id}/details- Get account detailsGET /api/accounts/{id}/movements- Get account movementsGET /api/accounts/{id}/kyc- Get KYC statusGET /api/accounts/{id}/transactions/{transactionCode}- Get transaction by code
Payments
POST /api/payments- Create a paymentPOST /api/payments/validate- Validate payment detailsGET /api/payments/history- Get payment historyGET /api/payments/{id}- Get payment by ID
Verification
GET /api/phone/information- Get phone number informationGET /api/iban/information- Get IBAN information
Webhooks
GET /api/webhooks/subscriptions- List webhook subscriptionsPOST /api/webhooks/subscriptions- Create webhook subscriptionGET /api/webhooks/subscriptions/{id}- Get webhook subscriptionDELETE /api/webhooks/subscriptions/{id}- Delete webhook subscriptionPOST /api/NotifyIncomingTransfers- Incoming transfer webhook
System
GET /api/IsServiceAvailable- Check service availability
Request Format
All API requests use:
- Content-Type:
application/jsonfor POST requests - Authorization:
Bearer {access_token}header for authenticated requests - Idempotency: Include
X-Idempotency-Keyheader for payment requests
Response Format
All API responses use JSON format and include standard HTTP status codes:
200 OK- Request successful201 Created- Resource created successfully204 No Content- Request successful, no content to return400 Bad Request- Invalid request parameters401 Unauthorized- Invalid or missing authentication403 Forbidden- Insufficient permissions404 Not Found- Resource not found500 Internal Server Error- Server error503 Service Unavailable- Service temporarily unavailable
Rate Limits
API rate limits are applied per client and endpoint. Rate limit information is included in response headers:
X-RateLimit-Limit- Maximum number of requests allowedX-RateLimit-Remaining- Number of requests remainingX-RateLimit-Reset- Time when the rate limit resets
Pagination
List endpoints support pagination using limit and offset parameters:
GET /api/payments/history?limit=20&offset=0
Response includes pagination metadata:
{
"data": [...],
"limit": 20,
"offset": 0,
"total": 100,
"has_more": true
}
Filtering and Sorting
Many list endpoints support filtering and sorting. See individual endpoint documentation for available options.
Error Handling
All errors follow a consistent format:
{
"error": "error_code",
"message": "Human-readable error message",
"details": {}
}
See the Error Handling guide for detailed error codes and handling strategies.
OpenAPI Specification
Download the complete OpenAPI 3.0 specification:
You can use this specification to:
- Generate client SDKs
- Import into API testing tools (Postman, Insomnia)
- Generate documentation
- Validate requests and responses
SDKs and Code Examples
While the API can be called directly, you may find these helpful:
- Postman Collection: Import for testing
- Code Examples: See Common Workflows for integration patterns
Support
For questions about specific endpoints:
- Check the interactive API documentation above
- Review Common Workflows for usage examples
- Contact support at support@selva.fi.cr