@pulgueta/wompi
v1.0.0
Published
El SDK de Wompi para Node.js
Maintainers
Readme
@pulgueta/wompi
This is the unofficial Wompi SDK. This package features a simpler abstraction for the Wompi API, making it easier to interact as a developer and to integrate into your projects.
Installation
To install this package, you can use NPM, Yarn, or PNPM:
npm install @pulgueta/wompiyarn add @pulgueta/wompipnpm add @pulgueta/wompiUsage
Let's break down the usage into a few steps:
Client
First, you need to create a client with your public keys:
import { WompiClient } from '@pulgueta/wompi/client';
const wompi = new WompiClient({
publicKey: 'your-public-key',
publicEventsKey: 'your-public-events-key',
eventsUrl: 'https://events.yourdomain.com',
});
// src/utils/index.ts
export const getLatestTransactions = async () => {
const transactions = await wompi.transactions.getTransactions();
return transactions;
};