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

paymongo-api-client

v2.2.0

Published

Paymongo API Integration

Readme

Paymongo API Client

A lightweight client-side API Integration for Paymongo API.

Installation

npm install paymongo-api-client

Environment Variables

following variables have to be declared in your application environment .env

PAYMONGO_VERSION=v1
PAYMONGO_PUBLIC_KEY=<ACCOUNT API PUBLIC KEY>
PAYMONGO_SECRET_KEY=<ACCOUNT SECRET KEY>

Usage

Import the package in your project by.

import paymongo from 'paymongo-api-client'

Payment Method

A PaymentMethod resource describes which payment method was used to fulfill a payment. It is used with a PaymentIntent to collect payments.
Creating a Payment Method

paymongo.PaymentMethod.create(attributes)

The attributes nedded to create a Payment Method are documented here
Retrieving a Payment Method

paymongo.PaymentMethod.retrive(methodId)

Payment Intent

A PaymentIntent resource is used to track and handle different states of the payment until it succeeds. for a more detailed explanation on how Payment Intent works, you can refer to their official documentation here
Creating a Payment Intent

paymongo.PaymentIntent.create(attributes)

The attributes nedded to create a Payment Intent are documented here
Retrieving a Payment Intent

paymongo.PaymentIntent.retrive(intentId)

Attaching a Payment Method to a Payment Intent

paymongo.PaymentIntent.attachPaymentMethod(intentId, attributes)

The attributes nedded to complete attaching a Payment Method to a Payment Intent are documented here

Payment

A Payment resource is an attempt by your customer to send you money in exchange for your product. This is a reference to an amount that you are expecting to receive if a payment resource with paid status becomes a part of a payout. If the payment status is failed, you can determine the reason for failure.
Creating a Payment

paymongo.Payment.create(attributes)

The attributes nedded to create Payment are documented here
Retrieving a Payment

paymongo.Payment.retrive(paymentId)

Retrieving a list of Payments

paymongo.Payment.list(params)

The params nedded to get a list of Payments are documented here

Source

A Source is a resource to generate your customer's payment instrument. This is normally used to generate check out URLs for e-wallet payments.
Creating a Source

paymongo.Source.create(attributes)

The attributes nedded to create Source are documented here
Retrieving a Source

paymongo.Source.retrive(sourceId)

Webhook

A Webhook resource primarily refers to a certain URL where we send events that are happening from your account.
Creating a Webhook

paymongo.Webhook.create(attributes)

The attributes nedded to create Webhook are documented here
Retrieve a Webhook

paymongo.Webhook.retrieve(webhookId)

Retrieve a list of Webhooks

paymongo.Webhook.list(attributes)

The params nedded to get a list of Webhooks are documented here
Enable a Webhook

paymongo.Webhook.enable(webhookId)

Disable a Webhook

paymongo.Webhook.disable(webhookid)

Update a Webhook

paymongo.Webhook.update(webhookid, atributes)

The attributes nedded to update Webhook are documented here