2.0.0 • Published 12 months ago

masspay-js-sdk v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

Welcome to our masspay-js-sdk. We are committed to providing you with the best SDK services experience possible. Please use our step-by-step instructions to become familiar with how to use our SDK.

  • Current API version: 1.0.0
  • Current package version: 2.0.0

Table of Contents

Requirements

  • Installed Node.js, stable version >= 12. If you do not currently have Node.js locally installed, please refer to the Node website
  • MassPay.io API credentials.

Installation

Use these commands to install masspay-js-sdk in your terminal, based on your preferences.

npm

npm install masspay-js-sdk

yarn

yarn add masspay-js-sdk

Usage

In case that you successfully installed our masspay-js-sdk please execute this code:

import { MasspayJsSdk } from 'masspay-js-sdk';

const sdk = new MasspayJsSdk({
  AUTHORIZER_NAME_API_KEY: 'YOUR API KEY',
});
(async () => {
  try {
    const response = await sdk.AccountService.getAccountBalance({
      /* query parameters */
    });
    // use response data
  } catch (error) {
    // handle error
  }
})();

Features

Kindly note that every URI is relative to https://api.masspay.io/v1.0.0.

The table displays all features categorized based on their specific purposes.

ClassMethodHTTP requestDescription
MasspayJsSdk.AccountServicegetAccountBalanceGET /payout/account/balanceGet current available balance
MasspayJsSdk.AccountServicegetAccountStatementGET /payout/account/statementGet certified account statement
MasspayJsSdk.AttributeServicegetAllAttrsGET /payout/attribute/{user_token}Get all stored user attributes
MasspayJsSdk.AttributeServicestoreAttrsPOST /payout/attribute/{user_token}/{destination_token}/{currency}Store user attributes
MasspayJsSdk.AttributeServicegetAttrsGET /payout/attribute/{user_token}/{destination_token}/{currency}Get user attributes for destination_token
MasspayJsSdk.CardServicegetWalletCardInfoGET /payout/wallet/{user_token}/{wallet_token}/cardGet MassPay card information
MasspayJsSdk.CardServiceupdateWalletCardInfoPUT /payout/wallet/{user_token}/{wallet_token}/cardUpdate MassPay card information
MasspayJsSdk.CatalogServicegetCountryListGET /payout/country/listGets a list of countries where services offered.
MasspayJsSdk.CatalogServicegetCountryServicesGET /payout/country/{country_code}Gets a list of Companies and their service offerings for the given country code.
MasspayJsSdk.CatalogServicegetCheapestCountryServicesGET /payout/country/{country_code}/cheapestGets a list of Companies and their cheapest service offerings for the given country code.
MasspayJsSdk.CatalogServicegetDestinationTokenAlternativesGET /payout/service/{destination_token}/alternativesReturns list of alternative service to a provided service
MasspayJsSdk.CatalogServicegetDestinationTokenGET /payout/service/{destination_token}Returns provided service
MasspayJsSdk.CatalogServicegetUserAgreementGET /payout/user-agreementsGet user agreement
MasspayJsSdk.CatalogServicegetUserAgreementsNamesOPTIONS /payout/user-agreementsGet available user agreements
MasspayJsSdk.KycServicefindAttributesVelocityPOST /payout/attribute/{user_token}/velocityAttributes velocity check
MasspayJsSdk.KycServicegetUserUserTokenKycAu10TixGET /payout/user/{user_token}/kyc/au10tixGet an Au10tix session link
MasspayJsSdk.KycServiceuploadIdPhotosPOST /payout/user/{user_token}/kyc/idUpload ID photos
MasspayJsSdk.KycServicegetUserUserTokenKycAttemptsGET /payout/user/{user_token}/kyc/idGet all KYC sessions
MasspayJsSdk.KycServicegetUserUserTokenKycVeriffGET /payout/user/{user_token}/kyc/veriffGet a Veriff session link
MasspayJsSdk.LoadServiceresendBalanceNotificationPUT /payout/wallet/{user_token}Resend balance notification
MasspayJsSdk.LoadServiceloadUserPOST /payout/load/{user_token}Initiate a load transaction
MasspayJsSdk.LoadServicegetUserLoadsByTokenGET /payout/load/{user_token}Get history of loads by user token
MasspayJsSdk.LoadServiceresendLoadNotificationPUT /payout/load/{user_token}Resend load notification
MasspayJsSdk.LoadServicecancelUserLoadDELETE /payout/load/{user_token}Reverse a user load
MasspayJsSdk.PayoutServiceinitiatePayoutPOST /payout/{user_token}Initiate a payout transaction
MasspayJsSdk.PayoutServicegetUserPayoutsByTokenGET /payout/{user_token}Get history of payouts by user token
MasspayJsSdk.PayoutServicecommitPayoutTxnPUT /payout/{user_token}/{payout_token}Commit payout transaction
MasspayJsSdk.PayoutServicegetPayoutStatusGET /payout/{user_token}/{payout_token}Get status of a payout by payout token
MasspayJsSdk.PayoutServicegetTransactionConfirmationDetailsPATCH /payout/{user_token}/{payout_token}Get transaction confirmation details
MasspayJsSdk.SpendBackServicegetUserSpendbacksByTokenGET /payout/spendback/{user_token}Get history of spend backs by user token
MasspayJsSdk.SpendBackServiceinitiateSpendbackPOST /payout/spendback/{user_token}Initiate a spend back transaction
MasspayJsSdk.SubaccountServicecreateSubaccountPOST /subaccountCreate a subaccount
MasspayJsSdk.SubaccountServicegetSubaccountSubaccountTokenUboPOST /subaccount/{subaccount_token}/uboAdd UBOs to subaccount
MasspayJsSdk.SubaccountServiceuploadSubaccountUboIdPOST /subaccount/{subaccount_token}/ubo/{ubo_token}/idUpload UBO ID photos
MasspayJsSdk.TaxServicegetTaxUsersGET /payout/taxGet list of users' annual balance
MasspayJsSdk.TaxServicegetTaxInterviewLinkGET /payout/{user_token}/taxGet link for tax interview
MasspayJsSdk.UserServicecreateUserPOST /payout/userCreate a user
MasspayJsSdk.UserServicegetUserByTokenGET /payout/user/{user_token}Get user by user token
MasspayJsSdk.UserServiceupdateUserPUT /payout/user/{user_token}Updated user
MasspayJsSdk.UserServiceuserLookupGET /payout/user/lookupLookup an existing user
MasspayJsSdk.UserServicegetUserHistoryGET /payout/user/{user_token}/historyTransactions history
MasspayJsSdk.UserServicegetAllUsersHistoryGET /payout/user/historyAll Users' Transactions history
MasspayJsSdk.WalletServicegetWalletGET /payout/wallet/{user_token}Retrieve all available wallets for a user
MasspayJsSdk.WalletServicegetAutopayoutRulesGET /payout/wallet/{user_token}/{wallet_token}/autopayoutGet all AutoPayout rules
MasspayJsSdk.WalletServicecreateAutopayoutRulePOST /payout/wallet/{user_token}/{wallet_token}/autopayoutAdd AutoPayout rule
MasspayJsSdk.WalletServicedeleteAutopayoutRuleDELETE /payout/wallet/{user_token}/{wallet_token}/autopayoutDelete AutoPayout rule

Contributing

To learn more about the possibility of contributing to the subsequent development of this SDK, please visit our contributing page. Kindly note that contributions are limited by a unique set of rules in order to ensure clarity.

License

Please refer to the license page for more information about the license type and the corresponding terms of use.

Contact

We kindly request that you direct all questions to our support email:

Frequently Asked Questions (FAQ)

2.0.0

12 months ago

1.0.0

2 years ago