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

@v7-pay/sdk

v0.4.13

Published

V7 Pay API SDK for JavaScript/TypeScript. Use in backend (createSession, getSession) and frontend (tokenizeCard).

Readme

@v7-pay/sdk

V7 Pay API SDK for JavaScript/TypeScript. Covers all API methods plus tokenization (frontend-only).

Installation

npm install @v7-pay/sdk

Usage

Auth (backend)

import { getAccessToken } from "@v7-pay/sdk";

const { access_token } = await getAccessToken(baseUrl, clientId, clientSecret);

Plans (backend)

import { listPlans, createPlan, getPlan, deletePlan } from "@v7-pay/sdk";

const { data: plans } = await listPlans(baseUrl, accessToken, {
  limit: 50,
  offset: 0,
});
const plan = await createPlan(baseUrl, accessToken, {
  name: "Pro",
  amount: 9990,
  interval: "MONTHLY",
});
const p = await getPlan(baseUrl, accessToken, planId);
await deletePlan(baseUrl, accessToken, planId);

Checkout sessions (backend)

import {
  createSession,
  listSessions,
  getSession,
  cancelSession,
} from "@v7-pay/sdk";

const session = await createSession(baseUrl, accessToken, {
  amount: 9990,
  currency: "BRL",
});
// Redirect: window.location = `${baseUrl}/checkout/${session.id}`

const { data: sessions } = await listSessions(baseUrl, accessToken);
const s = await getSession(baseUrl, accessToken, sessionId);
await cancelSession(baseUrl, accessToken, sessionId);

Buyers (backend)

import { listBuyers, createBuyer } from "@v7-pay/sdk";

const { data: buyers } = await listBuyers(baseUrl, accessToken, { limit: 50 });
const buyer = await createBuyer(baseUrl, accessToken, {
  firstName: "João",
  lastName: "Silva",
  email: "[email protected]",
  phone: "11999999999",
});

Bank accounts (backend)

import { getBankAccount, createBankAccount } from "@v7-pay/sdk";

const bankAccount = await getBankAccount(baseUrl, accessToken);

const { id } = await createBankAccount(baseUrl, accessToken, {
  holderName: "Empresa LTDA",
  bankCode: "001",
  routingNumber: "1234",
  accountNumber: "12345-6",
  accountType: "checking",
});

Subscriptions (backend)

import {
  listSubscriptions,
  getSubscription,
  updateSubscription,
  cancelSubscription,
  suspendSubscription,
  reactivateSubscription,
} from "@v7-pay/sdk";

const { data: subscriptions } = await listSubscriptions(baseUrl, accessToken, {
  limit: 50,
  offset: 0,
});
const sub = await getSubscription(baseUrl, accessToken, subscriptionId);
await updateSubscription(baseUrl, accessToken, subscriptionId, { plan: newPlanId });
await suspendSubscription(baseUrl, accessToken, subscriptionId);
await reactivateSubscription(baseUrl, accessToken, subscriptionId);
await cancelSubscription(baseUrl, accessToken, subscriptionId);

Transactions (backend)

import { listTransactions, voidTransaction } from "@v7-pay/sdk";

const { data: transactions } = await listTransactions(baseUrl, accessToken, {
  limit: 50,
});
const voided = await voidTransaction(baseUrl, accessToken, transactionId);

Transfers (backend)

import { listTransfers, listTransferTransactions } from "@v7-pay/sdk";

const { data: transfers } = await listTransfers(baseUrl, accessToken, {
  limit: 50,
  sort: "time-descending",
  status: "succeeded",
});
const { data: txInTransfer } = await listTransferTransactions(baseUrl, accessToken, transferId);

Receivables (backend)

import { listReceivables } from "@v7-pay/sdk";

const { data: receivables } = await listReceivables(baseUrl, accessToken, {
  limit: 50,
  page: 1,
  sort: "time-descending",
  status: "pending",
});

Future transfers (backend)

import { listFutureTransfers } from "@v7-pay/sdk";

const { data: futureTransfers } = await listFutureTransfers(baseUrl, accessToken, {
  expectedOnRangeGte: Date.now(),
  expectedOnRangeLte: Date.now() + 7 * 24 * 60 * 60 * 1000,
});

Tokenize (frontend only, PCI-safe)

Card payments use credit card only (no debit).

import { tokenizeCard } from "@v7-pay/sdk";

const { tokenId } = await tokenizeCard(baseUrl, {
  sessionId: "...",
  holderName: "...",
  cardNumber: "...",
  expirationMonth: "MM",
  expirationYear: "YYYY",
  securityCode: "...",
});

API summary

| Method | Endpoint | Context | | ------------------- | ------------------------------------- | ---------------------------- | | getAccessToken | POST /api/auth/token | Backend | | listPlans | GET /api/v1/plans | Backend | | createPlan | POST /api/v1/plans | Backend | | getPlan | GET /api/v1/plans/{id} | Backend | | deletePlan | DELETE /api/v1/plans/{id} | Backend | | createSession | POST /api/v1/checkout/sessions | Backend | | listSessions | GET /api/v1/checkout/sessions | Backend | | getSession | GET /api/v1/checkout/sessions/{id} | Backend | | cancelSession | DELETE /api/v1/checkout/sessions/{id} | Backend | | listBuyers | GET /api/v1/buyers | Backend | | createBuyer | POST /api/v1/buyers | Backend | | getBankAccount | GET /api/v1/bank-accounts | Backend | | createBankAccount | POST /api/v1/bank-accounts | Backend | | listSubscriptions | GET /api/v1/subscriptions | Backend | | getSubscription | GET /api/v1/subscriptions/{id} | Backend | | updateSubscription| PUT /api/v1/subscriptions/{id} | Backend | | cancelSubscription| DELETE /api/v1/subscriptions/{id} | Backend | | suspendSubscription | POST /api/v1/subscriptions/{id}/suspend | Backend | | reactivateSubscription | POST /api/v1/subscriptions/{id}/reactivate | Backend | | listTransactions | GET /api/v1/transactions | Backend | | voidTransaction | POST /api/v1/transactions/{id}/void | Backend (transactions:write) | | listTransfers | GET /api/v1/transfers | Backend (transfers:read) | | listTransferTransactions | GET /api/v1/transfers/{id}/transactions | Backend (transfers:read) | | listReceivables | GET /api/v1/receivables | Backend (receivables:read) | | listFutureTransfers | GET /api/v1/future-transfers | Backend (future_transfers:read) | | tokenizeCard | GET tokenize-config + direct tokenization | Frontend only (PCI-safe) |