Now Available

Developer-first Payments, Without the Headache

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

Stars

10k+

Weekly Downloads

50+

Contributors

Open-Source Packages

Everything you need

Modular, composable, and production-ready. Use what you need, extend the rest.

@vendura/core

Core payment and order management engine

2.4k8.5k/mo

@vendura/next

Next.js integration and server actions

1.8k6.2k/mo

@vendura/mongodb

MongoDB adapter for data persistence

0.9k3.4k/mo

@vendura/razorpay

Razorpay payment gateway abstraction

0.7k2.1k/mo

@vendura/webhooks

Robust webhook management and retries

1.1k4.0k/mo

@vendura/cli

Command-line tools for development

0.7k2.9k/mo

How It Works

Reliable by Design

Built on proven patterns for payment processing. Deterministic, auditable, recoverable.

Turn chaos into clarity

1

Deterministic States

Every order follows a defined state machine. No hidden transitions. No silent failures.

2

Safe Retries

Idempotency keys prevent duplicate charges. Automatic retries with exponential backoff.

3

Full Observability

Complete audit trail. Every state change logged. Debug with confidence.

Payment Created

Processed

Confirmed

Code Example

Simple API, Powerful Internals

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 logged

What happens inside

Every operation is bulletproof. Vendura handles edge cases so you don't have to.

1

Validate State

Order follows valid state transitions. Invalid operations are rejected immediately.

2

Check Idempotency

Seen this request before? Return cached result. No double charge.

3

Call Gateway

Gateway-agnostic interface. Razorpay, Stripe, or custom provider.

4

Persist & Webhook

Save state. Queue webhook. Retry automatically if needed.

Why Vendura

We built Vendura because
commerce systems fail silently.

We believe correctness should be default, not an afterthought.

🔄

Deterministic Flow

Payments follow predictable paths. State machines eliminate ambiguity. Every transaction is auditable and recoverable.

🛡️

Built for Reliability

Idempotency keys prevent duplicates. Automatic retries handle transient failures. Webhooks are guaranteed to be delivered.

🔍

Complete Observability

Full audit trails. Detailed logging. Debug-friendly errors. Know exactly what happened at each step.

🚀

Developer First

Simple APIs. Clear abstractions. Gateway-agnostic. Focus on your business logic, not payment plumbing.

Quick Start

Get Started in Minutes

1

Create Project

Bootstrap your commerce app with all dependencies pre-configured.

$ npx create-vendura-app my-shop
2

Configure Gateway

Add your payment gateway credentials. Razorpay, Stripe, or custom.

VENDURA_RAZORPAY_KEY=key_... VENDURA_RAZORPAY_SECRET=secret_...
3

Start Building

Create orders, process payments, handle webhooks. Reliability included.

const order = await vendura.orders.create({ userId: "user_123", items: [...], gateway: "razorpay" });