0.0.3 • Published 2 years ago

payeer.js v0.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

payeer.js

Unofficial client for working with the "bulk payments" section for Payeer.

Install

npm i payeer.js

Basic Usage

const Payeer = require('payeer.js')

const client = new Payeer.default(
    'P100000',
    'api_id',
    'api_password'
);

client.getPaySystems().then(data => console.log(data))

client.on('data', async (data) => {
  console.log(data.id)
})

Methods

  • payeer.AuthorizationСheck();

    • Authorization check.
  • payeer.getBalance();

    • Getting the balance of the wallet.
  • payeer.getPaySystems();

    • List of payment systems for withdrawal.
  • payeer.history();

    • Getting the history of account transactions.
  • payeer.checkUser(user);

    • Checking the existence of a Payeer account number.
    • Options:
      • user (Payeer account number)
  • payeer.getExchangeRate(output);

    • Automatic conversion rates.
    • Options:
      • output ("Y" - input courses. "N" - withdrawal rates.)
  • payeer.paymentDetails(merchantId, referenceId);

    • Payment information.
    • Options:
      • merchantId (merchant id)
      • referenceId (id of the transaction in the seller's accounting system)
  • payeer.transfer(curIn, sum, curOut, to);

    • Transfer of funds within the Payeer payment system.
    • Options:
      • curIn (currency to be debited: USD, EUR, RUB)
      • sum (the amount to be debited)
      • curOut (write-off currency: USD, EUR, RUB)
      • to (Payeer account number or recipient email)
  • payeer.payoutDetails(referenceId);

    • Payout information.
    • Options:
      • referenceId (identification number in your accounting system)
  • payeer.payout(payout_id, sumIn, curIn, curOut, param_ACCOUNT_NUMBER);

    • Payout to any payment system supported by Payeer.
    • Options:
      • payout_id (id of the selected payment system)
      • curIn (currency to be debited: USD, EUR, RUB)
      • sumIn (amount to be debited)
      • curOut (write-off currency: USD, EUR, RUB)
      • param_ACCOUNT_NUMBER (beneficiary's account number in the selected payment system)
  • payeer.payoutChecking(payout_id, sumIn, curIn, curOut, param_ACCOUNT_NUMBER);

    • Checking the possibility of payment.
    • Options:
      • payout_id (id of the selected payment system)
      • sumIn (amount to be debited)
      • curIn (currency to be debited: USD, EUR, RUB)
      • curOut (write-off currency: USD, EUR, RUB)
      • param_ACCOUNT_NUMBER (beneficiary's account number in the selected payment system)
  • payeer.invoiceCreate(m_shop, m_orderid, m_amount, m_curr, m_desc);

    • Create an invoice for payment.
    • Options:
      • m_shop (merchant id)
      • m_orderid (account id to the seller's accounting system)
      • m_amount (invoice amount)
      • m_curr (account currency)
      • m_desc (description)
  • payeer.on(EventName, function);

    • Event handler. At the moment, only a transaction processor exists in this library.
    • Options:
      • EventName ("data")
      • function (any function name)

Examples

payeer.AuthorizationСheck().then(res => console.log(res));
payeer.getBalance().then(res => console.log(res));
payeer.getPaySystems().then(res => console.log(res));
payeer.history().then(res => console.log(res));
payeer.checkUser("P12345678").then(res => console.log(res));
payeer.getExchangeRate("Y").then(res => console.log(res));
payeer.getExchangeRate("N").then(res => console.log(res));
payeer.paymentDetails("11111", "123d3a31-d951-4763-a63d-5b7182ab51b4").then(res => console.log(res));
payeer.transfer("USD", 2, "RUB", "P12345678").then(res => console.log(res));
payeer.payoutDetails("b24d3a31-d951-3763-a63d-5b7182qb51b4").then(res => console.log(res));
payeer.payout("1136053", 1, "USD", "EUR", "P12345678").then(res => console.log(res));
payeer.payoutChecking("1136053", 2, "USD", "EUR", "P12345678").then(res => console.log(res));
payeer.invoiceCreate("11111", "ananas", 1, "USD", "Hi bro").then(res => console.log(res));
payeer.on('data', async (data) => { console.log(data.id) })
0.0.3

2 years ago

0.0.2

3 years ago

0.0.1

3 years ago

1.0.0

3 years ago