smatpay

1.0.5 • Public • Published

Smatpay documentation

Smatpay is a nodejs package for making payments on the smatpay.africa platform

Installation

Use the package manager npm to install smatpay.

npm install smatpay@1.0.5

Usage

const smatpay = require('smatpay');
#Make payment
# returns payment object
smatpay.makePayment(environment,merchantId,merchantApiKey,merchantKey,walletName,amount,paymentCurrency,paymentDescription,payerName,payerReference,payerAccountId,payerMobile,profileId)
environment has 2 options 
smatpay.environment.SANDBOX and smatpay.environment.PRODUCTION
Currency has 2 options
smatpay.currency.USD and smatpay.currency.ZIG
payerReference should be a unique UUID 
walletName has 3 options
smatpay.paymentMethod.Ecocash,smatpay.paymentMethod.Innbucks and smatpay.paymentMethod.Zimswitch

# returns '{status:true,token:token}'
smatpay.getAccessToken(environment,merchantId,merchantApiKey,merchantKey)

# returns '{status:true,data:{}}'
smatpay.checkPaymentStatus(environment,reference,transactionCode,walletName,token)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

More smatpay documentation

Smatpay API docs

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i smatpay

Weekly Downloads

10

Version

1.0.5

License

ISC

Unpacked Size

8.04 kB

Total Files

7

Last publish

Collaborators

  • lierance