Skip to content
This repository has been archived by the owner on Oct 24, 2019. It is now read-only.
/ node-mollie Public archive

Fast promise based Mollie API wrap (native promises, no deps)

License

Notifications You must be signed in to change notification settings

rdzar/node-mollie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-mollie

Build Status Coverage Status npm version

A promise based API wrapper for mollie.com in Node

Install

npm install node-mollie --save

What do I need?

A mollie live or test token.

Obtain a mollie token

To obtain a mollie token go to your mollie dashboard, choose website profiles under Settings. It will provide you with a live and test API key.

Why, Mollie has their own module named mollie-api-node?

Their module got me annoyed so much, it always lacks most recent support (its not written as a wrapper at all) and has so many useless deps most of us do not need.

Example create customer

import { Client } from 'mollie'

const mollieClient = new Client('TOKEN');
mollieClient.post('customers', {
  'name': 'DualDev'
}).then(res => {
  console.log('created!', res);
}).catch(err => {
  console.log('Whoops, something went wrong!', err);
});

How do I make other calls?

This promise based API wrapper is not call-specific, allowing it to be more flexible to future API changes. The following methods are available for use.

API

Client(Token, [version=v1])

.get('resource_path')

.put('resource_path', body)

.patch('resource_path', body)

.create('resource_path', body)

.delete('resource_path')

Does this package depends upon other packages?

No, this package doesn't use any dependencies besides dev-dependencies for testing and building.

About

Fast promise based Mollie API wrap (native promises, no deps)

Resources

License

Stars

Watchers

Forks

Packages

No packages published