@ppay/api
TypeScript icon, indicating that this package has built-in type declarations

2.2.7 • Public • Published

Setup

This module is a JS wrapper for pay.expo HTTP API, for manual connection please contact our support. npm install @ppay/api

Getting started:

PPay API provides simple yet comprehensive payment gateway functionality for your online website. To start using API right away, simply import PPAY class from the module you have just installed:

import PPAY from @ppay/api

From here on, you can create instance of PPAY class:

const ppay = new PPAY({
  apiKey: PPAY_API_KEY,
  apiSecret: PPAY_API_SECRET,
  merchantName: PPAY_MERCHANT_NAME
})

You can simply define these variables as a part of your environment and they will automatically be used:

PPAY_API_KEY, PPAY_MERCHANT_NAME, PPAY_API_SECRET

Available methods:

When you have successfully created a PPay class constructor, you can use such methods to create requests to PPay API:

Name Description Parameters Response
getWallets GET request, returns a response object containing currently available balances at users wallets for each currency + USD equivalent and a total amount in USD. Doesn’t take any parameters Returns two objects, each containing a series of fields. Each field key indicates currency type, while string values resemble the available balance.
toUSD object displays the prices of each currency in USD equivalent and displays total balance in USD equivalent.
createPermanentMerchantAddress POST request that defines a permanent address for your mechant in the EXPO Pay system database and returns a response object containing this address. merchantName:string — defines the name of the merchant, can be found at the Merchants section of the Dashboard.
`currency:”BTC
ETH
getMinerFee GET request that returns a calculated amount of the miner's fee, based on the amount of funds to be transferred. `currency:”BTC ETH
Withdraw POST request that creates a withdrawal order within the EXPO Pay system to send money from internal balance to a specified wallet and returns a response object description: string — optional parameter
`currency:”BTC
ETH

Readme

Keywords

none

Package Sidebar

Install

npm i @ppay/api

Weekly Downloads

0

Version

2.2.7

License

ISC

Unpacked Size

15.5 kB

Total Files

18

Last publish

Collaborators

  • ppay