npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

velo-payments

v2.37.150-beta.1

Published

## Terms and Definitions Throughout this document and the Velo platform the following terms are used: * **Payor.** An entity (typically a corporation) which wishes to pay funds to one or more payees via a payout. * **Payee.** The recipient of funds paid

Downloads

41

Readme

JavaScript client for Velo

License npm version
This library provides a JavaScript client that simplifies interactions with the Velo Payments API. For full details covering the API visit our docs at Velo Payments APIs. Note: some of the Velo API calls which require authorization via an access token, see the full docs on how to configure.

Throughout this document and the Velo platform the following terms are used:

  • Payor. An entity (typically a corporation) which wishes to pay funds to one or more payees via a payout.
  • Payee. The recipient of funds paid out by a payor.
  • Payment. A single transfer of funds from a payor to a payee.
  • Payout. A batch of Payments, typically used by a payor to logically group payments (e.g. by business day). Technically there need be no relationship between the payments in a payout - a single payout can contain payments to multiple payees and/or multiple payments to a single payee.
  • Sandbox. An integration environment provided by Velo Payments which offers a similar API experience to the production environment, but all funding and payment events are simulated, along with many other services such as OFAC sanctions list checking.
  • Maintain a collection of payees
  • Query the payor’s current balance of funds within the platform and perform additional funding
  • Issue payments to payees
  • Query the platform for a history of those payments

This document describes the main concepts and APIs required to get up and running with the Velo Payments platform. It is not an exhaustive API reference. For that, please see the separate Velo Payments API Reference.

## API access following authentication
Following successful authentication, the value of the access_token field in the response (indicated in green above) should then be presented with all subsequent API calls to allow the Velo platform to validate that the caller is authenticated.

This is achieved by setting the HTTP Authorization header with the value set to e.g. Bearer 19f6bafd-93fd-4747-b229-00507bbc991f such as the curl example below:

-H "Authorization: Bearer 19f6bafd-93fd-4747-b229-00507bbc991f "


If you make other Velo API calls which require authorization but the Authorization header is missing or invalid then you will get a **401** HTTP status response.


## Http Status Codes
Following is a list of Http Status codes that could be returned by the platform

    | Status Code            | Description                                                                          |
    | -----------------------| -------------------------------------------------------------------------------------|
    | 200 OK                 | The request was successfully processed and usually returns a json response           |
    | 201 Created            | A resource was created and a Location header is returned linking to the new resource |
    | 202 Accepted           | The request has been accepted for processing                                         |
    | 204 No Content         | The request has been processed and there is no response (usually deletes and updates)|
    | 400 Bad Request        | The request is invalid and should be fixed before retrying                           |
    | 401 Unauthorized       | Authentication has failed, usually means the token has expired                       |
    | 403 Forbidden          | The user does not have permissions for the request                                   |
    | 404 Not Found          | The resource was not found                                                           |
    | 409 Conflict           | The resource already exists and there is a conflict                                  |
    | 429 Too Many Requests  | The user has submitted too many requests in a given amount of time                   |
    | 5xx Server Error       | Platform internal error (should rarely happen)                                       |

This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 2.37.150
- Package version: 2.37.150-beta.1
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

## Installation

### For [Node.js](https://nodejs.org/)

#### npm

To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).

Then install it via:

```shell
npm install velo-payments --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your velo-payments from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var VeloPayments = require('velo-payments');

var defaultClient = VeloPayments.ApiClient.instance;
// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new VeloPayments.CountriesApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listPaymentChannelRulesV1(callback);

Documentation for API Endpoints

All URIs are relative to https://api.sandbox.velopayments.com

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- VeloPayments.CountriesApi | listPaymentChannelRulesV1 | GET /v1/paymentChannelRules | List Payment Channel Country Rules VeloPayments.CountriesApi | listSupportedCountriesV1 | GET /v1/supportedCountries | List Supported Countries VeloPayments.CountriesApi | listSupportedCountriesV2 | GET /v2/supportedCountries | List Supported Countries VeloPayments.CurrenciesApi | listSupportedCurrenciesV2 | GET /v2/currencies | List Supported Currencies VeloPayments.FundingApi | createFundingRequestV2 | POST /v2/sourceAccounts/{sourceAccountId}/fundingRequest | Create Funding Request VeloPayments.FundingApi | createFundingRequestV3 | POST /v3/sourceAccounts/{sourceAccountId}/fundingRequest | Create Funding Request VeloPayments.FundingApi | getFundingAccountV2 | GET /v2/fundingAccounts/{fundingAccountId} | Get Funding Account VeloPayments.FundingApi | getFundingAccountsV2 | GET /v2/fundingAccounts | Get Funding Accounts VeloPayments.FundingApi | getFundingByIdV1 | GET /v1/fundings/{fundingId} | Get Funding VeloPayments.FundingApi | listFundingAuditDeltas | GET /v1/deltas/fundings | Get Funding Audit Delta VeloPayments.FundingManagerPrivateApi | createFundingAccountV2 | POST /v2/fundingAccounts | Create Funding Account VeloPayments.FundingManagerPrivateApi | deleteSourceAccountV3 | DELETE /v3/sourceAccounts/{sourceAccountId} | Delete a source account by ID VeloPayments.LoginApi | logout | POST /v1/logout | Logout VeloPayments.LoginApi | resetPassword | POST /v1/password/reset | Reset password VeloPayments.LoginApi | validateAccessToken | POST /v1/validate | validate VeloPayments.LoginApi | veloAuth | POST /v1/authenticate | Authentication endpoint VeloPayments.PayeeInvitationApi | createPayeeV3 | POST /v3/payees | Initiate Payee Creation VeloPayments.PayeeInvitationApi | getPayeesInvitationStatusV3 | GET /v3/payees/payors/{payorId}/invitationStatus | Get Payee Invitation Status VeloPayments.PayeeInvitationApi | getPayeesInvitationStatusV4 | GET /v4/payees/payors/{payorId}/invitationStatus | Get Payee Invitation Status VeloPayments.PayeeInvitationApi | queryBatchStatusV3 | GET /v3/payees/batch/{batchId} | Query Batch Status VeloPayments.PayeeInvitationApi | queryBatchStatusV4 | GET /v4/payees/batch/{batchId} | Query Batch Status VeloPayments.PayeeInvitationApi | resendPayeeInviteV3 | POST /v3/payees/{payeeId}/invite | Resend Payee Invite VeloPayments.PayeeInvitationApi | resendPayeeInviteV4 | POST /v4/payees/{payeeId}/invite | Resend Payee Invite VeloPayments.PayeeInvitationApi | v4CreatePayee | POST /v4/payees | Initiate Payee Creation VeloPayments.PayeePaymentChannelsApi | createPaymentChannelV4 | POST /v4/payees/{payeeId}/paymentChannels/ | Create Payment Channel VeloPayments.PayeePaymentChannelsApi | deletePaymentChannelV4 | DELETE /v4/payees/{payeeId}/paymentChannels/{paymentChannelId} | Delete Payment Channel VeloPayments.PayeePaymentChannelsApi | enablePaymentChannelV4 | POST /v4/payees/{payeeId}/paymentChannels/{paymentChannelId}/enable | Enable Payment Channel VeloPayments.PayeePaymentChannelsApi | getPaymentChannelV4 | GET /v4/payees/{payeeId}/paymentChannels/{paymentChannelId} | Get Payment Channel Details VeloPayments.PayeePaymentChannelsApi | getPaymentChannelsV4 | GET /v4/payees/{payeeId}/paymentChannels/ | Get All Payment Channels Details VeloPayments.PayeePaymentChannelsApi | updatePaymentChannelOrderV4 | PUT /v4/payees/{payeeId}/paymentChannels/order | Update Payees preferred Payment Channel order VeloPayments.PayeePaymentChannelsApi | updatePaymentChannelV4 | POST /v4/payees/{payeeId}/paymentChannels/{paymentChannelId} | Update Payment Channel VeloPayments.PayeesApi | deletePayeeByIdV3 | DELETE /v3/payees/{payeeId} | Delete Payee by Id VeloPayments.PayeesApi | deletePayeeByIdV4 | DELETE /v4/payees/{payeeId} | Delete Payee by Id VeloPayments.PayeesApi | getPayeeByIdV3 | GET /v3/payees/{payeeId} | Get Payee by Id VeloPayments.PayeesApi | getPayeeByIdV4 | GET /v4/payees/{payeeId} | Get Payee by Id VeloPayments.PayeesApi | listPayeeChangesV3 | GET /v3/payees/deltas | List Payee Changes VeloPayments.PayeesApi | listPayeeChangesV4 | GET /v4/payees/deltas | List Payee Changes VeloPayments.PayeesApi | listPayeesV3 | GET /v3/payees | List Payees VeloPayments.PayeesApi | listPayeesV4 | GET /v4/payees | List Payees VeloPayments.PayeesApi | payeeDetailsUpdateV3 | POST /v3/payees/{payeeId}/payeeDetailsUpdate | Update Payee Details VeloPayments.PayeesApi | payeeDetailsUpdateV4 | POST /v4/payees/{payeeId}/payeeDetailsUpdate | Update Payee Details VeloPayments.PayeesApi | v3PayeesPayeeIdRemoteIdUpdatePost | POST /v3/payees/{payeeId}/remoteIdUpdate | Update Payee Remote Id VeloPayments.PayeesApi | v4PayeesPayeeIdRemoteIdUpdatePost | POST /v4/payees/{payeeId}/remoteIdUpdate | Update Payee Remote Id VeloPayments.PaymentAuditServiceApi | exportTransactionsCSVV4 | GET /v4/paymentaudit/transactions | Export Transactions VeloPayments.PaymentAuditServiceApi | getFundingsV4 | GET /v4/paymentaudit/fundings | Get Fundings for Payor VeloPayments.PaymentAuditServiceApi | getPaymentDetailsV4 | GET /v4/paymentaudit/payments/{paymentId} | Get Payment VeloPayments.PaymentAuditServiceApi | getPaymentsForPayoutV4 | GET /v4/paymentaudit/payouts/{payoutId} | Get Payments for Payout VeloPayments.PaymentAuditServiceApi | getPayoutStatsV4 | GET /v4/paymentaudit/payoutStatistics | Get Payout Statistics VeloPayments.PaymentAuditServiceApi | getPayoutsForPayorV4 | GET /v4/paymentaudit/payouts | Get Payouts for Payor VeloPayments.PaymentAuditServiceApi | listPaymentChangesV4 | GET /v4/payments/deltas | List Payment Changes VeloPayments.PaymentAuditServiceApi | listPaymentsAuditV4 | GET /v4/paymentaudit/payments | Get List of Payments VeloPayments.PaymentAuditServiceDeprecatedApi | exportTransactionsCSVV3 | GET /v3/paymentaudit/transactions | V3 Export Transactions VeloPayments.PaymentAuditServiceDeprecatedApi | getFundingsV1 | GET /v1/paymentaudit/fundings | V1 Get Fundings for Payor VeloPayments.PaymentAuditServiceDeprecatedApi | getPaymentDetailsV3 | GET /v3/paymentaudit/payments/{paymentId} | V3 Get Payment VeloPayments.PaymentAuditServiceDeprecatedApi | getPaymentsForPayoutPAV3 | GET /v3/paymentaudit/payouts/{payoutId} | V3 Get Payments for Payout VeloPayments.PaymentAuditServiceDeprecatedApi | getPayoutStatsV1 | GET /v1/paymentaudit/payoutStatistics | V1 Get Payout Statistics VeloPayments.PaymentAuditServiceDeprecatedApi | getPayoutsForPayorV3 | GET /v3/paymentaudit/payouts | V3 Get Payouts for Payor VeloPayments.PaymentAuditServiceDeprecatedApi | listPaymentChanges | GET /v1/deltas/payments | V1 List Payment Changes VeloPayments.PaymentAuditServiceDeprecatedApi | listPaymentsAuditV3 | GET /v3/paymentaudit/payments | V3 Get List of Payments VeloPayments.PayorHierarchyApi | payorLinksV1 | GET /v1/payorLinks | List Payor Links VeloPayments.PayorsApi | getPayorByIdV2 | GET /v2/payors/{payorId} | Get Payor VeloPayments.PayorsApi | payorAddPayorLogoV1 | POST /v1/payors/{payorId}/branding/logos | Add Logo VeloPayments.PayorsApi | payorCreateApiKeyV1 | POST /v1/payors/{payorId}/applications/{applicationId}/keys | Create API Key VeloPayments.PayorsApi | payorCreateApplicationV1 | POST /v1/payors/{payorId}/applications | Create Application VeloPayments.PayorsApi | payorEmailOptOut | POST /v1/payors/{payorId}/reminderEmailsUpdate | Reminder Email Opt-Out VeloPayments.PayorsApi | payorGetBranding | GET /v1/payors/{payorId}/branding | Get Branding VeloPayments.PayorsPrivateApi | createPayorLinks | POST /v1/payorLinks | Create a Payor Link VeloPayments.PayoutsApi | createQuoteForPayoutV3 | POST /v3/payouts/{payoutId}/quote | Create a quote for the payout VeloPayments.PayoutsApi | deschedulePayout | DELETE /v3/payouts/{payoutId}/schedule | Deschedule a payout VeloPayments.PayoutsApi | getPaymentsForPayoutV3 | GET /v3/payouts/{payoutId}/payments | Retrieve payments for a payout VeloPayments.PayoutsApi | getPayoutSummaryV3 | GET /v3/payouts/{payoutId} | Get Payout Summary VeloPayments.PayoutsApi | instructPayoutV3 | POST /v3/payouts/{payoutId} | Instruct Payout VeloPayments.PayoutsApi | scheduleForPayout | POST /v3/payouts/{payoutId}/schedule | Schedule a payout VeloPayments.PayoutsApi | submitPayoutV3 | POST /v3/payouts | Submit Payout VeloPayments.PayoutsApi | withdrawPayment | POST /v1/payments/{paymentId}/withdraw | Withdraw a Payment VeloPayments.PayoutsApi | withdrawPayoutV3 | DELETE /v3/payouts/{payoutId} | Withdraw Payout VeloPayments.SourceAccountsApi | getSourceAccountV2 | GET /v2/sourceAccounts/{sourceAccountId} | Get Source Account VeloPayments.SourceAccountsApi | getSourceAccountV3 | GET /v3/sourceAccounts/{sourceAccountId} | Get details about given source account. VeloPayments.SourceAccountsApi | getSourceAccountsV2 | GET /v2/sourceAccounts | Get list of source accounts VeloPayments.SourceAccountsApi | getSourceAccountsV3 | GET /v3/sourceAccounts | Get list of source accounts VeloPayments.SourceAccountsApi | setNotificationsRequest | POST /v1/sourceAccounts/{sourceAccountId}/notifications | Set notifications VeloPayments.SourceAccountsApi | setNotificationsRequestV3 | POST /v3/sourceAccounts/{sourceAccountId}/notifications | Set notifications VeloPayments.SourceAccountsApi | transferFundsV2 | POST /v2/sourceAccounts/{sourceAccountId}/transfers | Transfer Funds between source accounts VeloPayments.SourceAccountsApi | transferFundsV3 | POST /v3/sourceAccounts/{sourceAccountId}/transfers | Transfer Funds between source accounts VeloPayments.TokensApi | resendToken | POST /v2/users/{userId}/tokens | Resend a token VeloPayments.TransactionsApi | createTransactionV1 | POST /v1/transactions | Create a Transaction VeloPayments.TransactionsApi | getTransactionByIdV1 | GET /v1/transactions/{transactionId} | Get Transaction VeloPayments.TransactionsApi | getTransactions | GET /v1/transactions | Get Transactions VeloPayments.UsersApi | deleteUserByIdV2 | DELETE /v2/users/{userId} | Delete a User VeloPayments.UsersApi | disableUserV2 | POST /v2/users/{userId}/disable | Disable a User VeloPayments.UsersApi | enableUserV2 | POST /v2/users/{userId}/enable | Enable a User VeloPayments.UsersApi | getSelf | GET /v2/users/self | Get Self VeloPayments.UsersApi | getUserByIdV2 | GET /v2/users/{userId} | Get User VeloPayments.UsersApi | inviteUser | POST /v2/users/invite | Invite a User VeloPayments.UsersApi | listUsers | GET /v2/users | List Users VeloPayments.UsersApi | registerSms | POST /v2/users/registration/sms | Register SMS Number VeloPayments.UsersApi | resendToken | POST /v2/users/{userId}/tokens | Resend a token VeloPayments.UsersApi | roleUpdate | POST /v2/users/{userId}/roleUpdate | Update User Role VeloPayments.UsersApi | unlockUserV2 | POST /v2/users/{userId}/unlock | Unlock a User VeloPayments.UsersApi | unregisterMFA | POST /v2/users/{userId}/mfa/unregister | Unregister MFA for the user VeloPayments.UsersApi | unregisterMFAForSelf | POST /v2/users/self/mfa/unregister | Unregister MFA for Self VeloPayments.UsersApi | updatePasswordSelf | POST /v2/users/self/password | Update Password for self VeloPayments.UsersApi | userDetailsUpdate | POST /v2/users/{userId}/userDetailsUpdate | Update User Details VeloPayments.UsersApi | userDetailsUpdateForSelf | POST /v2/users/self/userDetailsUpdate | Update User Details for self VeloPayments.UsersApi | validatePasswordSelf | POST /v2/users/self/password/validate | Validate the proposed password VeloPayments.WebhooksApi | createWebhookV1 | POST /v1/webhooks | Create Webhook VeloPayments.WebhooksApi | getWebhookV1 | GET /v1/webhooks/{webhookId} | Get details about the given webhook. VeloPayments.WebhooksApi | listWebhooksV1 | GET /v1/webhooks | List the details about the webhooks for the given payor. VeloPayments.WebhooksApi | pingWebhookV1 | POST /v1/webhooks/{webhookId}/ping | VeloPayments.WebhooksApi | updateWebhookV1 | POST /v1/webhooks/{webhookId} | Update Webhook

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

OAuth2

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
    • : Scopes not required

basicAuth

  • Type: HTTP basic authentication

oAuthVeloBackOffice

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
    • : Scopes not required