Skip to main content

Base URLs

Eventop provides separate environments for testing and production:
https://api-devnet.eventop.xyz
Your API key automatically determines which environment you’re using:
  • Keys starting with sk_test_ use Devnet
  • Keys starting with sk_live_ use Mainnet

Authentication

All API requests require authentication using your API key in the Authorization header:
curl https://api.eventop.xyz/checkout/create \
  -H "Authorization: Bearer sk_live_abc123..."
Never expose your API keys in client-side code! Always make API calls from your backend.

Getting Your API Key

  1. Log in to dashboard.eventop.xyz
  2. Navigate to Settings → API Keys
  3. Click Create API Key
  4. Choose environment (Devnet or Mainnet)
  5. Copy your key (shown only once!)

Rate Limits

  • Checkout Creation: 100 requests per minute
  • Other Endpoints: 1000 requests per minute
  • Webhooks: No limit (we call you)
Rate limit headers are included in all responses:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1701234567

Errors

Eventop uses standard HTTP status codes and returns error details in JSON format.

Error Response Format

{
  "error": {
    "code": "invalid_request",
    "message": "Plan not found or inactive",
    "param": "planId"
  }
}

Status Codes

CodeDescription
200Success
400Bad Request - Invalid parameters
401Unauthorized - Invalid API key
404Not Found - Resource doesn’t exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Error Codes

CodeDescription
authentication_errorInvalid or expired API key
invalid_requestRequest parameters are invalid
not_foundResource not found
plan_inactivePlan is not active
session_expiredCheckout session has expired
rate_limit_exceededToo many requests

Pagination

List endpoints support pagination using page and limit parameters:
GET /api/subscriptions?page=2&limit=50
Response includes pagination metadata:
{
  "data": [...],
  "pagination": {
    "page": 2,
    "limit": 50,
    "total": 247,
    "pages": 5
  }
}

Idempotency

Checkout session creation is idempotent. Sending the same request multiple times will return the same session (if not expired). To ensure idempotency, include an idempotency_key in your request:
{
  "planId": "premium-monthly",
  "customerEmail": "user@example.com",
  "successUrl": "https://yourdomain.com/success",
  "idempotency_key": "unique-key-123"
}

Webhooks

Webhooks provide real-time notifications for subscription events. See the Webhook Integration Guide for details.

SDK Libraries

Node.js

    npm install @eventop/sdk

Need Help?