For engineers
A developer experience we'd want to use.
Stable REST API, signed webhooks, deterministic test-mode replay, and typed SDKs for Node, Python, Go, and Rust — every SDK tracks the v1 API one-to-one and ships an OpenAPI 3.1 spec for any client we don't cover.
Install once, integrate in an afternoon.
Every SDK tracks the v1 API one-to-one. Test in test mode, fire synthetic events from the dashboard, go live when you're ready.
- Typed SDKs for Node, Python, Go, and Rust
- Idempotency keys and signed webhooks out of the box
- Synthetic event firing from the dashboard — same payload shape as live deliveries
- Versioned /v1 API — additive changes only, no forced upgrades
install
# Node
npm install @opensettle/sdk
# Python
pip install opensettle
# Go
go get github.com/OpenSettle/opensettle-sdk-go
# Rust
cargo add opensettle
# Or hit the REST API from any language
curl https://api.opensettle.io/v1/workspaces/$WORKSPACE_ID/checkouts \
-H "Authorization: Bearer sk_live_…"Code
One API. Four typed SDKs. Same shapes.
node
import { OpenSettle } from "@opensettle/sdk";
const os = new OpenSettle({
apiKey: process.env.OPENSETTLE_KEY!,
workspaceId: process.env.OPENSETTLE_WORKSPACE!,
});
const sub = await os.subscriptions.create({
customerId: "cus_9fX0a2E1",
priceId: "price_pro_monthly",
chain: "base",
token: "USDC",
autopay: "manual",
});subscription.py
import os
from opensettle import OpenSettle
client = OpenSettle(
api_key=os.environ["OPENSETTLE_API_KEY"],
workspace_id=os.environ["OPENSETTLE_WORKSPACE_ID"],
)
sub = client.subscriptions.create(
customerId="cus_9fX0a2E1",
priceId="price_pro_monthly",
chain="base",
token="USDC",
# "manual" = email-renewal one-click pay-link (every wallet, every chain).
# "allowance" = auto-pull, live on Base/Polygon/Arbitrum; "smart-wallet" is roadmap.
autopay="manual",
)webhook-verify.ts
import { verifyWebhook } from "@opensettle/sdk";
app.post("/webhook", (req, res) => {
const { data } = verifyWebhook<{ id: string; type: string }>({
rawBody: req.rawBody,
signatureHeader: req.header("x-opensettle-signature"),
secret: process.env.WEBHOOK_SIGNING_SECRET!,
});
if (data.type === "payment.confirmed") {
// Mark order paid, send receipt
}
res.sendStatus(200);
});subscription.rs
use opensettle::{
AutopayMode, ChainId, CreateSubscriptionRequest, OpenSettle, TokenSymbol,
};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = OpenSettle::builder(
std::env::var("OPENSETTLE_API_KEY")?,
std::env::var("OPENSETTLE_WORKSPACE_ID")?,
)
.build()?;
let sub = client
.subscriptions()
.create(&CreateSubscriptionRequest {
customer_id: "cus_9fX0a2E1".into(),
price_id: "price_pro_monthly".into(),
chain: ChainId::Base,
token: TokenSymbol::USDC,
// Manual = email-renewal pay-link (every wallet, every chain).
// Allowance auto-pull is live on Base/Polygon/Arbitrum;
// smart-wallet is roadmap (see /docs/subscriptions).
autopay: Some(AutopayMode::Manual),
trial_days: None,
metadata: None,
})
.await?;
println!("subscription {} status={:?}", sub.id, sub.status);
Ok(())
}