SDKs overview
Moov provides Software Development Kits (SDKs) to facilitate the integration of its payment processing and financial infrastructure services. These SDKs are language-specific client libraries designed to interact with the Moov API, allowing developers to programmatically manage accounts, initiate transfers, handle payouts, and access other core Moov functionalities. By abstracting the underlying HTTP requests and response parsing, SDKs aim to simplify development, reduce boilerplate code, and provide a more idiomatic experience for developers working in specific programming languages. The official Moov SDKs support popular languages such as Node.js, Python, Go, and Ruby, enabling a broad range of applications to integrate Moov's capabilities.
The SDKs are maintained to reflect the latest API versions and best practices, ensuring compatibility and access to new features as they are released. They typically include methods for authentication, error handling, and data serialization, aligning with the conventions of their respective languages. For instance, the Node.js SDK leverages asynchronous patterns, while the Go SDK provides a more concurrent-friendly interface. This design choice helps developers build scalable and efficient payment solutions without needing to manage raw API interactions directly. Developers can consult the Moov developer documentation for detailed guides on using each SDK and specific API endpoints.
Official SDKs by language
Moov maintains official SDKs for several programming languages, providing tested and supported client libraries for interacting with its API. These SDKs are designed to offer a consistent and streamlined developer experience across different environments. Each SDK is tailored to the conventions and ecosystems of its target language, simplifying the process of integrating payment functionalities into applications.
The following table outlines the official SDKs, their respective package managers, installation commands, and general maturity levels:
| Language | Package | Install Command | Maturity |
|---|---|---|---|
| Node.js | @moovio/moov-js |
npm install @moovio/moov-js or yarn add @moovio/moov-js |
Stable |
| Python | moov-python |
pip install moov-python |
Stable |
| Go | github.com/moov-io/sdk-go |
go get github.com/moov-io/sdk-go |
Stable |
| Ruby | moov-ruby |
gem install moov-ruby |
Stable |
These SDKs are developed and maintained by Moov to ensure compatibility with the latest API versions and to provide robust, high-performance client libraries. They include support for key Moov features such as Moov Accounts management, handling Moov Transfers, and managing Moov Payouts. Developers are encouraged to refer to the specific SDK documentation within the Moov developer portal for detailed usage instructions and examples relevant to each language.
Installation
Installing Moov SDKs involves using the standard package manager for each respective programming language. Each SDK is distributed through its language's primary package repository, ensuring straightforward integration into existing projects. The installation process typically requires a single command executed in the project's terminal.
Node.js
For Node.js projects, the Moov SDK is available via npm or Yarn. Navigate to your project directory and run one of the following commands:
npm install @moovio/moov-js
# or
yarn add @moovio/moov-js
This command adds the @moovio/moov-js package to your project's dependencies, making Moov's client library available for import and use.
Python
Python developers can install the Moov SDK using pip, the standard package installer for Python. Execute the following command in your virtual environment or project directory:
pip install moov-python
This command fetches the moov-python package from PyPI and installs it, allowing you to import and utilize Moov's functionalities within your Python applications.
Go
Go projects integrate the Moov SDK by using the go get command. From your project's root, run:
go get github.com/moov-io/sdk-go
This command downloads the Go SDK source code and adds it to your project's module dependencies, enabling you to import the Moov package into your Go files.
Ruby
For Ruby applications, the Moov SDK is distributed as a gem. Install it by running:
gem install moov-ruby
After installation, you can require the moov-ruby gem in your Ruby scripts or applications to access Moov's API client methods. For detailed setup and configuration, refer to the Moov developer portal for installation instructions.
Quickstart example
A common first step when using any Moov SDK is to set up the client with your API keys and then create a Moov account. This example demonstrates how to initialize the Node.js SDK and create a basic Moov account. This process typically involves providing an environment URL and your secret API key, which authenticates your requests to the Moov platform. The creation of a Moov account is fundamental for initiating any financial transactions or managing funds within the Moov ecosystem.
Node.js Quickstart: Creating a Moov Account
This example initializes the Moov Node.js client and then calls the createAccount method to provision a new Moov account. Replace "your_secret_api_key" and "https://api.moov.io" with your actual credentials and the correct API endpoint for your environment (e.g., sandbox or production). The createAccount method typically requires an object specifying the account's type and any initial details, such as a profile ID or legal entity information, though a minimal request can often suffice for testing.
const Moov = require('@moovio/moov-js');
const moov = new Moov({
host: 'https://api.moov.io', // Or your sandbox/production host
secretKey: 'your_secret_api_key', // Replace with your actual secret API key
});
async function createNewMoovAccount() {
try {
const account = await moov.accounts.create({
type: 'individual',
profileID: 'profile_xxxxxxxxxxxxxxxxxxxx',
// Additional account details like legal entity, capabilities, etc.
});
console.log('Moov Account created successfully:', account);
return account;
} catch (error) {
console.error('Error creating Moov Account:', error.response ? error.response.data : error.message);
throw error;
}
}
createNewMoovAccount();
This snippet demonstrates the basic flow: client instantiation, configuration with credentials, and calling an API method. The profileID is a unique identifier for the legal entity associated with the account, which is crucial for compliance and identity verification processes. For more complex scenarios, such as adding capabilities or linking external bank accounts, additional parameters would be passed to the create method. The Moov API reference for Accounts provides a comprehensive list of available fields and their descriptions.
Community libraries
While Moov provides a set of official SDKs, the broader developer community may also contribute libraries or tools that interact with the Moov API. These community-driven projects can range from wrappers in languages not officially supported by Moov to specialized integrations or utility functions built on top of the existing SDKs. Community libraries offer alternative approaches and can sometimes address niche use cases or preferences not covered by the official offerings.
However, it is important to note that community libraries are not officially supported or maintained by Moov. Their quality, security, and ongoing compatibility with the Moov API may vary. Developers considering using community-contributed code should exercise due diligence, reviewing the project's documentation, source code, and community activity. Checking the project's GitHub repository for recent commits, open issues, and pull requests can provide insight into its maintenance status. For example, developers leveraging open-source components often look for projects with active contributors and clear licensing, as outlined in guides for evaluating open-source software like those provided by Google's Open Source program. For mission-critical applications, relying on official SDKs and direct API interactions as documented in the Moov developer documentation is generally recommended to ensure stability, security, and access to support.
Developers interested in contributing to the Moov ecosystem or creating their own client libraries can refer to the Moov API Reference for detailed endpoint specifications and data models. The API is designed with RESTful principles, making it accessible for building custom clients in any language that can make HTTP requests.