1.0.0 • Published 4 years ago

papara-wrapper v1.0.0

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

Papara API Wrapper

This package is a wrapper for Papara API. It handles HTTP requests and authentication.

Installation

npm install --save papara-wrapper

Usage

const Papara = require("papara-wrapper");

const papara = new Papara({ API_KEY: "API_KEY" });

papara.validationByAccountNumber(USER_ACCOUNT_NUMBER)
  .then(res => {
    console.log(res.succeeded); // true if account number is valid
  })
  .catch(err => {
    console.log(err); // axios error
  })

Methods

  • Account
    • account
    • accountLedgers
    • accountSettlement
  • User Validation
    • validationByAccountNumber
    • validationByEmail
    • validationByPhoneNumber
    • validationByTCKN
  • Checkout
    • payments
    • paymentsValidation
    • paymentsRefund
  • Masspayment
    • masspaymentByAccountNumber
    • masspaymentByEmail
    • masspaymentByPhone
    • masspaymentVerficationById
    • masspaymentVerficationByMasspaymentId
  • Cash Deposit
    • cashDepositByPhoneNumber
    • cashDepositByAccountNumber
    • cashDepositByTCKN
    • cashDepositSettlement
    • cashDepositVerificationById
    • cashDepositVerificationByMerchantReference
  • Cash Deposit Provisional
    • cashDepositProvisionByPhoneNumber
    • cashDepositProvisionByAccountNumber
    • cashDepositProvisionByTCKN
    • cashDepositProvisionComplete
    • cashDepositProvisionSettlement
    • cashDepositVerificationByMerchantReference
    • cashDepositVerificationByDate
  • Banking
    • bankAccounts
    • bankWithdrawal

You can find further information about these methods in official documentation of Papara

Configuration Options

Test Enviroment

An optional paramter of the constructor is testEnv. This property decides whether test environment will be used or not and it is false by default. So you can switch to test environment like this:

const papara = new Papara({ API_KEY: "API_KEY", testEnv: true });

If test enviroment is enabled, all requests will be sent to https://merchant.test.api.papara.com/. Thus, make sure you are using a test API key. See more;

Author

Koray Kural

Feel free to mail me.

This package is not officially maintained by Papara Team.

License

ISC