Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
This is a nodeJS library for PromisePay. For more details about the API please refer to the official API Documentation
To install use yarn
:
$ yarn add promisepay
Or if you are old school, you can use npm
and add the package to your application's dependencies:
$ npm install promisepay --save
import promisepay from 'promisepay';
ppClient = promisePay({
userName: process.env.PP_USER,
token: process.env.PP_TOKEN,
preLive: process.env.PP_LIVE !== 'true',
currency: 'USD',
debug: true,
logger: winston.info,
});
const users = await ppClient.users.list({ limit: 5 });
# or
ppClient.users.list({ limit: 5 }).then(data => {
console.log(data);
});
# User Methods
* promisePay.users.create(data)
* promisePay.users.list({ limit, offset, search })
* promisePay.users.get(id)
* promisePay.users.update(id, data)
* promisePay.users.getBankAccount(id)
* promisePay.users.getCardAccount(id)
* promisePay.users.getPaypalAccount(id)
* promisePay.users.getWalletAccount(id)
* promisePay.users.setDisbursementAccount(id, accountId)
* promisePay.users.listItems(id)
# Company Methods
* promisePay.companies.create(data)
* promisePay.companies.list({ limit, offset })
* promisePay.companies.get(id)
* promisePay.companies.update(id, data)
# Bank Account Methods
* promisePay.bankAccounts.create(data)
* promisePay.bankAccounts.get(id)
* promisePay.bankAccounts.delete(id)
* promisePay.bankAccounts.getUsers(id)
* promisePay.bankAccounts.verifyRoutingNumber(number)
# Card Account Methods
* promisePay.cardAccounts.create(data)
* promisePay.cardAccounts.get(id)
* promisePay.cardAccounts.delete(id)
* promisePay.cardAccounts.getUsers(id)
# Paypal Account Methods
* promisePay.paypalAccounts.create(data)
* promisePay.paypalAccounts.get(id)
* promisePay.paypalAccounts.delete(id)
* promisePay.paypalAccounts.getUsers(id)
# Wallet Account Methods
* promisePay.walletAccounts.get(id)
* promisePay.walletAccounts.withdraw(id, { account_id, amount })
* promisePay.walletAccounts.deposit(id, { account_id, amount })
* promisePay.walletAccounts.getUser(id)
# Direct Debit Authority Methods
* promisePay.directDebitAuthority.create({ account_id, amount })
* promisePay.directDebitAuthority.list({ limit, offset, account_id })
* promisePay.directDebitAuthority.get(id)
* promisePay.directDebitAuthority.delete(id)
# Fee Methods
* promisePay.fees.create({ name, fee_type_id, amount, cap, min, max, to })
* promisePay.fees.list({ limit, offset })
* promisePay.fees.get(id)
# Items Methods
* promisePay.items.create(data)
* promisePay.items.list({ limit, offset, search, disbursement_id })
* promisePay.items.get(id)
* promisePay.items.update(id, { name, amount, fee_ids, description, buyer_id, seller_id })
* promisePay.items.deleteFees(id)
* promisePay.items.delete(id)
* promisePay.items.status(id)
* promisePay.items.getBuyers(id)
* promisePay.items.getSellers(id)
* promisePay.items.getFees(id)
* promisePay.items.getWireDetails(id)
* promisePay.items.getBPayDetails(id)
* promisePay.items.getTransactions(id)
* promisePay.items.getBatchTransactions(id)
# Item Action Methods
* promisePay.itemActions.requestPayment(itemId)
* promisePay.itemActions.makePayment(itemId, { account_id, ip_address, device_id })
* promisePay.itemActions.requestRelease(itemId, { release_amount })
* promisePay.itemActions.releasePayment(itemId, { release_amount, flag_release })
* promisePay.itemActions.requestRefund(itemId, { refund_amount, refund_message })
* promisePay.itemActions.refund(itemId, { refund_amount, refund_message })
* promisePay.itemActions.declineRefund(itemId)
* promisePay.itemActions.raiseDispute(itemId, { user_id })
* promisePay.itemActions.requestDisputeResolution(itemId)
* promisePay.itemActions.resolveDispute(itemId)
* promisePay.itemActions.escalateDispute(itemId)
* promisePay.itemActions.acknowledgeWireTransfer(itemId)
* promisePay.itemActions.revertWireTransfer(itemId)
* promisePay.itemActions.cancel(itemId)
* promisePay.itemActions.sendTaxInvoice(itemId)
* promisePay.itemActions.requestTaxInvoice(itemId)
# Charge Methods
* promisePay.charges.create(data)
* promisePay.charges.list({ limit, offset }})
* promisePay.charges.get(id)
* promisePay.charges.getBuyer(id)
* promisePay.charges.getStatus(id)
# Market Place Methods
* promisePay.marketPlaces.show()
# Transaction Methods
* promisePay.transactions.list({ limit, offset, account_id, item_id, transaction_type, transaction_type_method, direction })
* promisePay.transactions.get(id)
* promisePay.transactions.getUser(id)
* promisePay.transactions.getFees(id)
* promisePay.transactions.getWalletAccount(id)
* promisePay.transactions.getBankAccount(id)
* promisePay.transactions.getCardAccount(id)
* promisePay.transactions.getPaypalAccount(id)
* promisePay.transactions.getItems(id)
# Batch Transaction Methods
* promisePay.batchTransactions.list({ limit, offset, account_id, batch_id, item_id, transaction_type, transaction_type_method, direction })
* promisePay.batchTransactions.get(id)
* promisePay.batchTransactions.getItems(id)
# Callback Methods
* promisePay.callbacks.create({ description, url, object_type, enabled })
* promisePay.callbacks.list({ limit, offset, filter, id })
* promisePay.callbacks.get(id)
* promisePay.callbacks.update(id, { description, url, object_type, enabled })
* promisePay.callbacks.delete(id)
* promisePay.callbacks.listResponses(id)
* promisePay.callbacks.getCallbackResponse(id, responseId)
# Tool Methods
* promisePay.tools.healthcheck()
# Tokens Methods
* promisePay.tokens.get(userId, tokenType = 'card')
FAQs
PromisePay library for node
The npm package promisepay receives a total of 14 weekly downloads. As such, promisepay popularity was classified as not popular.
We found that promisepay demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.