Skip to content

Developer Endpoints

Endpoints for developers to manage their tools and view earnings.

GET /v1/earnings

Get your earnings summary.

Auth: Developer secret key (Authorization: Bearer pyr_sk_live_xxx)

bash
curl https://api.payre.dev/v1/earnings \
  -H "Authorization: Bearer pyr_sk_live_xxx"

Response:

json
{
  "developerId": "dev_xxx",
  "totalEarnings": 145.30,
  "todayEarnings": 12.50,
  "byTool": {
    "search": 89.20,
    "generate": 56.10
  }
}

POST /v1/tools

Register a tool with a name and description.

Auth: Developer secret key

bash
curl -X POST https://api.payre.dev/v1/tools \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer pyr_sk_live_xxx" \
  -d '{
    "name": "search",
    "description": "Full-text search across documents",
    "price": 0.005
  }'

Response:

json
{
  "id": "tool_xxx",
  "name": "search",
  "description": "Full-text search across documents",
  "price": 0.005,
  "createdAt": "2026-04-04T12:00:00Z"
}

GET /v1/tools

List your registered tools.

Auth: Developer secret key

bash
curl https://api.payre.dev/v1/tools \
  -H "Authorization: Bearer pyr_sk_live_xxx"

Response:

json
{
  "tools": [
    {
      "id": "tool_xxx",
      "name": "search",
      "description": "Full-text search across documents",
      "price": 0.005,
      "totalCharges": 1250,
      "totalRevenue": 6.25
    }
  ]
}

GET /v1/top-ups

List top-up history (developer view: shows top-ups that resulted in charges to your tools).

Auth: Developer secret key

bash
curl https://api.payre.dev/v1/top-ups \
  -H "Authorization: Bearer pyr_sk_live_xxx"