Skip to content
@pulgueta/wompi
Esc
navigateopen⌘Jpreview
On this page

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 zod
pnpm add @pulgueta/wompi zod
yarn add @pulgueta/wompi zod
bun add @pulgueta/wompi zod

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.

Was this page helpful?