This package is a wrapper for Papara API. It handles HTTP requests and authentication.
npm install --save papara-wrapper
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
})
- 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
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;
Koray Kural
Feel free to mail me.
This package is not officially maintained by Papara Team.