Wompi SDK for Node.js
Integrate Wompi with a fully typed, error-first SDK for transactions, tokens, payment sources, payment links, and PSE.
Integrate Wompi in your Node.js applications with a small, fully typed client. Every request is validated with Zod and returns an error-first tuple, so success and failure stay explicit.
npm install @pulgueta/wompi zodpnpm add @pulgueta/wompi zodyarn add @pulgueta/wompi zodbun add @pulgueta/wompi zodQuickstart
Tokenize a sandbox card, sign an amount, and create your first transaction.
Examples
Review complete checkout implementations for popular server frameworks.
API reference
Explore merchants, transactions, tokens, payment sources, payment links, and PSE.
Package exports
Import the client, schemas, and server-only signature helpers from stable entry points.
One client, every Wompi flow
import { WompiClient } from "@pulgueta/wompi";
const wompi = new WompiClient({
publicKey: process.env.WOMPI_PUBLIC_KEY!,
privateKey: process.env.WOMPI_PRIVATE_KEY,
sandbox: true,
});
const [error, transaction] = await wompi.transactions.getTransaction("txn_123");
if (error) {
// Branch on error.type or statusCode without guessing response shapes.
throw error;
}
transaction.status; // "APPROVED" | "PENDING" | "DECLINED" | ...
Why this SDK
- Typed end to end. Request inputs and Wompi responses are validated with Zod.
- Error-first results. Network and API failures are values you must handle, not surprises hidden in a catch block.
- Tree-shakeable exports. Client, schemas, and server-only helpers have explicit package entry points.
- Framework neutral. Use it from Astro, Next.js, TanStack Start, Elysia, Bun, or plain Node.js.
Get started
Install the package, configure your environment, and verify your first Wompi request.