Documentation

Everything you need to build with the PrimesRank API.

Getting Started

Welcome to the PrimesRank developer documentation. Our API allows you to programmatically manage your SaaS infrastructure, billing, and analytics.

Base URL

All API requests should be made to the following base URL:

https://api.primesranks.com/v1

API Authentication

Authenticate your API requests by including your secret API key in the Authorization header.

cURL
curl -X GET "https://api.primesranks.com/v1/account" \
  -H "Authorization: Bearer sk_live_your_secret_key" \
  -H "Content-Type: application/json"

Security Note: Never share your secret keys. Keep them secure and out of version control.

API Reference

Explore our core endpoints for managing users, subscriptions, and metrics.

POSTCreate a Customer

Creates a new customer object in your PrimesRank workspace.

Request Body
{
  "email": "jane.doe@example.com",
  "name": "Jane Doe",
  "metadata": {
    "internal_id": "usr_89324"
  }
}

Webhooks

Listen for asynchronous events in your PrimesRank account. Configure webhook endpoints in your dashboard to receive real-time updates.

  • customer.created

    Occurs whenever a new customer is created.

  • subscription.updated

    Occurs whenever a subscription changes (e.g., plan upgrade).

  • invoice.paid

    Occurs whenever an invoice payment succeeds.

Official SDKs

We provide official libraries for popular programming languages to make integration seamless.

Node.js

npm install @primesranks/node

Python

pip install primesranks

Ruby

gem install primesranks

Go

go get github.com/primesranks/go

Billing Integration

Integrate our drop-in billing UI or build a custom checkout flow using our API.

  1. 1

    Create a Checkout Session

    Generate a secure session URL for your customer to complete their purchase.

  2. 2

    Handle the Redirect

    Redirect the user to the generated URL. They will be sent back to your success URL afterward.

  3. 3

    Provision Access

    Listen for the checkout.completed webhook to grant access to your product.

Need Help?

Can't find what you're looking for? Our developer support team is ready to help you integrate PrimesRank.

Contact Support