Skip to main content

Getting Started

The Paymongo API Client helps you with communicating with the Paymongo servers. It's fully typed, so you can get great intellisense.

Installation#

npm install @paymongo/core

Create a Paymongo instance#

import Paymongo, { SecretKey } from '@paymongo/core';
const paymongo = new Paymongo(process.env.PAYMONGO_SECRET_KEY as SecretKey);
note

It can also be used in the browser.

import Paymongo, { PublicKey } from '@paymongo/core';
const paymongo = new Paymongo(process.env.PAYMONGO_PUBLIC_KEY as PublicKey);
caution

DO NOT USE YOUR SECRET KEY IN A BROWSER ENVIRONMENT.