Class Client.FinancialAccountsClient
- Enclosing class:
- Client
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionArchives a financial account (POST /financial_accounts/archive).connect(FinancialAccountCreateParams params) Connects an existing financial account (POST /financial_accounts/connect).create(FinancialAccountCreateParams params) Creates a new financial account (POST /financial_accounts/create).Disables pull configuration for charges (POST /financial_accounts/disable_pull).Disables push configuration for payouts (POST /financial_accounts/disable_push).Enables pull configuration for charges (POST /financial_accounts/enable_pull).Enables push configuration for payouts (POST /financial_accounts/enable_push).Retrieves details of a financial account by ID (POST /financial_accounts/lookup).page(PageFinancialAccountsParams params) Retrieves a paginated list of financial accounts (POST /financial_accounts/page).update(FinancialAccountUpdateParams params) Updates a financial account (POST /financial_accounts/update).Verifies a financial account (POST /financial_accounts/verify).
-
Constructor Details
-
FinancialAccountsClient
-
-
Method Details
-
create
public FinancialAccount create(FinancialAccountCreateParams params) throws IOException, InterruptedException, ApiException Creates a new financial account (POST /financial_accounts/create).Registers a bank account or mobile money account for receiving payouts. The account details must include sufficient information for funds transfer (account number, routing information, etc.). Depending on the account type and country, verification may be required before the account can receive payouts.
- Parameters:
params- account creation parameters including type, currency, and account details- Returns:
FinancialAccountwith the created account information- Throws:
IOException- if network communication failsInterruptedException- if the request is interruptedApiException- if invalid account details (400, 422) or unauthorized (401)
-
lookup
public FinancialAccount lookup(String accountId) throws IOException, InterruptedException, ApiException Retrieves details of a financial account by ID (POST /financial_accounts/lookup).Returns account information including type, currency, masked account details, verification status, and timestamps. Sensitive information (full account numbers) is not returned.
- Parameters:
accountId- unique identifier of the financial account- Returns:
FinancialAccountcontaining account details- Throws:
IOException- if network communication failsInterruptedException- if the request is interruptedApiException- if account not found (404) or unauthorized (401)
-
reconnect
public FinancialAccount reconnect(String accountId) throws IOException, InterruptedException, ApiException -
connect
public FinancialAccount connect(FinancialAccountCreateParams params) throws IOException, InterruptedException, ApiException Connects an existing financial account (POST /financial_accounts/connect).Links an external account to your Inttegro application for payout destinations. The account must already exist and belong to an entity authorized to receive funds on your behalf.
- Parameters:
params- connection parameters including account identifier and authorization details- Returns:
FinancialAccountwith connected account information- Throws:
IOException- if network communication failsInterruptedException- if the request is interruptedApiException- if account cannot be connected, invalid authorization, or unauthorized (401)
-
archive
public FinancialAccount archive(Map<String, Object> payload) throws IOException, InterruptedException, ApiExceptionArchives a financial account (POST /financial_accounts/archive).Note: This endpoint currently returns HTTP 501 (Not Implemented) per the API specification.
- Parameters:
payload- archive parameters- Returns:
- map with response data (currently not implemented)
- Throws:
IOException- if network communication failsInterruptedException- if the request is interruptedApiException- if unauthorized (401) or not implemented (501)
-
page
public FinancialAccountsPage page(PageFinancialAccountsParams params) throws IOException, InterruptedException, ApiException Retrieves a paginated list of financial accounts (POST /financial_accounts/page).- Parameters:
params- pagination parameters- Returns:
FinancialAccountsPagewith page metadata and accounts- Throws:
IOException- if network communication failsInterruptedException- if the request is interruptedApiException- if unauthorized (401) or validation failed (422)
-
verify
public FinancialAccount verify(Map<String, Object> payload) throws IOException, InterruptedException, ApiExceptionVerifies a financial account (POST /financial_accounts/verify).Note: This endpoint currently returns HTTP 501 (Not Implemented) per the API specification.
- Parameters:
payload- verification parameters- Returns:
- map with response data (currently not implemented)
- Throws:
IOException- if network communication failsInterruptedException- if the request is interruptedApiException- if unauthorized (401) or not implemented (501)
-
update
public FinancialAccount update(FinancialAccountUpdateParams params) throws IOException, InterruptedException, ApiException Updates a financial account (POST /financial_accounts/update).All fields except account_id are optional. custom_data merges with existing data.
- Parameters:
params- update parameters including account_id and fields to update- Returns:
FinancialAccountcontaining updated account details- Throws:
IOException- if network communication failsInterruptedException- if the request is interruptedApiException- if invalid parameters (422) or unauthorized (401)
-
enablePush
public FinancialAccount enablePush(FinancialAccountToggleParams params) throws IOException, InterruptedException, ApiException Enables push configuration for payouts (POST /financial_accounts/enable_push). -
disablePush
public FinancialAccount disablePush(FinancialAccountToggleParams params) throws IOException, InterruptedException, ApiException Disables push configuration for payouts (POST /financial_accounts/disable_push). -
enablePull
public FinancialAccount enablePull(FinancialAccountToggleParams params) throws IOException, InterruptedException, ApiException Enables pull configuration for charges (POST /financial_accounts/enable_pull). -
disablePull
public FinancialAccount disablePull(FinancialAccountToggleParams params) throws IOException, InterruptedException, ApiException Disables pull configuration for charges (POST /financial_accounts/disable_pull). -
disconnect
public FinancialAccount disconnect(FinancialAccountToggleParams params) throws IOException, InterruptedException, ApiException
-