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

velopayments

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

velopayments

  • 2.37.150.beta1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Ruby client for Velo

License npm version CircleCI
VeloPayments - the Ruby gem for the Velo Payments APIs

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 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.

Overview

The Velo Payments API allows a payor to perform a number of operations. The following is a list of the main capabilities in a natural order of execution:

  • Authenticate with the Velo platform
  • 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 Considerations

The Velo Payments API is REST based and uses the JSON format for requests and responses.

Most calls are secured using OAuth 2 security and require a valid authentication access token for successful operation. See the Authentication section for details.

Where a dynamic value is required in the examples below, the {token} format is used, suggesting that the caller needs to supply the appropriate value of the token in question (without including the { or } characters).

Where curl examples are given, the –d @filename.json approach is used, indicating that the request body should be placed into a file named filename.json in the current directory. Each of the curl examples in this document should be considered a single line on the command-line, regardless of how they appear in print.

Authenticating with the Velo Platform

Once Velo backoffice staff have added your organization as a payor within the Velo platform sandbox, they will create you a payor Id, an API key and an API secret and share these with you in a secure manner.

You will need to use these values to authenticate with the Velo platform in order to gain access to the APIs. The steps to take are explained in the following:

create a string comprising the API key (e.g. 44a9537d-d55d-4b47-8082-14061c2bcdd8) and API secret (e.g. c396b26b-137a-44fd-87f5-34631f8fd529) with a colon between them. E.g. 44a9537d-d55d-4b47-8082-14061c2bcdd8:c396b26b-137a-44fd-87f5-34631f8fd529

base64 encode this string. E.g.: NDRhOTUzN2QtZDU1ZC00YjQ3LTgwODItMTQwNjFjMmJjZGQ4OmMzOTZiMjZiLTEzN2EtNDRmZC04N2Y1LTM0NjMxZjhmZDUyOQ==

create an HTTP Authorization header with the value set to e.g. Basic NDRhOTUzN2QtZDU1ZC00YjQ3LTgwODItMTQwNjFjMmJjZGQ4OmMzOTZiMjZiLTEzN2EtNDRmZC04N2Y1LTM0NjMxZjhmZDUyOQ==

perform the Velo authentication REST call using the HTTP header created above e.g. via curl:

  curl -X POST \\
  -H \"Content-Type: application/json\" \\
  -H \"Authorization: Basic NDRhOTUzN2QtZDU1ZC00YjQ3LTgwODItMTQwNjFjMmJjZGQ4OmMzOTZiMjZiLTEzN2EtNDRmZC04N2Y1LTM0NjMxZjhmZDUyOQ==\" \\
  'https://api.sandbox.velopayments.com/v1/authenticate?grant_type=client_credentials'

If successful, this call will result in a 200 HTTP status code and a response body such as:

  {
    \"access_token\":\"19f6bafd-93fd-4747-b229-00507bbc991f\",
    \"token_type\":\"bearer\",
    \"expires_in\":1799,
    \"scope\":\"...\"
  }

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 project:

  • API version: 2.37.150
  • Package version: 2.37.150.beta1
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build velopayments.gemspec

Then either install the gem locally:

gem install ./velopayments-2.37.150.beta1.gem

(for development, run gem install --dev ./velopayments-2.37.150.beta1.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'velopayments', '~> 2.37.150.beta1'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'velopayments', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'velopayments'

# Setup authorization
VeloPayments.configure do |config|
  # Configure OAuth2 access token for authorization: OAuth2
  config.access_token = 'YOUR ACCESS TOKEN'
  # Configure a proc to get access tokens in lieu of the static access_token configuration
  config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' } 
end

api_instance = VeloPayments::CountriesApi.new

begin
  #List Payment Channel Country Rules
  result = api_instance.list_payment_channel_rules_v1
  p result
rescue VeloPayments::ApiError => e
  puts "Exception when calling CountriesApi->list_payment_channel_rules_v1: #{e}"
end

Documentation for API Endpoints

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

ClassMethodHTTP requestDescription
VeloPayments::CountriesApilist_payment_channel_rules_v1GET /v1/paymentChannelRulesList Payment Channel Country Rules
VeloPayments::CountriesApilist_supported_countries_v1GET /v1/supportedCountriesList Supported Countries
VeloPayments::CountriesApilist_supported_countries_v2GET /v2/supportedCountriesList Supported Countries
VeloPayments::CurrenciesApilist_supported_currencies_v2GET /v2/currenciesList Supported Currencies
VeloPayments::FundingApicreate_funding_request_v2POST /v2/sourceAccounts/{sourceAccountId}/fundingRequestCreate Funding Request
VeloPayments::FundingApicreate_funding_request_v3POST /v3/sourceAccounts/{sourceAccountId}/fundingRequestCreate Funding Request
VeloPayments::FundingApiget_funding_account_v2GET /v2/fundingAccounts/{fundingAccountId}Get Funding Account
VeloPayments::FundingApiget_funding_accounts_v2GET /v2/fundingAccountsGet Funding Accounts
VeloPayments::FundingApiget_funding_by_id_v1GET /v1/fundings/{fundingId}Get Funding
VeloPayments::FundingApilist_funding_audit_deltasGET /v1/deltas/fundingsGet Funding Audit Delta
VeloPayments::FundingManagerPrivateApicreate_funding_account_v2POST /v2/fundingAccountsCreate Funding Account
VeloPayments::FundingManagerPrivateApidelete_source_account_v3DELETE /v3/sourceAccounts/{sourceAccountId}Delete a source account by ID
VeloPayments::LoginApilogoutPOST /v1/logoutLogout
VeloPayments::LoginApireset_passwordPOST /v1/password/resetReset password
VeloPayments::LoginApivalidate_access_tokenPOST /v1/validatevalidate
VeloPayments::LoginApivelo_authPOST /v1/authenticateAuthentication endpoint
VeloPayments::PayeeInvitationApicreate_payee_v3POST /v3/payeesInitiate Payee Creation
VeloPayments::PayeeInvitationApiget_payees_invitation_status_v3GET /v3/payees/payors/{payorId}/invitationStatusGet Payee Invitation Status
VeloPayments::PayeeInvitationApiget_payees_invitation_status_v4GET /v4/payees/payors/{payorId}/invitationStatusGet Payee Invitation Status
VeloPayments::PayeeInvitationApiquery_batch_status_v3GET /v3/payees/batch/{batchId}Query Batch Status
VeloPayments::PayeeInvitationApiquery_batch_status_v4GET /v4/payees/batch/{batchId}Query Batch Status
VeloPayments::PayeeInvitationApiresend_payee_invite_v3POST /v3/payees/{payeeId}/inviteResend Payee Invite
VeloPayments::PayeeInvitationApiresend_payee_invite_v4POST /v4/payees/{payeeId}/inviteResend Payee Invite
VeloPayments::PayeeInvitationApiv4_create_payeePOST /v4/payeesInitiate Payee Creation
VeloPayments::PayeePaymentChannelsApicreate_payment_channel_v4POST /v4/payees/{payeeId}/paymentChannels/Create Payment Channel
VeloPayments::PayeePaymentChannelsApidelete_payment_channel_v4DELETE /v4/payees/{payeeId}/paymentChannels/{paymentChannelId}Delete Payment Channel
VeloPayments::PayeePaymentChannelsApienable_payment_channel_v4POST /v4/payees/{payeeId}/paymentChannels/{paymentChannelId}/enableEnable Payment Channel
VeloPayments::PayeePaymentChannelsApiget_payment_channel_v4GET /v4/payees/{payeeId}/paymentChannels/{paymentChannelId}Get Payment Channel Details
VeloPayments::PayeePaymentChannelsApiget_payment_channels_v4GET /v4/payees/{payeeId}/paymentChannels/Get All Payment Channels Details
VeloPayments::PayeePaymentChannelsApiupdate_payment_channel_order_v4PUT /v4/payees/{payeeId}/paymentChannels/orderUpdate Payees preferred Payment Channel order
VeloPayments::PayeePaymentChannelsApiupdate_payment_channel_v4POST /v4/payees/{payeeId}/paymentChannels/{paymentChannelId}Update Payment Channel
VeloPayments::PayeesApidelete_payee_by_id_v3DELETE /v3/payees/{payeeId}Delete Payee by Id
VeloPayments::PayeesApidelete_payee_by_id_v4DELETE /v4/payees/{payeeId}Delete Payee by Id
VeloPayments::PayeesApiget_payee_by_id_v3GET /v3/payees/{payeeId}Get Payee by Id
VeloPayments::PayeesApiget_payee_by_id_v4GET /v4/payees/{payeeId}Get Payee by Id
VeloPayments::PayeesApilist_payee_changes_v3GET /v3/payees/deltasList Payee Changes
VeloPayments::PayeesApilist_payee_changes_v4GET /v4/payees/deltasList Payee Changes
VeloPayments::PayeesApilist_payees_v3GET /v3/payeesList Payees
VeloPayments::PayeesApilist_payees_v4GET /v4/payeesList Payees
VeloPayments::PayeesApipayee_details_update_v3POST /v3/payees/{payeeId}/payeeDetailsUpdateUpdate Payee Details
VeloPayments::PayeesApipayee_details_update_v4POST /v4/payees/{payeeId}/payeeDetailsUpdateUpdate Payee Details
VeloPayments::PayeesApiv3_payees_payee_id_remote_id_update_postPOST /v3/payees/{payeeId}/remoteIdUpdateUpdate Payee Remote Id
VeloPayments::PayeesApiv4_payees_payee_id_remote_id_update_postPOST /v4/payees/{payeeId}/remoteIdUpdateUpdate Payee Remote Id
VeloPayments::PaymentAuditServiceApiexport_transactions_csvv4GET /v4/paymentaudit/transactionsExport Transactions
VeloPayments::PaymentAuditServiceApiget_fundings_v4GET /v4/paymentaudit/fundingsGet Fundings for Payor
VeloPayments::PaymentAuditServiceApiget_payment_details_v4GET /v4/paymentaudit/payments/{paymentId}Get Payment
VeloPayments::PaymentAuditServiceApiget_payments_for_payout_v4GET /v4/paymentaudit/payouts/{payoutId}Get Payments for Payout
VeloPayments::PaymentAuditServiceApiget_payout_stats_v4GET /v4/paymentaudit/payoutStatisticsGet Payout Statistics
VeloPayments::PaymentAuditServiceApiget_payouts_for_payor_v4GET /v4/paymentaudit/payoutsGet Payouts for Payor
VeloPayments::PaymentAuditServiceApilist_payment_changes_v4GET /v4/payments/deltasList Payment Changes
VeloPayments::PaymentAuditServiceApilist_payments_audit_v4GET /v4/paymentaudit/paymentsGet List of Payments
VeloPayments::PaymentAuditServiceDeprecatedApiexport_transactions_csvv3GET /v3/paymentaudit/transactionsV3 Export Transactions
VeloPayments::PaymentAuditServiceDeprecatedApiget_fundings_v1GET /v1/paymentaudit/fundingsV1 Get Fundings for Payor
VeloPayments::PaymentAuditServiceDeprecatedApiget_payment_details_v3GET /v3/paymentaudit/payments/{paymentId}V3 Get Payment
VeloPayments::PaymentAuditServiceDeprecatedApiget_payments_for_payout_pav3GET /v3/paymentaudit/payouts/{payoutId}V3 Get Payments for Payout
VeloPayments::PaymentAuditServiceDeprecatedApiget_payout_stats_v1GET /v1/paymentaudit/payoutStatisticsV1 Get Payout Statistics
VeloPayments::PaymentAuditServiceDeprecatedApiget_payouts_for_payor_v3GET /v3/paymentaudit/payoutsV3 Get Payouts for Payor
VeloPayments::PaymentAuditServiceDeprecatedApilist_payment_changesGET /v1/deltas/paymentsV1 List Payment Changes
VeloPayments::PaymentAuditServiceDeprecatedApilist_payments_audit_v3GET /v3/paymentaudit/paymentsV3 Get List of Payments
VeloPayments::PayorHierarchyApipayor_links_v1GET /v1/payorLinksList Payor Links
VeloPayments::PayorsApiget_payor_by_id_v2GET /v2/payors/{payorId}Get Payor
VeloPayments::PayorsApipayor_add_payor_logo_v1POST /v1/payors/{payorId}/branding/logosAdd Logo
VeloPayments::PayorsApipayor_create_api_key_v1POST /v1/payors/{payorId}/applications/{applicationId}/keysCreate API Key
VeloPayments::PayorsApipayor_create_application_v1POST /v1/payors/{payorId}/applicationsCreate Application
VeloPayments::PayorsApipayor_email_opt_outPOST /v1/payors/{payorId}/reminderEmailsUpdateReminder Email Opt-Out
VeloPayments::PayorsApipayor_get_brandingGET /v1/payors/{payorId}/brandingGet Branding
VeloPayments::PayorsPrivateApicreate_payor_linksPOST /v1/payorLinksCreate a Payor Link
VeloPayments::PayoutsApicreate_quote_for_payout_v3POST /v3/payouts/{payoutId}/quoteCreate a quote for the payout
VeloPayments::PayoutsApideschedule_payoutDELETE /v3/payouts/{payoutId}/scheduleDeschedule a payout
VeloPayments::PayoutsApiget_payments_for_payout_v3GET /v3/payouts/{payoutId}/paymentsRetrieve payments for a payout
VeloPayments::PayoutsApiget_payout_summary_v3GET /v3/payouts/{payoutId}Get Payout Summary
VeloPayments::PayoutsApiinstruct_payout_v3POST /v3/payouts/{payoutId}Instruct Payout
VeloPayments::PayoutsApischedule_for_payoutPOST /v3/payouts/{payoutId}/scheduleSchedule a payout
VeloPayments::PayoutsApisubmit_payout_v3POST /v3/payoutsSubmit Payout
VeloPayments::PayoutsApiwithdraw_paymentPOST /v1/payments/{paymentId}/withdrawWithdraw a Payment
VeloPayments::PayoutsApiwithdraw_payout_v3DELETE /v3/payouts/{payoutId}Withdraw Payout
VeloPayments::SourceAccountsApiget_source_account_v2GET /v2/sourceAccounts/{sourceAccountId}Get Source Account
VeloPayments::SourceAccountsApiget_source_account_v3GET /v3/sourceAccounts/{sourceAccountId}Get details about given source account.
VeloPayments::SourceAccountsApiget_source_accounts_v2GET /v2/sourceAccountsGet list of source accounts
VeloPayments::SourceAccountsApiget_source_accounts_v3GET /v3/sourceAccountsGet list of source accounts
VeloPayments::SourceAccountsApiset_notifications_requestPOST /v1/sourceAccounts/{sourceAccountId}/notificationsSet notifications
VeloPayments::SourceAccountsApiset_notifications_request_v3POST /v3/sourceAccounts/{sourceAccountId}/notificationsSet notifications
VeloPayments::SourceAccountsApitransfer_funds_v2POST /v2/sourceAccounts/{sourceAccountId}/transfersTransfer Funds between source accounts
VeloPayments::SourceAccountsApitransfer_funds_v3POST /v3/sourceAccounts/{sourceAccountId}/transfersTransfer Funds between source accounts
VeloPayments::TokensApiresend_tokenPOST /v2/users/{userId}/tokensResend a token
VeloPayments::TransactionsApicreate_transaction_v1POST /v1/transactionsCreate a Transaction
VeloPayments::TransactionsApiget_transaction_by_id_v1GET /v1/transactions/{transactionId}Get Transaction
VeloPayments::TransactionsApiget_transactionsGET /v1/transactionsGet Transactions
VeloPayments::UsersApidelete_user_by_id_v2DELETE /v2/users/{userId}Delete a User
VeloPayments::UsersApidisable_user_v2POST /v2/users/{userId}/disableDisable a User
VeloPayments::UsersApienable_user_v2POST /v2/users/{userId}/enableEnable a User
VeloPayments::UsersApiget_selfGET /v2/users/selfGet Self
VeloPayments::UsersApiget_user_by_id_v2GET /v2/users/{userId}Get User
VeloPayments::UsersApiinvite_userPOST /v2/users/inviteInvite a User
VeloPayments::UsersApilist_usersGET /v2/usersList Users
VeloPayments::UsersApiregister_smsPOST /v2/users/registration/smsRegister SMS Number
VeloPayments::UsersApiresend_tokenPOST /v2/users/{userId}/tokensResend a token
VeloPayments::UsersApirole_updatePOST /v2/users/{userId}/roleUpdateUpdate User Role
VeloPayments::UsersApiunlock_user_v2POST /v2/users/{userId}/unlockUnlock a User
VeloPayments::UsersApiunregister_mfaPOST /v2/users/{userId}/mfa/unregisterUnregister MFA for the user
VeloPayments::UsersApiunregister_mfa_for_selfPOST /v2/users/self/mfa/unregisterUnregister MFA for Self
VeloPayments::UsersApiupdate_password_selfPOST /v2/users/self/passwordUpdate Password for self
VeloPayments::UsersApiuser_details_updatePOST /v2/users/{userId}/userDetailsUpdateUpdate User Details
VeloPayments::UsersApiuser_details_update_for_selfPOST /v2/users/self/userDetailsUpdateUpdate User Details for self
VeloPayments::UsersApivalidate_password_selfPOST /v2/users/self/password/validateValidate the proposed password
VeloPayments::WebhooksApicreate_webhook_v1POST /v1/webhooksCreate Webhook
VeloPayments::WebhooksApiget_webhook_v1GET /v1/webhooks/{webhookId}Get details about the given webhook.
VeloPayments::WebhooksApilist_webhooks_v1GET /v1/webhooksList the details about the webhooks for the given payor.
VeloPayments::WebhooksApiping_webhook_v1POST /v1/webhooks/{webhookId}/ping
VeloPayments::WebhooksApiupdate_webhook_v1POST /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

FAQs

Package last updated on 28 Nov 2023

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