SDK & API reference
Everything you need to integrate Jurivas billing into your product. All amounts are expressed in the currency's minor units (e.g. cents).
Getting started
Authenticate every request with a scoped API key from the API keys page. Pass it as a bearer token in the Authorization header.
npm install @jurivas/sdkhttps://api.jurivas.com/v1Create your first invoice
Tax is calculated automatically based on the customer's jurisdiction.
import { Jurivas } from '@jurivas/sdk';
const jurivas = new Jurivas({
apiKey: process.env.JURIVAS_API_KEY,
baseUrl: 'https://api.jurivas.com/v1',
});
// Create an invoice — tax is calculated automatically
const invoice = await jurivas.invoices.create({
customer: {
email: 'ada@acme.com',
name: 'Acme Inc.',
country: 'FR',
},
currency: 'eur',
lineItems: [
{
description: 'Pro plan — monthly',
quantity: 1,
unitPriceMinorUnits: 4900, // €49.00
},
],
});
console.log(invoice.id, invoice.totalMinorUnits);API endpoints
A complete, interactive reference is available in the API explorer.
Onboard your platform to Stripe Connect and manage payouts.
| Method | Endpoint | Description |
|---|---|---|
| POST | /connect/accounts | Create a connected account |
| GET | /connect/status | Get onboarding & payout status |
| POST | /connect/account-link | Generate an onboarding link |
| POST | /connect/login-link | Open the Stripe Express dashboard |
Define the pricing plans your customers subscribe to.
| Method | Endpoint | Description |
|---|---|---|
| GET | /plans | List pricing plans |
| POST | /plans | Create a plan |
| GET | /plans/{id} | Retrieve a plan |
| PUT | /plans/{id} | Update a plan |
Manage your platform subscription and billing cycle.
| Method | Endpoint | Description |
|---|---|---|
| GET | /subscriptions/mine | Get the current subscription |
| POST | /subscriptions | Create a subscription |
| PUT | /subscriptions/{id} | Change plan |
| DELETE | /subscriptions/{id} | Cancel a subscription |
Create invoices with automatic multi-jurisdiction tax.
| Method | Endpoint | Description |
|---|---|---|
| GET | /invoices | List invoices (paginated) |
| POST | /invoices | Create an invoice |
| GET | /invoices/{id} | Retrieve an invoice |
| POST | /invoices/{id}/void | Void an invoice |
Track collected payments, platform fees and net payouts.
| Method | Endpoint | Description |
|---|---|---|
| GET | /payments | List payments (paginated) |
| GET | /payments/{id} | Retrieve a payment |
Calculate tax in real time across jurisdictions.
| Method | Endpoint | Description |
|---|---|---|
| POST | /tax/calculate | Calculate tax for a transaction |
Issue scoped keys for server-to-server access.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api-keys | List API keys |
| POST | /api-keys | Create an API key |
| DELETE | /api-keys/{id} | Revoke / delete a key |
Subscribe to signed real-time billing events.
| Method | Endpoint | Description |
|---|---|---|
| GET | /webhooks/endpoints | List endpoints |
| POST | /webhooks/endpoints | Create an endpoint |
| PUT | /webhooks/endpoints/{id} | Update an endpoint |
| POST | /webhooks/endpoints/{id}/test | Send a test event |
Verifying webhook signatures
Every delivery is signed so you can trust it came from Jurivas.
Each request carries a Jurivas-Signature header — an HMAC SHA-256 of the raw request body using your endpoint's signing secret. Compare it against your own computation before acting on the event.
import crypto from 'crypto';
function verify(rawBody, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(rawBody)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected),
);
}