Vendura is an open-source commerce infrastructure toolkit focused on correctness, reliability, and predictable systems.
import { createOrder } from "vendura";
const order = await createOrder({
amount: 5000,
currency: "INR",
customerId: "cus_123",
idempotencyKey: "unique-key-123",
});
console.log(order.id);2.4k
Stars10k+
Weekly Downloads50+
ContributorsOpen-Source Packages
Modular, composable, and production-ready. Use what you need, extend the rest.
How It Works
Built on proven patterns for payment processing. Deterministic, auditable, recoverable.
Every order follows a defined state machine. No hidden transitions. No silent failures.
Idempotency keys prevent duplicate charges. Automatic retries with exponential backoff.
Complete audit trail. Every state change logged. Debug with confidence.
Payment Created
Processed
Confirmed
Code Example
orders.ts
const order = await vendura
.orders
.create({
userId: "user_123",
items: [
{
productId: "prod_456",
quantity: 2,
price: 29.99,
}
],
gateway: "razorpay",
idempotencyKey: uuid(),
});
// Safe to call multiple times
const payment = await order.pay({
method: "card",
cardToken: token,
});
// Automatically handled:
// ✓ Idempotent
// ✓ State validated
// ✓ Webhook tracked
// ✓ Audit loggedEvery operation is bulletproof. Vendura handles edge cases so you don't have to.
Order follows valid state transitions. Invalid operations are rejected immediately.
Seen this request before? Return cached result. No double charge.
Gateway-agnostic interface. Razorpay, Stripe, or custom provider.
Save state. Queue webhook. Retry automatically if needed.
Why Vendura
We believe correctness should be default, not an afterthought.
Payments follow predictable paths. State machines eliminate ambiguity. Every transaction is auditable and recoverable.
Idempotency keys prevent duplicates. Automatic retries handle transient failures. Webhooks are guaranteed to be delivered.
Full audit trails. Detailed logging. Debug-friendly errors. Know exactly what happened at each step.
Simple APIs. Clear abstractions. Gateway-agnostic. Focus on your business logic, not payment plumbing.
Quick Start
Bootstrap your commerce app with all dependencies pre-configured.
$ npx create-vendura-app my-shopAdd your payment gateway credentials. Razorpay, Stripe, or custom.
VENDURA_RAZORPAY_KEY=key_...
VENDURA_RAZORPAY_SECRET=secret_...Create orders, process payments, handle webhooks. Reliability included.
const order = await vendura.orders.create({
userId: "user_123",
items: [...],
gateway: "razorpay"
});Open Source
MIT Licensed. Transparent development. Everyone can contribute.
Full source code. All discussions happen publicly. Star us on GitHub.
View on GitHub →
Transparent roadmap. Report bugs. Suggest features. Vote on priorities.
Check Issues →
Ask questions. Share ideas. Learn from other developers.
Join Discussions →
2.4k
GitHub Stars
50+
Contributors
10k+
Weekly Downloads
6
Core Packages