Skip to content

koraykural/papara-wrapper

Repository files navigation

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

About

Papara API wrapper for node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published