API Reference Overview
Base URL
https://api.paylinks.ro/api/v1
All endpoints are relative to this base URL.
Authentication
Protected endpoints require a JWT bearer token:
Authorization: Bearer <token>
See Authentication for how to obtain a token.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes (protected) | Bearer <JWT token> |
Content-Type | Yes (POST/PUT/PATCH) | application/json |
X-Currency | No | RON, EUR, or GBP (default: RON) |
Amount Format
Transactional endpoints generally accept amounts in minor units (bani for RON, cents for EUR/GBP), while some read models expose values in major units for UI display.
| Display | API Value | Currency |
|---|---|---|
| 49.99 RON | 4999 | RON |
| 10.00 EUR | 1000 | EUR |
| 1.50 GBP | 150 | GBP |
1 RON = 100 bani. Check each endpoint contract for exact request/response amount format.
Currencies
PayLinks supports three currencies:
- RON — Romanian Leu (default)
- EUR — Euro
- GBP — British Pound
Set the currency via the X-Currency header.
Pagination
Pagination is endpoint-specific:
- Many list endpoints use cursor params (
limit,cursor) and returnitems+ optionalnextCursor. - Some list endpoints return only
items(without cursor metadata). - Disputes endpoints use
limit+offset.
# Example list call
curl "https://api.paylinks.ro/api/v1/paylinks?limit=20"
Example response format for cursor-style endpoints:
{
"items": [...],
"nextCursor": "cuid_or_cursor"
}
| Parameter | Type | Default | Max |
|---|---|---|---|
limit | integer | 50 | 100 |
cursor | string | — | — |
Some endpoints (disputes) use offset-based pagination with limit and offset parameters.
Error Format
All errors follow a consistent format:
{
"error": {
"message": "Human-readable error description",
"code": "OPTIONAL_ERROR_CODE"
}
}
Common HTTP Status Codes
| Status | Meaning |
|---|---|
200 | Success |
201 | Created |
400 | Bad request / validation error |
401 | Unauthorized (missing or invalid token) |
403 | Forbidden (insufficient permissions) |
404 | Resource not found |
500 | Internal server error |
Rate Limiting
The API applies rate limiting per IP and per user. If you exceed the limit, you'll receive a 429 Too Many Requests response. Wait and retry with exponential backoff.
API Modules
| Module | Description |
|---|---|
| Auth | Magic link and Google OAuth |
| PayLinks | Create and manage payment links |
| Transactions | Transaction history and refunds |
| Customers | Customer segments |
| Analytics | Revenue and MRR data |
| Stripe | Stripe Connect, payouts, balance |
| Disputes | Payment disputes |
| Settings | Account settings |
| Subscriptions | Recurring subscriptions |
| Purchases | Buyer purchases |
| Broadcasts and subscribers | |
| Uploads | File uploads |
| Admin | Admin-only endpoints |
| Public | Public checkout endpoints |