🔐 Authentication
All API requests require authentication using your API key:
X-Api-Key: spay_your_api_key_here
Or using Bearer token:
Authorization: Bearer spay_your_api_key_here
📦 Merchants
GET
/merchants
List all merchants
GET
/merchants/{merchantId}
Get merchant details
POST
/merchants
Create a new merchant
🏪 Stores
GET
/merchants/{merchantId}/stores
List merchant stores
POST
/merchants/{merchantId}/stores
Create a new store
💳 Terminals
GET
/merchants/{merchantId}/stores/{storeId}/terminals
List store terminals
POST
/merchants/{merchantId}/stores/{storeId}/terminals
Create a new terminal
💰 Transactions
GET
/transactions
List transactions
GET
/transactions/{transactionId}
Get transaction details
POST
/transactions/{transactionId}/refund
Refund a transaction
📊 Rate Limits
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests per minute |
X-RateLimit-Remaining | Remaining requests in current window |
🚨 Error Handling
All errors follow this format:
{
"error": "Error Type",
"message": "Detailed error message"
}
| Status | Description |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid API key |
| 403 | Forbidden - API key deactivated |
| 404 | Not Found - Resource doesn't exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Server Error - Contact support |
📞 Support
Need help? Contact us at support@sagapay.no