Skip to main content

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

HeaderRequiredDescription
AuthorizationYes (protected)Bearer <JWT token>
Content-TypeYes (POST/PUT/PATCH)application/json
X-CurrencyNoRON, 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.

DisplayAPI ValueCurrency
49.99 RON4999RON
10.00 EUR1000EUR
1.50 GBP150GBP

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 return items + optional nextCursor.
  • 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"
}
ParameterTypeDefaultMax
limitinteger50100
cursorstring

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

StatusMeaning
200Success
201Created
400Bad request / validation error
401Unauthorized (missing or invalid token)
403Forbidden (insufficient permissions)
404Resource not found
500Internal 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

ModuleDescription
AuthMagic link and Google OAuth
PayLinksCreate and manage payment links
TransactionsTransaction history and refunds
CustomersCustomer segments
AnalyticsRevenue and MRR data
StripeStripe Connect, payouts, balance
DisputesPayment disputes
SettingsAccount settings
SubscriptionsRecurring subscriptions
PurchasesBuyer purchases
EmailBroadcasts and subscribers
UploadsFile uploads
AdminAdmin-only endpoints
PublicPublic checkout endpoints