paolotiu / paymongo

Home Page:https://paymongo.paolotiu.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Paymongo for Typescript

A fully typed client for the Paymongo API

Codecov

Link to docs

Features

  • Fully typed
  • Supports both server and browser

Roadmap

  • Payment Method
  • Payment Intent
  • Sources
  • Payments
  • Helpers

Installation

Install with npm

	npm install @paymongo/core

Install with yarn

	yarn install @paymongo/core

Usage

On the server

const paymongo = new Paymongo(process.env.PAYMONGO_SECRET_KEY as SecretKey);

On the browser

const paymongo = new Paymongo(process.env.PAYMONGO_PUBLIC_KEY as PublicKey);
  • For Javascript users just remove the as <Public/Private>Key part

FAQ

Why aren't there methods for tokens and webhooks?

For tokens, I didn't include them since the suggested work flow is now through the Payment Intent workflow.

As for webhooks, you shouldn't create webhooks in code. Use something like cURL, Postman, or Insomnia

About

https://paymongo.paolotiu.com

License:MIT License


Languages

Language:TypeScript 89.9%Language:JavaScript 6.9%Language:CSS 3.2%