1.0.0 • Published 6 years ago

free-kassa v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

free-kassa

Free Kassa (Merchant & Wallet) API.

Install

$ npm i free-kassa -S

Methods

constructor(settings)

Create instance of FreeKassa.

  • settings - object settings
    • firstSecret - first secret of your merchant
    • secondSecret - second secret of your merchant
    • merchantId - merchant's id
    • walletToken - wallet's token
    • walletId - wallet's id

.getForm(orderAmount, orderId)

Returns a URL to payment form.

.getFormSign(orderAmount, orderId)

Returns a sign for payment form.

.getPaymentSign(orderAmount, orderId)

Returns a sign for payment.

.getBalance() ⇒ [Promise]

Returns a wallet's balance.

.sendPayment(settings) ⇒ [Promise]

Send payment to the user.

  • settings - object settings
    • wallet - receiver's wallet
    • amount - payment's amount
    • currency - payment's currency
    • description - payment's description

License

MIT.