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

paymenter-api

v2.0.14

Published

A npm package to communicate with the Paymenter API

Readme

Paymenter API Wrapper

A Node.js API wrapper for interacting with the Paymenter API. This package provides an easy-to-use interface for managing tickets, invoices, and other related features for both clients and admins.

Official Documentation

Installation

You can install this wrapper via npm:

npm install @cptcr/paymenter-api

Usage

TypeScript Example

import { Admin, Client } from "@cptcr/paymenter-api";

// Example: Create a new ticket as a client
const newTicket = await Client.Ticket.create({
    panel: "https://yourshop.com",    // The domain for your Paymenter shop
    apikey: "clientApiKey",           // Your client API key
    title: "Test Ticket",            // The title of the ticket
    description: "Hello, this is a test ticket.",  // First message in the ticket
    priority: "high"                    // Ticket priority (high, low, or medium)
});

console.log(newTicket);  // Logs the response from the API after creating the ticket

JavaScript Example

// Import the Paymenter API wrapper
const { Admin, Client } = require("@cptcr/paymenter-api");

// Example: Create a new ticket as a client
Client.Ticket.create({
    panel: "https://yourshop.com",    // The domain for your Paymenter shop
    apikey: "clientApiKey",           // Your client API key
    title: "Test Ticket",            // The title of the ticket
    description: "Hello, this is a test ticket.",  // First message in the ticket
    priority: "high"                    // Ticket priority (high, low, or medium)
}).then(newTicket => {
    console.log(newTicket);  // Logs the response from the API
});

More Usage Examples

Admin: Ticket Operations

1. Create a New Ticket (Admin)

const newAdminTicket = await Admin.Ticket.create({
    panel: "https://yourshop.com",    // Shop domain URL
    apikey: "adminApiKey",             // Admin API key
    title: "New Admin Ticket",       // Ticket title
    message: "This is an admin-created ticket.",  // First message
    priority: "medium",                  // Priority level
    userId: 1234                       // User ID creating the ticket
});

console.log(newAdminTicket);  // Logs the response from the API

2. Get Ticket by ID (Admin)

const ticketDetails = await Admin.Ticket.getById({
    panel: "https://yourshop.com",    // Shop domain URL
    apikey: "adminApiKey",             // Admin API key
    ticketId: "ticket1234"               // Ticket ID to retrieve
});

console.log(ticketDetails);  // Logs ticket details retrieved from the API

3. Reply to a Ticket (Admin)

const replyResponse = await Admin.Ticket.reply({
    panel: "https://yourshop.com",    // Shop domain URL
    apikey: "adminApiKey",             // Admin API key
    ticketId: "ticket1234",              // Ticket ID to reply to
    message: "This is an admin reply."  // Message content
});

console.log(replyResponse);  // Logs the reply response from the API

4. Change Ticket Status (Admin)

const changeStatusResponse = await Admin.Ticket.changeStatus({
    panel: "https://yourshop.com",    // Shop domain URL
    apikey: "adminApiKey",             // Admin API key
    ticketId: "ticket1234",              // Ticket ID to change status
    status: "closed"                   // New status ("open" or "closed")
});

console.log(changeStatusResponse);  // Logs the response from the API

5. Get All Tickets (Admin)

const allTickets = await Admin.Ticket.getAll({
    panel: "https://yourshop.com",    // Shop domain URL
    apikey: "adminApiKey"              // Admin API key
});

console.log(allTickets);  // Logs a list of all tickets from the API

6. Get All Messages from a Ticket (Admin)

const messages = await Admin.Ticket.getAllMessages({
    panel: "https://yourshop.com",    // Shop domain URL
    apikey: "adminApiKey",             // Admin API key
    ticketId: "ticket1234"               // Ticket ID
});

console.log(messages);  // Logs all messages from the ticket

Disclaimer

This package is developed and maintained by cptcr and is not affiliated with the official Paymenter API.