2.37.150-beta.1 • Published 5 months ago

velo-payments v2.37.150-beta.1

Weekly downloads
16
License
Apache License 2....
Repository
-
Last release
5 months ago

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:

```bash
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

ClassMethodHTTP requestDescription
VeloPayments.CountriesApilistPaymentChannelRulesV1GET /v1/paymentChannelRulesList Payment Channel Country Rules
VeloPayments.CountriesApilistSupportedCountriesV1GET /v1/supportedCountriesList Supported Countries
VeloPayments.CountriesApilistSupportedCountriesV2GET /v2/supportedCountriesList Supported Countries
VeloPayments.CurrenciesApilistSupportedCurrenciesV2GET /v2/currenciesList Supported Currencies
VeloPayments.FundingApicreateFundingRequestV2POST /v2/sourceAccounts/{sourceAccountId}/fundingRequestCreate Funding Request
VeloPayments.FundingApicreateFundingRequestV3POST /v3/sourceAccounts/{sourceAccountId}/fundingRequestCreate Funding Request
VeloPayments.FundingApigetFundingAccountV2GET /v2/fundingAccounts/{fundingAccountId}Get Funding Account
VeloPayments.FundingApigetFundingAccountsV2GET /v2/fundingAccountsGet Funding Accounts
VeloPayments.FundingApigetFundingByIdV1GET /v1/fundings/{fundingId}Get Funding
VeloPayments.FundingApilistFundingAuditDeltasGET /v1/deltas/fundingsGet Funding Audit Delta
VeloPayments.FundingManagerPrivateApicreateFundingAccountV2POST /v2/fundingAccountsCreate Funding Account
VeloPayments.FundingManagerPrivateApideleteSourceAccountV3DELETE /v3/sourceAccounts/{sourceAccountId}Delete a source account by ID
VeloPayments.LoginApilogoutPOST /v1/logoutLogout
VeloPayments.LoginApiresetPasswordPOST /v1/password/resetReset password
VeloPayments.LoginApivalidateAccessTokenPOST /v1/validatevalidate
VeloPayments.LoginApiveloAuthPOST /v1/authenticateAuthentication endpoint
VeloPayments.PayeeInvitationApicreatePayeeV3POST /v3/payeesInitiate Payee Creation
VeloPayments.PayeeInvitationApigetPayeesInvitationStatusV3GET /v3/payees/payors/{payorId}/invitationStatusGet Payee Invitation Status
VeloPayments.PayeeInvitationApigetPayeesInvitationStatusV4GET /v4/payees/payors/{payorId}/invitationStatusGet Payee Invitation Status
VeloPayments.PayeeInvitationApiqueryBatchStatusV3GET /v3/payees/batch/{batchId}Query Batch Status
VeloPayments.PayeeInvitationApiqueryBatchStatusV4GET /v4/payees/batch/{batchId}Query Batch Status
VeloPayments.PayeeInvitationApiresendPayeeInviteV3POST /v3/payees/{payeeId}/inviteResend Payee Invite
VeloPayments.PayeeInvitationApiresendPayeeInviteV4POST /v4/payees/{payeeId}/inviteResend Payee Invite
VeloPayments.PayeeInvitationApiv4CreatePayeePOST /v4/payeesInitiate Payee Creation
VeloPayments.PayeePaymentChannelsApicreatePaymentChannelV4POST /v4/payees/{payeeId}/paymentChannels/Create Payment Channel
VeloPayments.PayeePaymentChannelsApideletePaymentChannelV4DELETE /v4/payees/{payeeId}/paymentChannels/{paymentChannelId}Delete Payment Channel
VeloPayments.PayeePaymentChannelsApienablePaymentChannelV4POST /v4/payees/{payeeId}/paymentChannels/{paymentChannelId}/enableEnable Payment Channel
VeloPayments.PayeePaymentChannelsApigetPaymentChannelV4GET /v4/payees/{payeeId}/paymentChannels/{paymentChannelId}Get Payment Channel Details
VeloPayments.PayeePaymentChannelsApigetPaymentChannelsV4GET /v4/payees/{payeeId}/paymentChannels/Get All Payment Channels Details
VeloPayments.PayeePaymentChannelsApiupdatePaymentChannelOrderV4PUT /v4/payees/{payeeId}/paymentChannels/orderUpdate Payees preferred Payment Channel order
VeloPayments.PayeePaymentChannelsApiupdatePaymentChannelV4POST /v4/payees/{payeeId}/paymentChannels/{paymentChannelId}Update Payment Channel
VeloPayments.PayeesApideletePayeeByIdV3DELETE /v3/payees/{payeeId}Delete Payee by Id
VeloPayments.PayeesApideletePayeeByIdV4DELETE /v4/payees/{payeeId}Delete Payee by Id
VeloPayments.PayeesApigetPayeeByIdV3GET /v3/payees/{payeeId}Get Payee by Id
VeloPayments.PayeesApigetPayeeByIdV4GET /v4/payees/{payeeId}Get Payee by Id
VeloPayments.PayeesApilistPayeeChangesV3GET /v3/payees/deltasList Payee Changes
VeloPayments.PayeesApilistPayeeChangesV4GET /v4/payees/deltasList Payee Changes
VeloPayments.PayeesApilistPayeesV3GET /v3/payeesList Payees
VeloPayments.PayeesApilistPayeesV4GET /v4/payeesList Payees
VeloPayments.PayeesApipayeeDetailsUpdateV3POST /v3/payees/{payeeId}/payeeDetailsUpdateUpdate Payee Details
VeloPayments.PayeesApipayeeDetailsUpdateV4POST /v4/payees/{payeeId}/payeeDetailsUpdateUpdate Payee Details
VeloPayments.PayeesApiv3PayeesPayeeIdRemoteIdUpdatePostPOST /v3/payees/{payeeId}/remoteIdUpdateUpdate Payee Remote Id
VeloPayments.PayeesApiv4PayeesPayeeIdRemoteIdUpdatePostPOST /v4/payees/{payeeId}/remoteIdUpdateUpdate Payee Remote Id
VeloPayments.PaymentAuditServiceApiexportTransactionsCSVV4GET /v4/paymentaudit/transactionsExport Transactions
VeloPayments.PaymentAuditServiceApigetFundingsV4GET /v4/paymentaudit/fundingsGet Fundings for Payor
VeloPayments.PaymentAuditServiceApigetPaymentDetailsV4GET /v4/paymentaudit/payments/{paymentId}Get Payment
VeloPayments.PaymentAuditServiceApigetPaymentsForPayoutV4GET /v4/paymentaudit/payouts/{payoutId}Get Payments for Payout
VeloPayments.PaymentAuditServiceApigetPayoutStatsV4GET /v4/paymentaudit/payoutStatisticsGet Payout Statistics
VeloPayments.PaymentAuditServiceApigetPayoutsForPayorV4GET /v4/paymentaudit/payoutsGet Payouts for Payor
VeloPayments.PaymentAuditServiceApilistPaymentChangesV4GET /v4/payments/deltasList Payment Changes
VeloPayments.PaymentAuditServiceApilistPaymentsAuditV4GET /v4/paymentaudit/paymentsGet List of Payments
VeloPayments.PaymentAuditServiceDeprecatedApiexportTransactionsCSVV3GET /v3/paymentaudit/transactionsV3 Export Transactions
VeloPayments.PaymentAuditServiceDeprecatedApigetFundingsV1GET /v1/paymentaudit/fundingsV1 Get Fundings for Payor
VeloPayments.PaymentAuditServiceDeprecatedApigetPaymentDetailsV3GET /v3/paymentaudit/payments/{paymentId}V3 Get Payment
VeloPayments.PaymentAuditServiceDeprecatedApigetPaymentsForPayoutPAV3GET /v3/paymentaudit/payouts/{payoutId}V3 Get Payments for Payout
VeloPayments.PaymentAuditServiceDeprecatedApigetPayoutStatsV1GET /v1/paymentaudit/payoutStatisticsV1 Get Payout Statistics
VeloPayments.PaymentAuditServiceDeprecatedApigetPayoutsForPayorV3GET /v3/paymentaudit/payoutsV3 Get Payouts for Payor
VeloPayments.PaymentAuditServiceDeprecatedApilistPaymentChangesGET /v1/deltas/paymentsV1 List Payment Changes
VeloPayments.PaymentAuditServiceDeprecatedApilistPaymentsAuditV3GET /v3/paymentaudit/paymentsV3 Get List of Payments
VeloPayments.PayorHierarchyApipayorLinksV1GET /v1/payorLinksList Payor Links
VeloPayments.PayorsApigetPayorByIdV2GET /v2/payors/{payorId}Get Payor
VeloPayments.PayorsApipayorAddPayorLogoV1POST /v1/payors/{payorId}/branding/logosAdd Logo
VeloPayments.PayorsApipayorCreateApiKeyV1POST /v1/payors/{payorId}/applications/{applicationId}/keysCreate API Key
VeloPayments.PayorsApipayorCreateApplicationV1POST /v1/payors/{payorId}/applicationsCreate Application
VeloPayments.PayorsApipayorEmailOptOutPOST /v1/payors/{payorId}/reminderEmailsUpdateReminder Email Opt-Out
VeloPayments.PayorsApipayorGetBrandingGET /v1/payors/{payorId}/brandingGet Branding
VeloPayments.PayorsPrivateApicreatePayorLinksPOST /v1/payorLinksCreate a Payor Link
VeloPayments.PayoutsApicreateQuoteForPayoutV3POST /v3/payouts/{payoutId}/quoteCreate a quote for the payout
VeloPayments.PayoutsApideschedulePayoutDELETE /v3/payouts/{payoutId}/scheduleDeschedule a payout
VeloPayments.PayoutsApigetPaymentsForPayoutV3GET /v3/payouts/{payoutId}/paymentsRetrieve payments for a payout
VeloPayments.PayoutsApigetPayoutSummaryV3GET /v3/payouts/{payoutId}Get Payout Summary
VeloPayments.PayoutsApiinstructPayoutV3POST /v3/payouts/{payoutId}Instruct Payout
VeloPayments.PayoutsApischeduleForPayoutPOST /v3/payouts/{payoutId}/scheduleSchedule a payout
VeloPayments.PayoutsApisubmitPayoutV3POST /v3/payoutsSubmit Payout
VeloPayments.PayoutsApiwithdrawPaymentPOST /v1/payments/{paymentId}/withdrawWithdraw a Payment
VeloPayments.PayoutsApiwithdrawPayoutV3DELETE /v3/payouts/{payoutId}Withdraw Payout
VeloPayments.SourceAccountsApigetSourceAccountV2GET /v2/sourceAccounts/{sourceAccountId}Get Source Account
VeloPayments.SourceAccountsApigetSourceAccountV3GET /v3/sourceAccounts/{sourceAccountId}Get details about given source account.
VeloPayments.SourceAccountsApigetSourceAccountsV2GET /v2/sourceAccountsGet list of source accounts
VeloPayments.SourceAccountsApigetSourceAccountsV3GET /v3/sourceAccountsGet list of source accounts
VeloPayments.SourceAccountsApisetNotificationsRequestPOST /v1/sourceAccounts/{sourceAccountId}/notificationsSet notifications
VeloPayments.SourceAccountsApisetNotificationsRequestV3POST /v3/sourceAccounts/{sourceAccountId}/notificationsSet notifications
VeloPayments.SourceAccountsApitransferFundsV2POST /v2/sourceAccounts/{sourceAccountId}/transfersTransfer Funds between source accounts
VeloPayments.SourceAccountsApitransferFundsV3POST /v3/sourceAccounts/{sourceAccountId}/transfersTransfer Funds between source accounts
VeloPayments.TokensApiresendTokenPOST /v2/users/{userId}/tokensResend a token
VeloPayments.TransactionsApicreateTransactionV1POST /v1/transactionsCreate a Transaction
VeloPayments.TransactionsApigetTransactionByIdV1GET /v1/transactions/{transactionId}Get Transaction
VeloPayments.TransactionsApigetTransactionsGET /v1/transactionsGet Transactions
VeloPayments.UsersApideleteUserByIdV2DELETE /v2/users/{userId}Delete a User
VeloPayments.UsersApidisableUserV2POST /v2/users/{userId}/disableDisable a User
VeloPayments.UsersApienableUserV2POST /v2/users/{userId}/enableEnable a User
VeloPayments.UsersApigetSelfGET /v2/users/selfGet Self
VeloPayments.UsersApigetUserByIdV2GET /v2/users/{userId}Get User
VeloPayments.UsersApiinviteUserPOST /v2/users/inviteInvite a User
VeloPayments.UsersApilistUsersGET /v2/usersList Users
VeloPayments.UsersApiregisterSmsPOST /v2/users/registration/smsRegister SMS Number
VeloPayments.UsersApiresendTokenPOST /v2/users/{userId}/tokensResend a token
VeloPayments.UsersApiroleUpdatePOST /v2/users/{userId}/roleUpdateUpdate User Role
VeloPayments.UsersApiunlockUserV2POST /v2/users/{userId}/unlockUnlock a User
VeloPayments.UsersApiunregisterMFAPOST /v2/users/{userId}/mfa/unregisterUnregister MFA for the user
VeloPayments.UsersApiunregisterMFAForSelfPOST /v2/users/self/mfa/unregisterUnregister MFA for Self
VeloPayments.UsersApiupdatePasswordSelfPOST /v2/users/self/passwordUpdate Password for self
VeloPayments.UsersApiuserDetailsUpdatePOST /v2/users/{userId}/userDetailsUpdateUpdate User Details
VeloPayments.UsersApiuserDetailsUpdateForSelfPOST /v2/users/self/userDetailsUpdateUpdate User Details for self
VeloPayments.UsersApivalidatePasswordSelfPOST /v2/users/self/password/validateValidate the proposed password
VeloPayments.WebhooksApicreateWebhookV1POST /v1/webhooksCreate Webhook
VeloPayments.WebhooksApigetWebhookV1GET /v1/webhooks/{webhookId}Get details about the given webhook.
VeloPayments.WebhooksApilistWebhooksV1GET /v1/webhooksList the details about the webhooks for the given payor.
VeloPayments.WebhooksApipingWebhookV1POST /v1/webhooks/{webhookId}/ping
VeloPayments.WebhooksApiupdateWebhookV1POST /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
2.37.150-beta.1

5 months ago

2.35.58-beta.1

7 months ago

2.35.58

6 months ago

2.30.53-beta.1

2 years ago

2.30.53

2 years ago

2.26.124-beta.1

3 years ago

2.23.78-beta.1

4 years ago

2.20.118

4 years ago

2.20.29-beta.1

4 years ago

2.19.116

4 years ago

2.19.40-beta.1

4 years ago

2.18.113

4 years ago

2.18.31-beta.1

4 years ago

2.17.8-beta.2

4 years ago

2.14.90-rc.1

5 years ago

2.11.73-rc.1

5 years ago

2.11.67

5 years ago