— API & Developers
Build anything on top of Recura
A complete REST API with 120+ endpoints, typed SDKs in 5 languages, webhook documentation, and integration guides for every major platform.
120+ endpointsSDK in 5 languagesWebhook delivery
SDKs & Libraries
Node.js
v4.2.1Python
v3.1.8Ruby
v2.8.0Go
v1.5.2Laravel
v3.0.2Java
v1.4.0Rust
v1.1.5TypeScript
v2.1.0C#
v1.8.4Swift
v2.0.1Kotlin
v1.2.0PHP
v2.4.5Popular Endpoints
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| GET | /v1/subscriptions | List all subscriptions with pagination, filtering, and search | BEARER |
| POST | /v1/subscriptions | Create a new subscription with trial, proration, and plan options | BEARER |
| PUT | /v1/subscriptions/:id | Update plan, quantity, billing interval, or add-ons | BEARER |
| GET | /v1/invoices | List invoices by status, date range, or customer ID | BEARER |
| POST | /v1/invoices/:id/pay | Attempt payment on an outstanding invoice | BEARER |
| GET | /v1/customers/:id | Retrieve a customer with subscription and payment method history | BEARER |
| DEL | /v1/subscriptions/:id | Cancel a subscription immediately or at period end | BEARER |
Quick Start
quickstart.js
// Install: npm install @recura/sdk
import { Recura } from '@recura/sdk';
const client = new Recura({ apiKey: process.env.RECURA_API_KEY });
// Create a subscription
const sub = await client.subscriptions.create({
customer_id: 'cus_8f3a1b2c',
plan_id: 'plan_growth_annual',
trial_days: 14
});
console.log(sub.id);Webhooks: subscribing to billing lifecycle events
Set up endpoints, verify signatures, handle retries, and build idempotent event processors for every billing event.
Webhooks11 min
Authentication: API keys, OAuth 2.0, and key scoping
Best practices for API key management, rotating secrets, and restricting key permissions to minimum required scopes.
Auth8 min
Idempotency keys: safely retrying API requests
How to use idempotency keys to prevent duplicate subscriptions, payments, and customers during network failures.
Best practices6 min