Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

promisepay

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

promisepay

PromisePay library for node

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
increased by800%
Maintainers
1
Weekly downloads
 
Created
Source

PromisePay Node.js Client

This is a nodeJS library for PromisePay. For more details about the API please refer to the official API Documentation

npm version

Dependency Status

Installation

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

Usage

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);
});

Endpoints

# 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')

Contributors

Keywords

FAQs

Package last updated on 17 Oct 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc