Environment
API environment configuration for production use.
Paysera Checkout API configuration for production use.
Base URL​
All API requests use the production base URL:
https://api.paysera.com
API Endpoints​
Authentication​
| Endpoint | URL |
|---|---|
| Token | https://api.paysera.com/auth/realms/Paysera/protocol/openid-connect/token |
Orders​
| Endpoint | URL |
|---|---|
| Create Order | https://api.paysera.com/merchant-order/integration/v1/orders |
| Get Order | https://api.paysera.com/merchant-order/integration/v1/orders/{id} |
Payment Links​
| Endpoint | URL |
|---|---|
| Create Link | https://api.paysera.com/checkout-payment-link/integration/v1/payment-links |
Payment Methods​
| Endpoint | URL |
|---|---|
| Get Methods | https://api.paysera.com/checkout-project/integration/v1/methods |
Configuration Examples​
Environment Variables​
Store configuration in environment variables:
# .env
PAYSERA_CLIENT_ID=your-client-id
PAYSERA_CLIENT_SECRET=your-client-secret
PAYSERA_PROJECT_ID=your-project-id
PAYSERA_API_URL=https://api.paysera.com
PHP Configuration​
<?php
class PayseraConfig
{
private const BASE_URL = 'https://api.paysera.com';
public static function getBaseUrl(): string
{
return self::BASE_URL;
}
public static function getTokenUrl(): string
{
return self::BASE_URL . '/auth/realms/Paysera/protocol/openid-connect/token';
}
}
Webhook Configuration​
Configure your webhook URL for receiving payment notifications:
<?php
$webhookUrl = 'https://your-site.com/webhooks/paysera';
Testing Webhooks Locally​
For local development, use tunneling tools to expose your local server:
- ngrok - Expose local server to internet
- localtunnel - Alternative tunneling service
- webhook.site - Inspect webhook payloads
Example with ngrok:
# Start ngrok
ngrok http 8000
# Use the ngrok URL as your callback URL
# https://abc123.ngrok.io/webhooks/paysera
Rate Limits​
All integration API endpoints are rate limited to 50 requests per minute per client IP address.
When the limit is exceeded, the API returns HTTP 429 Too Many Requests. Every response includes rate limit headers:
| Header | Description |
|---|---|
X-RateLimit-Limit | Total requests allowed in the current time window |
X-RateLimit-Remaining | Requests remaining in the current time window |
X-RateLimit-Reset | Seconds until the rate limit window resets |