Skip to content

Latest commit

 

History

History
696 lines (503 loc) · 122 KB

README.md

File metadata and controls

696 lines (503 loc) · 122 KB

BankAccounts

(bankAccounts())

Overview

Available Operations

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.

link

Link a bank account to an existing Moov account. Read our bank accounts guide to learn more.

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.

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.*;
import io.moov.sdk.models.errors.BankAccountValidationError;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.operations.LinkBankAccountResponse;
import java.lang.Exception;

public class Application {

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

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

        LinkBankAccountResponse res = sdk.bankAccounts().link()
                .accountID("0ffc839a-9198-4ea1-98a2-6cccee057439")
                .linkBankAccount(LinkBankAccount.of(PlaidPayload.builder()
                    .plaid(PlaidIntegration.builder()
                        .token("<value>")
                        .build())
                    .build()))
                .call();

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

Parameters

Parameter Type Required Description
xMoovVersion Optional<String> Specify an API version.

API versioning follows the format vYYYY.QQ.BB, where
- YYYY is the year
- QQ is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
- BB is the build number, starting at .01, for subsequent builds in the same quarter.
- For example, v2024.01.00 is the initial release of the first quarter of 2024.

The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
xWaitFor Optional<BankAccountWaitFor> Optional header to wait for certain events, such as the creation of a payment method, to occur before returning a response.

When this header is set to payment-method, the response will include any payment methods that were created for the newly
linked card in the paymentMethods field. Otherwise, the paymentMethods field will be omitted from the response.
accountID String ✔️ N/A
linkBankAccount LinkBankAccount ✔️ N/A

Response

LinkBankAccountResponse

Errors

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

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.

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.operations.ListBankAccountsResponse;
import java.lang.Exception;

public class Application {

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

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

        ListBankAccountsResponse res = sdk.bankAccounts().list()
                .accountID("c8a232aa-0b11-4b8a-b005-71e9e705d0e6")
                .call();

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

Parameters

Parameter Type Required Description
xMoovVersion Optional<String> Specify an API version.

API versioning follows the format vYYYY.QQ.BB, where
- YYYY is the year
- QQ is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
- BB is the build number, starting at .01, for subsequent builds in the same quarter.
- For example, v2024.01.00 is the initial release of the first quarter of 2024.

The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
accountID String ✔️ N/A

Response

ListBankAccountsResponse

Errors

Error Type Status Code Content Type
models/errors/APIException 4XX, 5XX */*

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.

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.operations.GetBankAccountResponse;
import java.lang.Exception;

public class Application {

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

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

        GetBankAccountResponse res = sdk.bankAccounts().get()
                .accountID("b888f774-3e7c-4135-a18c-6b985523c4bc")
                .bankAccountID("e50f7622-81da-484b-9c66-1c8a99c6b71b")
                .call();

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

Parameters

Parameter Type Required Description
xMoovVersion Optional<String> Specify an API version.

API versioning follows the format vYYYY.QQ.BB, where
- YYYY is the year
- QQ is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
- BB is the build number, starting at .01, for subsequent builds in the same quarter.
- For example, v2024.01.00 is the initial release of the first quarter of 2024.

The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
accountID String ✔️ N/A
bankAccountID String ✔️ N/A

Response

GetBankAccountResponse

Errors

Error Type Status Code Content Type
models/errors/APIException 4XX, 5XX */*

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.

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.operations.DisableBankAccountResponse;
import java.lang.Exception;

public class Application {

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

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

        DisableBankAccountResponse res = sdk.bankAccounts().disable()
                .accountID("cd7cd1ce-90cc-444b-ac3e-badb79be277f")
                .bankAccountID("0f131553-3a08-4820-a7ac-ba935765809c")
                .call();

        // handle response
    }
}

Parameters

Parameter Type Required Description
xMoovVersion Optional<String> Specify an API version.

API versioning follows the format vYYYY.QQ.BB, where
- YYYY is the year
- QQ is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
- BB is the build number, starting at .01, for subsequent builds in the same quarter.
- For example, v2024.01.00 is the initial release of the first quarter of 2024.

The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
accountID String ✔️ N/A
bankAccountID String ✔️ N/A

Response

DisableBankAccountResponse

Errors

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

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.

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.operations.InitiateMicroDepositsResponse;
import java.lang.Exception;

public class Application {

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

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

        InitiateMicroDepositsResponse res = sdk.bankAccounts().initiateMicroDeposits()
                .accountID("ff04d5ff-8ad2-4d87-baf2-0c9dcb6d3e2a")
                .bankAccountID("10ed8688-d7e2-4a70-827d-af795759945d")
                .call();

        // handle response
    }
}

Parameters

Parameter Type Required Description
xMoovVersion Optional<String> Specify an API version.

API versioning follows the format vYYYY.QQ.BB, where
- YYYY is the year
- QQ is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
- BB is the build number, starting at .01, for subsequent builds in the same quarter.
- For example, v2024.01.00 is the initial release of the first quarter of 2024.

The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
accountID String ✔️ N/A
bankAccountID String ✔️ N/A

Response

InitiateMicroDepositsResponse

Errors

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

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.

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.CompleteMicroDeposits;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.errors.MicroDepositValidationError;
import io.moov.sdk.models.operations.CompleteMicroDepositsResponse;
import java.lang.Exception;
import java.util.List;

public class Application {

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

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

        CompleteMicroDepositsResponse res = sdk.bankAccounts().completeMicroDeposits()
                .accountID("ebfc273d-980b-4a92-8dd9-bf9996f2a16e")
                .bankAccountID("3e6af61e-a5cb-4281-b0e6-e7e3d39edf65")
                .completeMicroDeposits(CompleteMicroDeposits.builder()
                    .amounts(List.of(
                        18L,
                        21L))
                    .build())
                .call();

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

Parameters

Parameter Type Required Description
xMoovVersion Optional<String> Specify an API version.

API versioning follows the format vYYYY.QQ.BB, where
- YYYY is the year
- QQ is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
- BB is the build number, starting at .01, for subsequent builds in the same quarter.
- For example, v2024.01.00 is the initial release of the first quarter of 2024.

The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
accountID String ✔️ N/A
bankAccountID String ✔️ N/A
completeMicroDeposits CompleteMicroDeposits ✔️ N/A

Response

CompleteMicroDepositsResponse

Errors

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

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.

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.operations.GetBankAccountVerificationResponse;
import java.lang.Exception;

public class Application {

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

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

        GetBankAccountVerificationResponse res = sdk.bankAccounts().getVerification()
                .accountID("eb35bc20-d74d-4acc-b152-c4db94d9355b")
                .bankAccountID("2572c1db-032d-464b-b55d-1fd7052232be")
                .call();

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

Parameters

Parameter Type Required Description
xMoovVersion Optional<String> Specify an API version.

API versioning follows the format vYYYY.QQ.BB, where
- YYYY is the year
- QQ is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
- BB is the build number, starting at .01, for subsequent builds in the same quarter.
- For example, v2024.01.00 is the initial release of the first quarter of 2024.

The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
accountID String ✔️ N/A
bankAccountID String ✔️ N/A

Response

GetBankAccountVerificationResponse

Errors

Error Type Status Code Content Type
models/errors/APIException 4XX, 5XX */*

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.

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.operations.InitiateBankAccountVerificationResponse;
import java.lang.Exception;

public class Application {

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

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

        InitiateBankAccountVerificationResponse res = sdk.bankAccounts().initiateVerification()
                .accountID("96925880-1f29-484d-9ce4-a55f78c3d5fc")
                .bankAccountID("c9cadc5c-d322-467d-bc62-d133abcc5ec1")
                .call();

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

Parameters

Parameter Type Required Description
xMoovVersion Optional<String> Specify an API version.

API versioning follows the format vYYYY.QQ.BB, where
- YYYY is the year
- QQ is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
- BB is the build number, starting at .01, for subsequent builds in the same quarter.
- For example, v2024.01.00 is the initial release of the first quarter of 2024.

The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
xWaitFor Optional<BankAccountWaitFor> Optional header to wait for certain events, such as the rail response, to occur before returning a response.

When this header is set to rail-response, the endpoint will wait for a sent-credit or failed status from the payment rail.
accountID String ✔️ N/A
bankAccountID String ✔️ N/A

Response

InitiateBankAccountVerificationResponse

Errors

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

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.

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.CompleteBankAccountVerification;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.operations.CompleteBankAccountVerificationResponse;
import java.lang.Exception;

public class Application {

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

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

        CompleteBankAccountVerificationResponse res = sdk.bankAccounts().completeVerification()
                .accountID("3b83f70f-82ce-4e0f-8a75-e4717ad684e4")
                .bankAccountID("c4c7442d-4aa1-4dfe-9ab1-5206164dce64")
                .completeBankAccountVerification(CompleteBankAccountVerification.builder()
                    .code("MV1234")
                    .build())
                .call();

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

Parameters

Parameter Type Required Description
xMoovVersion Optional<String> Specify an API version.

API versioning follows the format vYYYY.QQ.BB, where
- YYYY is the year
- QQ is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
- BB is the build number, starting at .01, for subsequent builds in the same quarter.
- For example, v2024.01.00 is the initial release of the first quarter of 2024.

The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
accountID String ✔️ N/A
bankAccountID String ✔️ N/A
completeBankAccountVerification CompleteBankAccountVerification ✔️ N/A

Response

CompleteBankAccountVerificationResponse

Errors

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