A fully typed client for the Paymongo API
- Fully typed
- Supports both server and browser
- Payment Method
- Payment Intent
- Sources
- Payments
- Helpers
Install with npm
npm install @paymongo/core
Install with yarn
yarn install @paymongo/core
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
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