npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@biggora/paysera

v1.0.1

Published

TypeScript SDK and NestJS adapter for Paysera Checkout V3 API.

Readme

@biggora/paysera

npm version Unit Tests License: MIT

TypeScript SDK and NestJS adapter for Paysera Checkout V3.

Install

npm install @biggora/paysera

Create Client

import { createPayseraClient } from '@biggora/paysera';

const paysera = createPayseraClient({
  clientId: process.env.PAYSERA_CLIENT_ID!,
  clientSecret: process.env.PAYSERA_CLIENT_SECRET!,
});

Use baseUrl and tokenUrl when Paysera gives environment-specific endpoints:

const paysera = createPayseraClient({
  clientId: process.env.PAYSERA_CLIENT_ID!,
  clientSecret: process.env.PAYSERA_CLIENT_SECRET!,
  baseUrl: process.env.PAYSERA_BASE_URL,
  tokenUrl: process.env.PAYSERA_TOKEN_URL,
});

Orders

const order = await paysera.orders.create({
  order_id: 'order-1001',
  amount: {
    amount: '10.00',
    currency: 'EUR',
  },
  success_url: 'https://shop.example/checkout/success',
  cancel_url: 'https://shop.example/checkout/cancel',
  webhook_url: 'https://shop.example/paysera/webhook',
});

const sameOrder = await paysera.orders.read(order.id!);

Payments And Refunds

const payment = await paysera.payments.read('payment-id');

const refund = await paysera.refunds.create({
  payment_id: payment.id,
  amount: {
    amount: '10.00',
    currency: 'EUR',
  },
});

const sameRefund = await paysera.refunds.read(refund.id!);

Webhooks

Checkout V3 webhook signature verification is intentionally not guessed. Current Paysera public docs expose Checkout V3 webhooks, but do not expose a stable signature algorithm on the public page used for this SDK. Use parseWebhookEvent for typed raw-body parsing until Paysera documents signature headers and algorithm.

import { parseWebhookEvent } from '@biggora/paysera';

export async function handlePayseraWebhook(rawBody: Buffer) {
  const event = parseWebhookEvent(rawBody);

  if (event.event_type === 'payment.captured') {
    // update order state from event.data
  }

  return 'OK';
}

NestJS

import { Module } from '@nestjs/common';
import { PayseraModule } from '@biggora/paysera/nestjs';

@Module({
  imports: [
    PayseraModule.forRoot({
      clientId: process.env.PAYSERA_CLIENT_ID!,
      clientSecret: process.env.PAYSERA_CLIENT_SECRET!,
      baseUrl: process.env.PAYSERA_BASE_URL,
      tokenUrl: process.env.PAYSERA_TOKEN_URL,
    }),
  ],
})
export class AppModule {}
import { Controller, Post, Req } from '@nestjs/common';
import type { RawBodyRequest } from '@nestjs/common';
import type { Request } from 'express';
import { InjectPayseraClient, PayseraWebhookVerifier } from '@biggora/paysera/nestjs';
import type { PayseraClient } from '@biggora/paysera';

@Controller('paysera')
export class PayseraController {
  constructor(
    @InjectPayseraClient() private readonly paysera: PayseraClient,
    private readonly webhooks: PayseraWebhookVerifier,
  ) {}

  @Post('webhook')
  handleWebhook(@Req() req: RawBodyRequest<Request>) {
    return this.webhooks.parse(req.rawBody ?? Buffer.from(JSON.stringify(req.body ?? {})));
  }
}

Scripts

npm test
npm run typecheck
npm run build