Skip to content

moovfinancial/moov-java

Repository files navigation

sdk

Developer-friendly & type-safe Java SDK specifically catered to leverage sdk API.



Important

This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your workspace. Delete this section before > publishing to a package manager.

Summary

Moov API: Moov is a platform that enables developers to integrate all aspects of money movement with ease and speed. The Moov API makes it simple for platforms to send, receive, and store money. Our API is based upon REST principles, returns JSON responses, and uses standard HTTP response codes. To learn more about how Moov works at a high level, read our concepts guide.

Table of Contents

SDK Installation

Getting started

JDK 11 or later is required.

The samples below show how a published SDK artifact is used:

Gradle:

implementation 'io.moov:sdk:0.7.1'

Maven:

<dependency>
    <groupId>io.moov</groupId>
    <artifactId>sdk</artifactId>
    <version>0.7.1</version>
</dependency>

How to build

After cloning the git repository to your file system you can build the SDK artifact from source to the build directory by running ./gradlew build on *nix systems or gradlew.bat on Windows systems.

If you wish to build from source and publish the SDK artifact to your local Maven repository (on your filesystem) then use the following command (after cloning the git repo locally):

On *nix:

./gradlew publishToMavenLocal -Pskip.signing

On Windows:

gradlew.bat publishToMavenLocal -Pskip.signing

SDK Example Usage

Example

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.AccountType;
import io.moov.sdk.models.components.CreateAccount;
import io.moov.sdk.models.components.CreateBusinessProfile;
import io.moov.sdk.models.components.CreateProfile;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.errors.CreateAccountResponseBody;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.operations.CreateAccountResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws GenericError, CreateAccountResponseBody, Exception {

        Moov sdk = Moov.builder()
                .security(Security.builder()
                    .username("")
                    .password("")
                    .build())
            .build();

        CreateAccountResponse res = sdk.accounts().create()
                .xMoovVersion("v2024.01")
                .createAccount(CreateAccount.builder()
                    .accountType(AccountType.BUSINESS)
                    .profile(CreateProfile.builder()
                        .business(CreateBusinessProfile.builder()
                            .legalBusinessName("Classbooker, LLC")
                            .build())
                        .build())
                    .build())
                .call();

        if (res.account().isPresent()) {
            // handle response
        }
    }
}

Authentication

Per-Client Security Schemes

This SDK supports the following security scheme globally:

Name Type Scheme
username
password
http HTTP Basic

You can set the security parameters through the security builder method when initializing the SDK client instance. For example:

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.AccountType;
import io.moov.sdk.models.components.CreateAccount;
import io.moov.sdk.models.components.CreateBusinessProfile;
import io.moov.sdk.models.components.CreateProfile;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.errors.CreateAccountResponseBody;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.operations.CreateAccountResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws GenericError, CreateAccountResponseBody, Exception {

        Moov sdk = Moov.builder()
                .security(Security.builder()
                    .username("")
                    .password("")
                    .build())
            .build();

        CreateAccountResponse res = sdk.accounts().create()
                .xMoovVersion("v2024.01")
                .createAccount(CreateAccount.builder()
                    .accountType(AccountType.BUSINESS)
                    .profile(CreateProfile.builder()
                        .business(CreateBusinessProfile.builder()
                            .legalBusinessName("Classbooker, LLC")
                            .build())
                        .build())
                    .build())
                .call();

        if (res.account().isPresent()) {
            // handle response
        }
    }
}

Available Resources and Operations

Available methods
  • create - You can create business or individual accounts for your users (i.e., customers, merchants) by passing the required information to Moov. Requirements differ per account type and requested capabilities.

If you're requesting the wallet, send-funds, collect-funds, or card-issuing capabilities, you'll need to:

  • Send Moov the user platform terms of service agreement acceptance. This can be done upon account creation, or by patching the account using the termsOfService field. If you're creating a business account with the business type llc, partnership, or privateCorporation, you'll need to:
  • Provide business representatives after creating the account.
  • Patch the account to indicate that business representative ownership information is complete.

Visit our documentation to read more about creating accounts and verification requirements. Note that the mode field (for production or sandbox) is only required when creating a facilitator account. All non-facilitator account requests will ignore the mode field and be set to the calling facilitator's mode.

To access this endpoint using an access token you'll need to specify the /accounts.write scope.

  • list - List or search accounts to which the caller is connected.

All supported query parameters are optional. If none are provided the response will include all connected accounts. Pagination is supported via the skip and count query parameters. Searching by name and email will overlap and return results based on relevance.

To access this endpoint using an access token you'll need to specify the /accounts.read scope.

  • get - Retrieves details for the account with the specified ID.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.read scope.

  • update - When can profile data be updated:

    • For unverified accounts, all profile data can be edited.
    • During the verification process, missing or incomplete profile data can be edited.
    • Verified accounts can only add missing profile data.

    When can't profile data be updated:

    • Verified accounts cannot change any existing profile data.

If you need to update information in a locked state, please contact Moov support.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.write scope.

  • disconnect - This will sever the connection between you and the account specified and it will no longer be listed as active in the list of accounts. This also means you'll only have read-only access to the account going forward for reporting purposes.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.disconnect scope.

  • getCountries - Retrieve the specified countries of operation for an account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.read scope.

This endpoint will always overwrite the previously assigned values.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.write scope.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.read scope.

  • getTermsOfServiceToken - Generates a non-expiring token that can then be used to accept Moov's terms of service.

This token can only be generated via API. Any Moov account requesting the collect funds, send funds, wallet, or card issuing capabilities must accept Moov's terms of service, then have the generated terms of service token patched to the account. Read more in our documentation.

  • list - List adjustments associated with a Moov account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.read scope.

  • get - Retrieve a specific adjustment associated with a Moov account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.read scope.

Any domains that will be used to accept payments must first be verified with Apple.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/apple-pay.write scope.

Any domains that will be used to accept payments must first be verified with Apple.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/apple-pay.write scope.

Read our Apple Pay tutorial to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/apple-pay.read scope.

  • createSession - Create a session with Apple Pay to facilitate a payment.

Read our Apple Pay tutorial to learn more. A successful response from this endpoint should be passed through to Apple Pay unchanged.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/apple-pay.write scope.

  • linkToken - Connect an Apple Pay token to the specified account.

Read our Apple Pay tutorial to learn more. The token data is defined by Apple Pay and should be passed through from Apple Pay's response unmodified.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/cards.write scope.

Allows clients to notify the authorization server that a previously obtained refresh or access token is no longer needed.

  • get - Get avatar image for an account using a unique ID.

To access this endpoint using an access token you'll need to specify the /profile-enrichment.read scope.

It is strongly recommended that callers include the X-Wait-For header, set to payment-method, if the newly linked bank-account is intended to be used right away. If this header is not included, the caller will need to poll the List Payment Methods endpoint to wait for the new payment methods to be available for use.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/bank-accounts.write scope.

  • list - List all the bank accounts associated with a particular Moov account.

Read our bank accounts guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/bank-accounts.read scope.

  • get - Retrieve bank account details (i.e. routing number or account type) associated with a specific Moov account.

Read our bank accounts guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/bank-accounts.read scope.

  • disable - Discontinue using a specified bank account linked to a Moov account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/bank-accounts.write scope.

  • initiateMicroDeposits - Micro-deposits help confirm bank account ownership, helping reduce fraud and the risk of unauthorized activity. Use this method to initiate the micro-deposit verification, sending two small credit transfers to the bank account you want to confirm.

If you request micro-deposits before 4:15PM ET, they will appear that same day. If you request micro-deposits any time after 4:15PM ET, they will appear the next banking day. When the two credits are initiated, Moov simultaneously initiates a debit to recoup the micro-deposits.

Micro-deposits initiated for a sandbox bank account will always be $0.00 / $0.00 and instantly verifiable once initiated.

You can simulate micro-deposit verification in test mode. See our test mode guide for more information.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/bank-accounts.write scope.

  • completeMicroDeposits - Complete the micro-deposit validation process by passing the amounts of the two transfers within three tries.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/bank-accounts.write scope.

  • getVerification - Retrieve the current status and details of an instant verification, including whether the verification method was instant or same-day ACH. This helps track the verification process in real-time and provides details in case of exceptions.

The status will indicate the following:

  • new: Verification initiated, credit pending to the payment network
  • sent-credit: Credit sent, available for verification
  • failed: Verification failed, description provided, user needs to add a new bank account
  • expired: Verification expired after 14 days, initiate another verification
  • max-attempts-exceeded: Five incorrect code attempts exhausted, initiate another verification

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/bank-accounts.read scope.

  • initiateVerification - Instant micro-deposit verification offers a quick and efficient way to verify bank account ownership.

Send a $0.01 credit with a unique verification code via RTP or same-day ACH, depending on the receiving bank's capabilities. This feature provides a faster alternative to traditional methods, allowing verification in a single session.

It is recommended to use the X-Wait-For: rail-response header to synchronously receive the outcome of the instant credit in the response payload.

Possible verification methods:

  • instant: Real-time verification credit sent via RTP
  • ach: Verification credit sent via same-day ACH

Possible statuses:

  • new: Verification initiated, credit pending
  • sent-credit: Credit sent, available for verification in the external bank account
  • failed: Verification failed due to credit rejection/return, details in exceptionDetails

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/bank-accounts.write scope.

  • completeVerification - Finalize the instant micro-deposit verification by submitting the verification code displayed in the user's bank account.

Upon successful verification, the bank account status will be updated to verified and eligible for ACH debit transactions.

The following formats are accepted:

  • MV0000
  • mv0000
  • 0000

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/bank-accounts.write scope.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.read scope.

  • createFeePlanAgreements - Creates the subscription of a fee plan to a merchant account. Merchants are required to accept the fee plan terms prior to activation.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.write scope.

  • listFeePlans - List all fee plans available for use by an account. This is intended to be used by an account when selecting a fee plan to apply to a connected account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.read scope.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.read scope.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.read scope.

  • create - Create brand properties for the specified account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/branding.write scope.

  • upsert - Create or replace brand properties for the specified account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/branding.write scope.

  • get - Get brand properties for the specified account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/branding.read scope.

  • update - Updates the brand properties for the specified account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/branding.write scope.

  • list - Retrieve all the capabilities an account has requested.

Read our capabilities guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/capabilities.read scope.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/capabilities.write scope.

  • get - Retrieve a specific capability that an account has requested. Read our capabilities guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/capabilities.read scope.

  • disable - Disable a specific capability that an account has requested. Read our capabilities guide to learn more.

    To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/capabilities.write scope.

  • request - Request a virtual card be issued.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/issued-cards.write scope.

  • list - List Moov issued cards existing for the account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/issued-cards.read scope.

  • get - Retrieve a single issued card associated with a Moov account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/issued-cards.read scope.

  • update - Update a Moov issued card.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/issued-cards.write scope.

  • getFull - Get issued card with PAN, CVV, and expiration.

Only use this endpoint if you have provided Moov with a copy of your PCI attestation of compliance.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/issued-cards.read-secure scope.

  • link - Link a card to an existing Moov account.

Read our accept card payments guide to learn more.

Only use this endpoint if you have provided Moov with a copy of your PCI attestation of compliance.

During card linking, the provided data will be verified by submitting a $0 authorization (account verification) request. If merchantAccountID is provided, the authorization request will contain that account's statement descriptor and address. Otherwise, the platform account's profile will be used. If no statement descriptor has been set, the authorization will use the account's name instead.

It is strongly recommended that callers include the X-Wait-For header, set to payment-method, if the newly linked card is intended to be used right away. If this header is not included, the caller will need to poll the List Payment Methods endpoint to wait for the new payment methods to be available for use.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/cards.write scope.

  • list - List all the active cards associated with a Moov account.

Read our accept card payments guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/cards.read scope.

  • get - Fetch a specific card associated with a Moov account.

Read our accept card payments guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/cards.read scope.

  • update - Update a linked card and/or resubmit it for verification.

If a value is provided for CVV, a new verification ($0 authorization) will be submitted for the card. Updating the expiration date or address will update the information stored on file for the card but will not be verified.

Read our accept card payments guide to learn more.

Only use this endpoint if you have provided Moov with a copy of your PCI attestation of compliance.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/cards.write scope.

  • disable - Disables a card associated with a Moov account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/cards.write scope.

  • list - Returns the list of disputes.

Read our disputes guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.read scope.

  • get - Get a dispute by ID.

Read our disputes guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.read scope.

  • accept - Accepts liability for a dispute.

Read our disputes guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.read scope.

  • listEvidence - Returns a dispute's public evidence by its ID.

Read our disputes guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.read scope.

Read our disputes guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.write scope.

Read our disputes guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.write scope.

Evidence items must be uploaded using the appropriate endpoint(s) prior to calling this endpoint to submit it. Evidence can only be submitted once per dispute.

Read our disputes guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.write scope.

Read our disputes guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.read scope.

Read our disputes guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.write scope.

Read our disputes guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.write scope.

Read our disputes guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.read scope.

To access this endpoint using an access token you'll need to specify the /ping.read scope.

  • generateKey - Generates a public key used to create a JWE token for passing secure authentication data through non-PCI compliant intermediaries.
  • get - Fetch enriched address suggestions. Requires a partial address.

To access this endpoint using an access token you'll need to specify the /profile-enrichment.read scope.

  • get - Fetch enriched profile data. Requires a valid email address. This service is offered in collaboration with Clearbit.

To access this endpoint using an access token you'll need to specify the /profile-enrichment.read scope.

  • upload - Upload a file and link it to the specified Moov account.

The maximum file size is 10MB. Each account is allowed a maximum of 50 files. Acceptable file types include csv, jpg, pdf, and png.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/files.write scope.

  • list - List all the files associated with a particular Moov account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/files.read scope.

  • get - Retrieve file details associated with a specific Moov account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/files.read scope.

  • list - Returns a list of all industry titles and their corresponding MCC/SIC/NAICS codes. Results are ordered by title.

To access this endpoint using an access token you'll need to specify the /profile-enrichment.read scope.

  • search - Search for institutions by either their name or routing number.

To access this endpoint using an access token you'll need to specify the /fed.read scope.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/issued-cards.read scope.

  • getAuthorization - Retrieves details of an authorization associated with a specific Moov account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/issued-cards.read scope.

  • listAuthorizationEvents - List card network and Moov platform events that affect the authorization and its hold on a wallet balance.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/issued-cards.read scope.

  • list - List issued card transactions associated with a Moov account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/issued-cards.read scope.

  • get - Retrieves details of an issued card transaction associated with a specific Moov account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/issued-cards.read scope.

  • createInvite - Create an invitation containing a unique link that allows the recipient to onboard their organization with Moov.

To access this endpoint using an access token you'll need to specify the /accounts.write scope.

  • listInvites - List all the onboarding invites created by the caller's account.

To access this endpoint using an access token you'll need to specify the /accounts.read scope.

  • getInvite - Retrieve details about an onboarding invite.

To access this endpoint using an access token you'll need to specify the /accounts.read scope.

  • revokeInvite - Revoke an onboarding invite, rendering the invitation link unusable.

To access this endpoint using an access token you'll need to specify the /accounts.write scope.

  • create - Create a payment link that allows an end user to make a payment on Moov's hosted payment link page.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.write scope.

  • list - List all the payment links created under a Moov account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.read scope.

  • get - Retrieve a payment link by code.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.read scope.

  • update - Update a payment link.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.write scope.

  • disable - Disable a payment link.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.write scope.

  • getQRCode - Retrieve the payment link encoded in a QR code.

Use the Accept header to specify the format of the response. Supported formats are application/json and image/png.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.write scope.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/payment-methods.read scope.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/payment-methods.read scope.

  • ping - A simple endpoint to check auth.

To access this endpoint using an access token you'll need to specify the /ping.read scope.

  • create - Moov accounts associated with businesses require information regarding individuals who represent the business. You can provide this information by creating a representative. Each account is allowed a maximum of 7 representatives. Read our business representatives guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/representatives.write scope.

  • list - A Moov account may have multiple representatives depending on the associated business's ownership and management structure. You can use this method to list all the representatives for a given Moov account. Note that Moov accounts associated with an individual do not have representatives. Read our business representatives guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/representatives.read scope.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/representatives.write scope.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/representatives.read scope.

  • update - If a representative's information has changed you can patch the information associated with a specific representative ID. Read our business representatives guide to learn more.

When can profile data be updated:

  • For unverified representatives, all profile data can be edited.
  • During the verification process, missing or incomplete profile data can be edited.
  • Verified representatives can only add missing profile data.

When can't profile data be updated:

  • Verified representatives cannot change any existing profile data.

If you need to update information in a locked state, please contact Moov support.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/representatives.write scope.

  • create - Describes the schedule to create or modify.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.write scope.

  • list - Describes a list of schedules associated with an account. Requires at least 1 occurrence or recurTransfer to be specified.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.read scope.

  • update - Describes the schedule to modify.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.write scope.

  • get - Describes a schedule associated with an account. Requires at least 1 occurrence or recurTransfer to be specified.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.read scope.

  • cancel - Describes the schedule to cancel.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.write scope.

  • getOccurrance - Defines an occurrence for when to run a transfer.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.read scope.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.write scope.

  • listConfigs - List sweep configs associated with an account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.read scope.

  • getConfig - Get a sweep config associated with a wallet.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.read scope.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.write scope.

  • list - List sweeps associated with a wallet.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.read scope.

  • get - Get details on a specific sweep.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.read scope.

  • create - Move money by providing the source, destination, and amount in the request body.

Read our transfers overview guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.write scope.

  • list - List all the transfers associated with a particular Moov account.

Read our transfers overview guide to learn more.

When you run this request, you retrieve 200 transfers at a time. You can advance past a results set of 200 transfers by using the skip parameter (for example, if you set skip= 10, you will see a results set of 200 transfers after the first 2000). If you are searching a high volume of transfers, the request will likely process very slowly. To achieve faster performance, restrict the data as much as you can by using the StartDateTime and EndDateTime parameters for a limited period of time. You can run multiple requests in smaller time window increments until you've retrieved all the transfers you need.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.read scope.

  • get - Retrieve full transfer details for an individual transfer of a particular Moov account.

Payment rail-specific details are included in the source and destination. Read our transfers overview guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.read scope.

  • update - Update the metadata contained on a transfer.

Read our transfers overview guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.write scope.

Use the Cancel or refund a card transfer endpoint for more comprehensive cancel and refund options.
See the reversals guide for more information.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.write scope.

  • listRefunds - Get a list of refunds for a card transfer.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.read scope.

  • getRefund - Get details of a refund for a card transfer.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.read scope.

  • createReversal - Reverses a card transfer by initiating a cancellation or refund depending on the transaction status. Read our reversals guide to learn more.

To access this endpoint using a token you'll need to specify the /accounts/{accountID}/transfers.write scope.

  • generateOptions - Generate available payment method options for one or multiple transfer participants depending on the accountID or paymentMethodID you supply in the request.

Read our transfers overview guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.read scope.

  • get - Retrieve underwriting associated with a given Moov account.

Read our underwriting guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.read scope.

  • update - Update the account's underwriting by passing new values for one or more of the fields.

Read our underwriting guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.write scope.

  • list - List the wallets associated with a Moov account.

Read our Moov wallets guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.read scope.

  • get - Get information on a specific wallet (e.g., the available balance).

Read our Moov wallets guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.read scope.

  • list - List all the transactions associated with a particular Moov wallet.

Read our wallet transactions guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.read scope.

  • get - Get details on a specific wallet transaction.

Read our wallet transactions guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.read scope.

Error Handling

Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.

By default, an API error will throw a models/errors/APIException exception. When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective Errors tables in SDK docs for more details on possible exception types for each operation. For example, the create method throws the following exceptions:

Error Type Status Code Content Type
models/errors/GenericError 400, 409 application/json
models/errors/CreateAccountResponseBody 422 application/json
models/errors/APIException 4XX, 5XX */*

Example

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.AccountType;
import io.moov.sdk.models.components.CreateAccount;
import io.moov.sdk.models.components.CreateBusinessProfile;
import io.moov.sdk.models.components.CreateProfile;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.errors.CreateAccountResponseBody;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.operations.CreateAccountResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws GenericError, CreateAccountResponseBody, Exception {

        Moov sdk = Moov.builder()
                .security(Security.builder()
                    .username("")
                    .password("")
                    .build())
            .build();

        CreateAccountResponse res = sdk.accounts().create()
                .xMoovVersion("v2024.01")
                .createAccount(CreateAccount.builder()
                    .accountType(AccountType.BUSINESS)
                    .profile(CreateProfile.builder()
                        .business(CreateBusinessProfile.builder()
                            .legalBusinessName("Classbooker, LLC")
                            .build())
                        .build())
                    .build())
                .call();

        if (res.account().isPresent()) {
            // handle response
        }
    }
}

Server Selection

Override Server URL Per-Client

The default server can also be overridden globally using the .serverURL(String serverUrl) builder method when initializing the SDK client instance. For example:

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.AccountType;
import io.moov.sdk.models.components.CreateAccount;
import io.moov.sdk.models.components.CreateBusinessProfile;
import io.moov.sdk.models.components.CreateProfile;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.errors.CreateAccountResponseBody;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.operations.CreateAccountResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws GenericError, CreateAccountResponseBody, Exception {

        Moov sdk = Moov.builder()
                .serverURL("https://api.moov.io")
                .security(Security.builder()
                    .username("")
                    .password("")
                    .build())
            .build();

        CreateAccountResponse res = sdk.accounts().create()
                .xMoovVersion("v2024.01")
                .createAccount(CreateAccount.builder()
                    .accountType(AccountType.BUSINESS)
                    .profile(CreateProfile.builder()
                        .business(CreateBusinessProfile.builder()
                            .legalBusinessName("Classbooker, LLC")
                            .build())
                        .build())
                    .build())
                .call();

        if (res.account().isPresent()) {
            // handle response
        }
    }
}

Development

Maturity

This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.

Contributions

While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.

SDK Created by Speakeasy