HTTP status codes, error shape, rate-limit headers, and per-plan quotas.

Errors & Rate Limits

The recv API uses standard HTTP status codes and a single, consistent JSON error shape.

HTTP status codes

CodeMeaning
200OK.
201Created (e.g. a new invoice).
204No content (successful action with no body).
400Bad request — missing/invalid parameter, unsupported network, non-cancellable invoice, or simulating a non-test invoice.
401Unauthorized — missing or invalid API key.
403Forbidden — plan does not include the API, missing scope, blocked workspace, or simulating with a live key.
404Not found — the resource doesn't exist in your workspace.
409Conflict — an Idempotency-Key was reused with a different body, or the original request is still processing.
429Too many requests — minute rate limit or monthly quota exceeded.
500Internal server error.

Error response body

Every error returns a JSON object with a single error field:

{ "error": "invalid API key" }

For security, 5xx responses return a generic {"error": "internal server error"} while the detail is logged server-side. 4xx responses surface the specific, request-shaped message (validation, auth, conflict), for example:

  • missing API key
  • invalid API key
  • API key scope invoices:write is required
  • current plan does not include recv Developer or recv Business API access
  • invalid base_amount_usd
  • only workspace-created invoices can be canceled
  • payment simulator is only available for test_ API keys
  • minute rate limit exceeded / monthly API quota exceeded

Rate-limit headers

Every authenticated /v1 response includes the current minute budget, and monthly budget where the plan has a cap:

HeaderDescription
X-RateLimit-Limit-MinuteRequests allowed per minute on your plan.
X-RateLimit-Remaining-MinuteRequests left in the current minute window.
X-RateLimit-Limit-MonthMonthly request cap (when set).
X-RateLimit-Remaining-MonthRequests left this calendar month (UTC).

Exceeding the minute limit or the monthly cap returns 429.

Per-plan quotas

API limits and webhook retry budgets are set by your workspace's active plan. The Merchant and Trial plans do not include API access.

PlanRate limitMonthly request capActive API keysWebhook retries
Developer90 req/min50,00033
Business300 req/min200,000105

Handling errors (Python)

import requests

resp = requests.get(
    "https://recv.money/v1/invoices/999999",
    headers={"X-API-Key": "YOUR_KEY"},
)

if resp.status_code == 404:
    print("Invoice not found.")
elif resp.status_code == 429:
    print("Rate/quota exceeded. Remaining this minute:",
          resp.headers.get("X-RateLimit-Remaining-Minute"))
elif not resp.ok:
    print("Error:", resp.json().get("error"))

Ready to accept crypto payments?