💸
Paymongo for Node.js
OSSPHBlog
  • Paymongo for Node.js!
  • Quick Start
  • Reference
    • API Reference
      • Links
      • Payments
      • Payment Intents
      • Payment Methods
      • Refunds
      • Sources
      • Webhooks
  • Test Cards
  • Change Logs
  • FAQs
Powered by GitBook
On this page
  • Install
  • Usage
  • Example

Was this helpful?

Export as PDF

Quick Start

Install

Install using either yarn or npm.

# Install via Yarn
yarn add paymongo
# Install via NPM
npm install paymongo --save

Usage

Now, it's time to import the paymongo into your app.

import Paymongo from 'paymongo';

const paymongo = new Paymongo(process.env.SECRET_KEY);

You must retrieve the secret key from your paymongo dashboard, under the developers tab.

Example

import Paymongo from 'paymongo';

const paymongo = new Paymongo(process.env.SECRET_KEY);

async function listWebhooks () {
  return paymongo.webhooks.list();
}

listWebhooks()
  .then((result) => { /** Handle result **/ })
  .catch();
PreviousPaymongo for Node.js!NextAPI Reference

Last updated 3 years ago

Was this helpful?