API Reference
API Reference
Base URL, authentication, and conventions for the Rewardly REST API.
The Rewardly API is a REST API served from:
https://paybilt-rewards-api.fly.devAll endpoints live under /v1. Requests and responses are JSON.
Authentication
Authenticate every request with an API key in the Authorization header:
curl https://paybilt-rewards-api.fly.dev/v1/account \
-H "Authorization: Bearer rk_live_..."Create keys in the dashboard under Developers. Keys have read and/or
write scopes — listing and fetching needs read, anything that changes
state needs write. The key secret is shown once at creation.
Errors
Errors use a consistent envelope:
{ "error": "insufficient_funds", "message": "Wallet balance is too low for this reward" }| Status | Meaning |
|---|---|
400 | Malformed request — the message lists the invalid fields |
401 | Missing or invalid API key |
402 | Insufficient wallet balance |
403 | API key lacks the required scope |
404 | Resource not found (or owned by another merchant) |
422 | Valid shape, but the request can't be fulfilled |
429 | Rate limited — max 300 requests per minute |
Idempotency
POST /v1/rewards accepts an Idempotency-Key header. Retrying with the
same key replays the original response instead of sending a second reward.
See the idempotency guide.
Amounts
All monetary values are integer cents (valueCents: 2500 is $25.00).