1.1.4 • Published 4 years ago

brighte-sdk-js-payment v1.1.4

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Brighte Payment Service Javascript SDK

This library makes it easy to make calls to the brighte payment Service

installation

npm i brighte-sdk-js-payment

usage

const userId = 1, 
      auth = 'thisismyjwt', 
      url = 'https://api.brighte.com.au/v1/';
const api = new paymentService(url, auth);
const result = await api.getPaymentMethods(userId);

supported methods

  1. getPaymentMethods(userId)
  2. savePaymentMethod(paymentMethod)
  3. updatePaymentMethod(paymentMethod)
  4. makePayment(userId, methodId, amount, loanId)

language

Compiles to es2017.