inttegro.resources.financial_accounts

Generated public typing surface. Do not edit by hand.

  1"""Financial accounts resource for connecting payout destinations."""
  2
  3from __future__ import annotations
  4
  5from ..http_client import HttpClient
  6from inttegro.search import Page as SearchPage, Request as SearchRequest
  7
  8
  9class FinancialAccounts:
 10    """
 11    Financial accounts resource for connecting and managing payout destinations.
 12
 13    Financial accounts represent bank accounts, mobile money wallets, or Dosh accounts
 14    where you receive payouts. Before you can receive funds from Inttegro, you must connect
 15    and verify at least one financial account, then configure it as a payout destination.
 16
 17    The typical flow is:
 18    1. Connect a financial account (bank_account, mobile money, or dosh_account)
 19    2. Verify ownership via OTP
 20    3. Set as payout destination via Payouts resource
 21    4. Receive automatic or manual payouts
 22
 23    See https://studio.inttegro.com/set-up-financial-account for detailed guides.
 24    """
 25
 26    def __init__(self, http: HttpClient):
 27        """Initialize FinancialAccounts resource with HTTP client."""
 28        self.http = http
 29
 30    def create(self, payload: dict):
 31        """
 32        Create a new financial account.
 33
 34        Args:
 35            payload: Account creation parameters
 36
 37        Returns:
 38            domain object with created financial account
 39
 40        """
 41        return self.http.post("/financial_accounts/create", payload)
 42
 43    def lookup(self, account_id: str):
 44        """
 45        Retrieve details of a financial account.
 46
 47        Fetches information about a connected financial account including its type,
 48        verification status, and masked details.
 49
 50        Args:
 51            account_id: The financial account ID (e.g., "fa_abc123")
 52
 53        Returns:
 54            domain object containing the financial_account object
 55
 56        Example:
 57            ```python
 58            result = client.financial_accounts.lookup("fa_abc123")
 59            account = result
 60            print(f"Type: {account['type']}, Verified: {account['verified']}")
 61            ```
 62
 63        See Also:
 64            - connect(): Add new financial accounts
 65            - page(): List all financial accounts
 66        """
 67        return self.http.post("/financial_accounts/lookup", {"account_id": account_id})
 68
 69    def connect(self, payload: dict):
 70        """
 71        Connect a new financial account for receiving payouts.
 72
 73        Adds a bank account, mobile money wallet, or Dosh account as a payout destination.
 74        Financial accounts must include basic information like label, type, currency, and
 75        type-specific configuration. Most account types require verification before they
 76        can receive funds.
 77
 78        Args:
 79            payload: Connection parameters including:
 80                - label: Account label (5-40 characters) (required)
 81                - type: Account type ("wallet", "bank_account", or "dosh_account") (required)
 82                - reference: External reference ID (5-40 characters) (required)
 83                - currency: Account currency (currently only "ghs" supported) (required)
 84                - description: Optional account description (0-200 characters)
 85                - owner: Account owner information (required):
 86                    - name: Owner full name
 87                    - address: Owner address details (name, line_1, city, region, country)
 88                - wallet: Wallet configuration (required if type is "wallet"):
 89                    - type: "mobile_money"
 90                    - mobile_money:
 91                        - account_number: Phone number (e.g., "0241234567")
 92                        - network: Network operator ("mtn", "vodafone", "airteltigo")
 93                - bank_account: Bank account configuration (required if type is "bank_account"):
 94                    - type: "ghana_bank_account"
 95                    - ghana_bank_account:
 96                        - number: Bank account number
 97                        - sort_code: Bank sort code (required if swift_code is not provided)
 98                        - swift_code: Bank SWIFT/BIC code (required if sort_code is not provided)
 99                        - holder:
100                            - name: Account holder full name
101                            - address:
102                                - name: Address label
103                                - line_1: Address line 1
104                                - city: City or town
105                                - region: Region or state
106                                - country: Country code or name
107                - push_configuration: Configuration for sending funds to this account:
108                    - enabled: Whether payouts to this account are enabled (default: true)
109                - pull_configuration: Configuration for collecting funds from this account:
110                    - enabled: Whether pulling funds is enabled (default: false)
111                    - mandate: Optional mandate parameters (created automatically using request metadata)
112                - custom_data: Optional key-value metadata (string-to-string)
113
114        Returns:
115            domain object containing:
116                - financial_account: Created financial account with id, type, status, etc.
117                - requires_verification: Whether verification is needed before use
118
119        Raises:
120            ApiError: If parameters are invalid or connection fails
121
122        Example:
123            ```python
124            # Connect mobile money wallet
125            result = client.financial_accounts.connect({
126                "type": "wallet",
127                "currency": "ghs",
128                "label": "Primary MTN Wallet",
129                "description": "Main business mobile money account",
130                "reference": "WALLET-MTN-001",
131                "wallet": {
132                    "type": "mobile_money",
133                    "mobile_money": {
134                        "account_number": "0241234567",
135                        "network": "mtn"
136                    }
137                },
138                "push_configuration": {
139                    "enabled": True
140                }
141            })
142
143            fa = result
144            print(f"Financial account created: {fa['id']}")
145
146            # Verify if needed
147            if result.verification is not None:
148                # Initiate verification (sends OTP)
149                client.financial_accounts.verify({"account_id": fa["id"]})
150
151                # Collect OTP from user
152                otp = input("Enter OTP: ")
153
154                # Complete verification
155                client.financial_accounts.verify({
156                    "account_id": fa["id"],
157                    "token": otp
158                })
159
160            # Connect Vodafone wallet
161            result = client.financial_accounts.connect({
162                "type": "wallet",
163                "currency": "ghs",
164                "label": "Vodafone Cash Account",
165                "reference": "WALLET-VDF-001",
166                "wallet": {
167                    "type": "mobile_money",
168                    "mobile_money": {
169                        "account_number": "0501234567",
170                        "network": "vodafone"
171                    }
172                },
173                "push_configuration": {"enabled": True}
174            })
175            ```
176
177        Note:
178            - Financial accounts must be verified before they can receive payouts
179            - Only "ghs" currency is currently supported
180            - Dosh account types are placeholders for future functionality
181
182        See Also:
183            - verify(): Verify ownership of financial account
184            - Payouts.set_destinations(): Configure account as payout destination
185            - https://studio.inttegro.com/set-up-financial-account
186        """
187        return self.http.post("/financial_accounts/connect", payload)
188
189    def archive(self, payload: dict):
190        """
191        Archive a financial account to prevent future use.
192
193        Archives a financial account, marking it inactive. Archived accounts cannot be
194        used as payout destinations but remain in your account history.
195
196        Args:
197            payload: Archive parameters including account_id
198
199        Returns:
200            domain object containing the archived financial_account
201
202        Example:
203            ```python
204            result = client.financial_accounts.archive({"account_id": "fa_abc123"})
205            ```
206
207        See Also:
208            - connect(): Add replacement financial account
209        """
210        return self.http.post("/financial_accounts/archive", payload)
211
212    def page(self, payload: dict | None = None):
213        """
214        List connected financial accounts with pagination and filtering.
215
216        Retrieves a paginated list of your financial accounts with optional filtering
217        by type and status.
218
219        Args:
220            payload: Optional pagination parameters and filters
221
222        Returns:
223            domain object containing data (list of accounts), has_more, and count
224
225        Example:
226            ```python
227            result = client.financial_accounts.page({"limit": 20, "status": "active"})
228            ```
229
230        See Also:
231            - connect(): Add new financial accounts
232        """
233        return self.http.post("/financial_accounts/page", payload or {})
234
235    def search(self, payload: SearchRequest) -> SearchPage:
236        """Search financial-account projections owned by the authenticated application."""
237        return self.http.post("/financial_accounts/search", payload)
238
239    def verify(self, payload: dict):
240        """
241        Initiate or complete verification of a financial account.
242
243        Verification confirms ownership of the financial account. For mobile money, this
244        sends an OTP that must be submitted to complete verification.
245
246        Args:
247            payload: Verification parameters including account_id and optionally token
248
249        Returns:
250            domain object containing the financial_account with updated verification status
251
252        Example:
253            ```python
254            # Initiate verification
255            client.financial_accounts.verify({"account_id": "fa_abc123"})
256            # Complete verification
257            result = client.financial_accounts.verify({
258                "account_id": "fa_abc123",
259                "token": "123456"
260            })
261            ```
262
263        See Also:
264            - connect(): Add financial accounts that need verification
265        """
266        return self.http.post("/financial_accounts/verify", payload)
267
268    def update(self, payload: dict):
269        """
270        Update a financial account (PATCH semantics).
271
272        All fields except account_id are optional. custom_data merges with existing data; null deletes keys.
273
274        Args:
275            payload: Update parameters including account_id and fields to change
276
277        Returns:
278            domain object containing the updated financial_account
279        """
280        return self.http.post("/financial_accounts/update", payload)
281
282    def enable_push(self, account_id: str):
283        """Enable push configuration for payouts.
284
285        API endpoint: ``/financial_accounts/enable_push``.
286
287        Args:
288            account_id (str): Unique identifier of the account.
289
290        Returns:
291            ``FinancialAccount`` decoded from the documented response shape.
292
293        Raises:
294            APIError: The API rejected the request or could not complete it.
295            NetworkError: The request could not reach the Inttegro API.
296            TimeoutError: The configured request deadline elapsed.
297        """
298        return self.http.post("/financial_accounts/enable_push", {"account_id": account_id})
299
300    def disable_push(self, account_id: str, unset_as_payout_destination: bool | None = None):
301        """
302        Disable push configuration for payouts.
303
304        If the account is a payout destination, set unset_as_payout_destination to True to
305        automatically remove it before disabling push.
306        """
307        payload = {"account_id": account_id}
308        if unset_as_payout_destination is not None:
309            payload["unset_as_payout_destination"] = unset_as_payout_destination
310        return self.http.post("/financial_accounts/disable_push", payload)
311
312    def disconnect(self, account_id: str, unset_as_payout_destination: bool | None = None):
313        """
314        Disconnect a financial account.
315
316        If the account is a payout destination, set unset_as_payout_destination to True to
317        automatically remove it before disconnecting.
318        """
319        payload = {"account_id": account_id}
320        if unset_as_payout_destination is not None:
321            payload["unset_as_payout_destination"] = unset_as_payout_destination
322        return self.http.post("/financial_accounts/disconnect", payload)
323
324    def reconnect(self, account_id: str):
325        """
326        Reconnect a previously disconnected financial account.
327
328        Args:
329            account_id: The financial account ID to reconnect.
330
331        Returns:
332            domain object containing the reconnected financial account.
333        """
334        return self.http.post("/financial_accounts/reconnect", {"account_id": account_id})
335
336    def enable_pull(self, account_id: str):
337        """Enable pull configuration for charges (creates mandate).
338
339        API endpoint: ``/financial_accounts/enable_pull``.
340
341        Args:
342            account_id (str): Unique identifier of the account.
343
344        Returns:
345            ``FinancialAccount`` decoded from the documented response shape.
346
347        Raises:
348            APIError: The API rejected the request or could not complete it.
349            NetworkError: The request could not reach the Inttegro API.
350            TimeoutError: The configured request deadline elapsed.
351        """
352        return self.http.post("/financial_accounts/enable_pull", {"account_id": account_id})
353
354    def disable_pull(self, account_id: str):
355        """Disable pull configuration for charges.
356
357        API endpoint: ``/financial_accounts/disable_pull``.
358
359        Args:
360            account_id (str): Unique identifier of the account.
361
362        Returns:
363            ``FinancialAccount`` decoded from the documented response shape.
364
365        Raises:
366            APIError: The API rejected the request or could not complete it.
367            NetworkError: The request could not reach the Inttegro API.
368            TimeoutError: The configured request deadline elapsed.
369        """
370        return self.http.post("/financial_accounts/disable_pull", {"account_id": account_id})
class FinancialAccounts:
 10class FinancialAccounts:
 11    """
 12    Financial accounts resource for connecting and managing payout destinations.
 13
 14    Financial accounts represent bank accounts, mobile money wallets, or Dosh accounts
 15    where you receive payouts. Before you can receive funds from Inttegro, you must connect
 16    and verify at least one financial account, then configure it as a payout destination.
 17
 18    The typical flow is:
 19    1. Connect a financial account (bank_account, mobile money, or dosh_account)
 20    2. Verify ownership via OTP
 21    3. Set as payout destination via Payouts resource
 22    4. Receive automatic or manual payouts
 23
 24    See https://studio.inttegro.com/set-up-financial-account for detailed guides.
 25    """
 26
 27    def __init__(self, http: HttpClient):
 28        """Initialize FinancialAccounts resource with HTTP client."""
 29        self.http = http
 30
 31    def create(self, payload: dict):
 32        """
 33        Create a new financial account.
 34
 35        Args:
 36            payload: Account creation parameters
 37
 38        Returns:
 39            domain object with created financial account
 40
 41        """
 42        return self.http.post("/financial_accounts/create", payload)
 43
 44    def lookup(self, account_id: str):
 45        """
 46        Retrieve details of a financial account.
 47
 48        Fetches information about a connected financial account including its type,
 49        verification status, and masked details.
 50
 51        Args:
 52            account_id: The financial account ID (e.g., "fa_abc123")
 53
 54        Returns:
 55            domain object containing the financial_account object
 56
 57        Example:
 58            ```python
 59            result = client.financial_accounts.lookup("fa_abc123")
 60            account = result
 61            print(f"Type: {account['type']}, Verified: {account['verified']}")
 62            ```
 63
 64        See Also:
 65            - connect(): Add new financial accounts
 66            - page(): List all financial accounts
 67        """
 68        return self.http.post("/financial_accounts/lookup", {"account_id": account_id})
 69
 70    def connect(self, payload: dict):
 71        """
 72        Connect a new financial account for receiving payouts.
 73
 74        Adds a bank account, mobile money wallet, or Dosh account as a payout destination.
 75        Financial accounts must include basic information like label, type, currency, and
 76        type-specific configuration. Most account types require verification before they
 77        can receive funds.
 78
 79        Args:
 80            payload: Connection parameters including:
 81                - label: Account label (5-40 characters) (required)
 82                - type: Account type ("wallet", "bank_account", or "dosh_account") (required)
 83                - reference: External reference ID (5-40 characters) (required)
 84                - currency: Account currency (currently only "ghs" supported) (required)
 85                - description: Optional account description (0-200 characters)
 86                - owner: Account owner information (required):
 87                    - name: Owner full name
 88                    - address: Owner address details (name, line_1, city, region, country)
 89                - wallet: Wallet configuration (required if type is "wallet"):
 90                    - type: "mobile_money"
 91                    - mobile_money:
 92                        - account_number: Phone number (e.g., "0241234567")
 93                        - network: Network operator ("mtn", "vodafone", "airteltigo")
 94                - bank_account: Bank account configuration (required if type is "bank_account"):
 95                    - type: "ghana_bank_account"
 96                    - ghana_bank_account:
 97                        - number: Bank account number
 98                        - sort_code: Bank sort code (required if swift_code is not provided)
 99                        - swift_code: Bank SWIFT/BIC code (required if sort_code is not provided)
100                        - holder:
101                            - name: Account holder full name
102                            - address:
103                                - name: Address label
104                                - line_1: Address line 1
105                                - city: City or town
106                                - region: Region or state
107                                - country: Country code or name
108                - push_configuration: Configuration for sending funds to this account:
109                    - enabled: Whether payouts to this account are enabled (default: true)
110                - pull_configuration: Configuration for collecting funds from this account:
111                    - enabled: Whether pulling funds is enabled (default: false)
112                    - mandate: Optional mandate parameters (created automatically using request metadata)
113                - custom_data: Optional key-value metadata (string-to-string)
114
115        Returns:
116            domain object containing:
117                - financial_account: Created financial account with id, type, status, etc.
118                - requires_verification: Whether verification is needed before use
119
120        Raises:
121            ApiError: If parameters are invalid or connection fails
122
123        Example:
124            ```python
125            # Connect mobile money wallet
126            result = client.financial_accounts.connect({
127                "type": "wallet",
128                "currency": "ghs",
129                "label": "Primary MTN Wallet",
130                "description": "Main business mobile money account",
131                "reference": "WALLET-MTN-001",
132                "wallet": {
133                    "type": "mobile_money",
134                    "mobile_money": {
135                        "account_number": "0241234567",
136                        "network": "mtn"
137                    }
138                },
139                "push_configuration": {
140                    "enabled": True
141                }
142            })
143
144            fa = result
145            print(f"Financial account created: {fa['id']}")
146
147            # Verify if needed
148            if result.verification is not None:
149                # Initiate verification (sends OTP)
150                client.financial_accounts.verify({"account_id": fa["id"]})
151
152                # Collect OTP from user
153                otp = input("Enter OTP: ")
154
155                # Complete verification
156                client.financial_accounts.verify({
157                    "account_id": fa["id"],
158                    "token": otp
159                })
160
161            # Connect Vodafone wallet
162            result = client.financial_accounts.connect({
163                "type": "wallet",
164                "currency": "ghs",
165                "label": "Vodafone Cash Account",
166                "reference": "WALLET-VDF-001",
167                "wallet": {
168                    "type": "mobile_money",
169                    "mobile_money": {
170                        "account_number": "0501234567",
171                        "network": "vodafone"
172                    }
173                },
174                "push_configuration": {"enabled": True}
175            })
176            ```
177
178        Note:
179            - Financial accounts must be verified before they can receive payouts
180            - Only "ghs" currency is currently supported
181            - Dosh account types are placeholders for future functionality
182
183        See Also:
184            - verify(): Verify ownership of financial account
185            - Payouts.set_destinations(): Configure account as payout destination
186            - https://studio.inttegro.com/set-up-financial-account
187        """
188        return self.http.post("/financial_accounts/connect", payload)
189
190    def archive(self, payload: dict):
191        """
192        Archive a financial account to prevent future use.
193
194        Archives a financial account, marking it inactive. Archived accounts cannot be
195        used as payout destinations but remain in your account history.
196
197        Args:
198            payload: Archive parameters including account_id
199
200        Returns:
201            domain object containing the archived financial_account
202
203        Example:
204            ```python
205            result = client.financial_accounts.archive({"account_id": "fa_abc123"})
206            ```
207
208        See Also:
209            - connect(): Add replacement financial account
210        """
211        return self.http.post("/financial_accounts/archive", payload)
212
213    def page(self, payload: dict | None = None):
214        """
215        List connected financial accounts with pagination and filtering.
216
217        Retrieves a paginated list of your financial accounts with optional filtering
218        by type and status.
219
220        Args:
221            payload: Optional pagination parameters and filters
222
223        Returns:
224            domain object containing data (list of accounts), has_more, and count
225
226        Example:
227            ```python
228            result = client.financial_accounts.page({"limit": 20, "status": "active"})
229            ```
230
231        See Also:
232            - connect(): Add new financial accounts
233        """
234        return self.http.post("/financial_accounts/page", payload or {})
235
236    def search(self, payload: SearchRequest) -> SearchPage:
237        """Search financial-account projections owned by the authenticated application."""
238        return self.http.post("/financial_accounts/search", payload)
239
240    def verify(self, payload: dict):
241        """
242        Initiate or complete verification of a financial account.
243
244        Verification confirms ownership of the financial account. For mobile money, this
245        sends an OTP that must be submitted to complete verification.
246
247        Args:
248            payload: Verification parameters including account_id and optionally token
249
250        Returns:
251            domain object containing the financial_account with updated verification status
252
253        Example:
254            ```python
255            # Initiate verification
256            client.financial_accounts.verify({"account_id": "fa_abc123"})
257            # Complete verification
258            result = client.financial_accounts.verify({
259                "account_id": "fa_abc123",
260                "token": "123456"
261            })
262            ```
263
264        See Also:
265            - connect(): Add financial accounts that need verification
266        """
267        return self.http.post("/financial_accounts/verify", payload)
268
269    def update(self, payload: dict):
270        """
271        Update a financial account (PATCH semantics).
272
273        All fields except account_id are optional. custom_data merges with existing data; null deletes keys.
274
275        Args:
276            payload: Update parameters including account_id and fields to change
277
278        Returns:
279            domain object containing the updated financial_account
280        """
281        return self.http.post("/financial_accounts/update", payload)
282
283    def enable_push(self, account_id: str):
284        """Enable push configuration for payouts.
285
286        API endpoint: ``/financial_accounts/enable_push``.
287
288        Args:
289            account_id (str): Unique identifier of the account.
290
291        Returns:
292            ``FinancialAccount`` decoded from the documented response shape.
293
294        Raises:
295            APIError: The API rejected the request or could not complete it.
296            NetworkError: The request could not reach the Inttegro API.
297            TimeoutError: The configured request deadline elapsed.
298        """
299        return self.http.post("/financial_accounts/enable_push", {"account_id": account_id})
300
301    def disable_push(self, account_id: str, unset_as_payout_destination: bool | None = None):
302        """
303        Disable push configuration for payouts.
304
305        If the account is a payout destination, set unset_as_payout_destination to True to
306        automatically remove it before disabling push.
307        """
308        payload = {"account_id": account_id}
309        if unset_as_payout_destination is not None:
310            payload["unset_as_payout_destination"] = unset_as_payout_destination
311        return self.http.post("/financial_accounts/disable_push", payload)
312
313    def disconnect(self, account_id: str, unset_as_payout_destination: bool | None = None):
314        """
315        Disconnect a financial account.
316
317        If the account is a payout destination, set unset_as_payout_destination to True to
318        automatically remove it before disconnecting.
319        """
320        payload = {"account_id": account_id}
321        if unset_as_payout_destination is not None:
322            payload["unset_as_payout_destination"] = unset_as_payout_destination
323        return self.http.post("/financial_accounts/disconnect", payload)
324
325    def reconnect(self, account_id: str):
326        """
327        Reconnect a previously disconnected financial account.
328
329        Args:
330            account_id: The financial account ID to reconnect.
331
332        Returns:
333            domain object containing the reconnected financial account.
334        """
335        return self.http.post("/financial_accounts/reconnect", {"account_id": account_id})
336
337    def enable_pull(self, account_id: str):
338        """Enable pull configuration for charges (creates mandate).
339
340        API endpoint: ``/financial_accounts/enable_pull``.
341
342        Args:
343            account_id (str): Unique identifier of the account.
344
345        Returns:
346            ``FinancialAccount`` decoded from the documented response shape.
347
348        Raises:
349            APIError: The API rejected the request or could not complete it.
350            NetworkError: The request could not reach the Inttegro API.
351            TimeoutError: The configured request deadline elapsed.
352        """
353        return self.http.post("/financial_accounts/enable_pull", {"account_id": account_id})
354
355    def disable_pull(self, account_id: str):
356        """Disable pull configuration for charges.
357
358        API endpoint: ``/financial_accounts/disable_pull``.
359
360        Args:
361            account_id (str): Unique identifier of the account.
362
363        Returns:
364            ``FinancialAccount`` decoded from the documented response shape.
365
366        Raises:
367            APIError: The API rejected the request or could not complete it.
368            NetworkError: The request could not reach the Inttegro API.
369            TimeoutError: The configured request deadline elapsed.
370        """
371        return self.http.post("/financial_accounts/disable_pull", {"account_id": account_id})

Financial accounts resource for connecting and managing payout destinations.

Financial accounts represent bank accounts, mobile money wallets, or Dosh accounts where you receive payouts. Before you can receive funds from Inttegro, you must connect and verify at least one financial account, then configure it as a payout destination.

The typical flow is:

  1. Connect a financial account (bank_account, mobile money, or dosh_account)
  2. Verify ownership via OTP
  3. Set as payout destination via Payouts resource
  4. Receive automatic or manual payouts

See https://studio.inttegro.com/set-up-financial-account for detailed guides.

FinancialAccounts(http: inttegro.http_client.HttpClient)
27    def __init__(self, http: HttpClient):
28        """Initialize FinancialAccounts resource with HTTP client."""
29        self.http = http

Initialize FinancialAccounts resource with HTTP client.

http
31    def create(self, payload: dict):
32        """
33        Create a new financial account.
34
35        Args:
36            payload: Account creation parameters
37
38        Returns:
39            domain object with created financial account
40
41        """
42        return self.http.post("/financial_accounts/create", payload)

Create a new financial account.

Arguments:
  • payload: Account creation parameters
Returns:

domain object with created financial account

def lookup( self, account_id: str) -> inttegro.financial_account.FinancialAccount:
44    def lookup(self, account_id: str):
45        """
46        Retrieve details of a financial account.
47
48        Fetches information about a connected financial account including its type,
49        verification status, and masked details.
50
51        Args:
52            account_id: The financial account ID (e.g., "fa_abc123")
53
54        Returns:
55            domain object containing the financial_account object
56
57        Example:
58            ```python
59            result = client.financial_accounts.lookup("fa_abc123")
60            account = result
61            print(f"Type: {account['type']}, Verified: {account['verified']}")
62            ```
63
64        See Also:
65            - connect(): Add new financial accounts
66            - page(): List all financial accounts
67        """
68        return self.http.post("/financial_accounts/lookup", {"account_id": account_id})

Retrieve details of a financial account.

Fetches information about a connected financial account including its type, verification status, and masked details.

Arguments:
  • account_id: The financial account ID (e.g., "fa_abc123")
Returns:

domain object containing the financial_account object

Example:
result = client.financial_accounts.lookup("fa_abc123")
account = result
print(f"Type: {account['type']}, Verified: {account['verified']}")
See Also:
  • connect(): Add new financial accounts
  • page(): List all financial accounts
 70    def connect(self, payload: dict):
 71        """
 72        Connect a new financial account for receiving payouts.
 73
 74        Adds a bank account, mobile money wallet, or Dosh account as a payout destination.
 75        Financial accounts must include basic information like label, type, currency, and
 76        type-specific configuration. Most account types require verification before they
 77        can receive funds.
 78
 79        Args:
 80            payload: Connection parameters including:
 81                - label: Account label (5-40 characters) (required)
 82                - type: Account type ("wallet", "bank_account", or "dosh_account") (required)
 83                - reference: External reference ID (5-40 characters) (required)
 84                - currency: Account currency (currently only "ghs" supported) (required)
 85                - description: Optional account description (0-200 characters)
 86                - owner: Account owner information (required):
 87                    - name: Owner full name
 88                    - address: Owner address details (name, line_1, city, region, country)
 89                - wallet: Wallet configuration (required if type is "wallet"):
 90                    - type: "mobile_money"
 91                    - mobile_money:
 92                        - account_number: Phone number (e.g., "0241234567")
 93                        - network: Network operator ("mtn", "vodafone", "airteltigo")
 94                - bank_account: Bank account configuration (required if type is "bank_account"):
 95                    - type: "ghana_bank_account"
 96                    - ghana_bank_account:
 97                        - number: Bank account number
 98                        - sort_code: Bank sort code (required if swift_code is not provided)
 99                        - swift_code: Bank SWIFT/BIC code (required if sort_code is not provided)
100                        - holder:
101                            - name: Account holder full name
102                            - address:
103                                - name: Address label
104                                - line_1: Address line 1
105                                - city: City or town
106                                - region: Region or state
107                                - country: Country code or name
108                - push_configuration: Configuration for sending funds to this account:
109                    - enabled: Whether payouts to this account are enabled (default: true)
110                - pull_configuration: Configuration for collecting funds from this account:
111                    - enabled: Whether pulling funds is enabled (default: false)
112                    - mandate: Optional mandate parameters (created automatically using request metadata)
113                - custom_data: Optional key-value metadata (string-to-string)
114
115        Returns:
116            domain object containing:
117                - financial_account: Created financial account with id, type, status, etc.
118                - requires_verification: Whether verification is needed before use
119
120        Raises:
121            ApiError: If parameters are invalid or connection fails
122
123        Example:
124            ```python
125            # Connect mobile money wallet
126            result = client.financial_accounts.connect({
127                "type": "wallet",
128                "currency": "ghs",
129                "label": "Primary MTN Wallet",
130                "description": "Main business mobile money account",
131                "reference": "WALLET-MTN-001",
132                "wallet": {
133                    "type": "mobile_money",
134                    "mobile_money": {
135                        "account_number": "0241234567",
136                        "network": "mtn"
137                    }
138                },
139                "push_configuration": {
140                    "enabled": True
141                }
142            })
143
144            fa = result
145            print(f"Financial account created: {fa['id']}")
146
147            # Verify if needed
148            if result.verification is not None:
149                # Initiate verification (sends OTP)
150                client.financial_accounts.verify({"account_id": fa["id"]})
151
152                # Collect OTP from user
153                otp = input("Enter OTP: ")
154
155                # Complete verification
156                client.financial_accounts.verify({
157                    "account_id": fa["id"],
158                    "token": otp
159                })
160
161            # Connect Vodafone wallet
162            result = client.financial_accounts.connect({
163                "type": "wallet",
164                "currency": "ghs",
165                "label": "Vodafone Cash Account",
166                "reference": "WALLET-VDF-001",
167                "wallet": {
168                    "type": "mobile_money",
169                    "mobile_money": {
170                        "account_number": "0501234567",
171                        "network": "vodafone"
172                    }
173                },
174                "push_configuration": {"enabled": True}
175            })
176            ```
177
178        Note:
179            - Financial accounts must be verified before they can receive payouts
180            - Only "ghs" currency is currently supported
181            - Dosh account types are placeholders for future functionality
182
183        See Also:
184            - verify(): Verify ownership of financial account
185            - Payouts.set_destinations(): Configure account as payout destination
186            - https://studio.inttegro.com/set-up-financial-account
187        """
188        return self.http.post("/financial_accounts/connect", payload)

Connect a new financial account for receiving payouts.

Adds a bank account, mobile money wallet, or Dosh account as a payout destination. Financial accounts must include basic information like label, type, currency, and type-specific configuration. Most account types require verification before they can receive funds.

Arguments:
  • payload: Connection parameters including:
    • label: Account label (5-40 characters) (required)
    • type: Account type ("wallet", "bank_account", or "dosh_account") (required)
    • reference: External reference ID (5-40 characters) (required)
    • currency: Account currency (currently only "ghs" supported) (required)
    • description: Optional account description (0-200 characters)
    • owner: Account owner information (required):
      • name: Owner full name
      • address: Owner address details (name, line_1, city, region, country)
    • wallet: Wallet configuration (required if type is "wallet"):
      • type: "mobile_money"
      • mobile_money:
        • account_number: Phone number (e.g., "0241234567")
        • network: Network operator ("mtn", "vodafone", "airteltigo")
    • bank_account: Bank account configuration (required if type is "bank_account"):
      • type: "ghana_bank_account"
      • ghana_bank_account:
        • number: Bank account number
        • sort_code: Bank sort code (required if swift_code is not provided)
        • swift_code: Bank SWIFT/BIC code (required if sort_code is not provided)
        • holder:
          • name: Account holder full name
          • address:
            • name: Address label
            • line_1: Address line 1
            • city: City or town
            • region: Region or state
            • country: Country code or name
    • push_configuration: Configuration for sending funds to this account:
      • enabled: Whether payouts to this account are enabled (default: true)
    • pull_configuration: Configuration for collecting funds from this account:
      • enabled: Whether pulling funds is enabled (default: false)
      • mandate: Optional mandate parameters (created automatically using request metadata)
    • custom_data: Optional key-value metadata (string-to-string)
Returns:

domain object containing: - financial_account: Created financial account with id, type, status, etc. - requires_verification: Whether verification is needed before use

Raises:
  • ApiError: If parameters are invalid or connection fails
Example:
# Connect mobile money wallet
result = client.financial_accounts.connect({
    "type": "wallet",
    "currency": "ghs",
    "label": "Primary MTN Wallet",
    "description": "Main business mobile money account",
    "reference": "WALLET-MTN-001",
    "wallet": {
        "type": "mobile_money",
        "mobile_money": {
            "account_number": "0241234567",
            "network": "mtn"
        }
    },
    "push_configuration": {
        "enabled": True
    }
})

fa = result
print(f"Financial account created: {fa['id']}")

# Verify if needed
if result.verification is not None:
    # Initiate verification (sends OTP)
    client.financial_accounts.verify({"account_id": fa["id"]})

    # Collect OTP from user
    otp = input("Enter OTP: ")

    # Complete verification
    client.financial_accounts.verify({
        "account_id": fa["id"],
        "token": otp
    })

# Connect Vodafone wallet
result = client.financial_accounts.connect({
    "type": "wallet",
    "currency": "ghs",
    "label": "Vodafone Cash Account",
    "reference": "WALLET-VDF-001",
    "wallet": {
        "type": "mobile_money",
        "mobile_money": {
            "account_number": "0501234567",
            "network": "vodafone"
        }
    },
    "push_configuration": {"enabled": True}
})
Note:
  • Financial accounts must be verified before they can receive payouts
  • Only "ghs" currency is currently supported
  • Dosh account types are placeholders for future functionality
See Also:
190    def archive(self, payload: dict):
191        """
192        Archive a financial account to prevent future use.
193
194        Archives a financial account, marking it inactive. Archived accounts cannot be
195        used as payout destinations but remain in your account history.
196
197        Args:
198            payload: Archive parameters including account_id
199
200        Returns:
201            domain object containing the archived financial_account
202
203        Example:
204            ```python
205            result = client.financial_accounts.archive({"account_id": "fa_abc123"})
206            ```
207
208        See Also:
209            - connect(): Add replacement financial account
210        """
211        return self.http.post("/financial_accounts/archive", payload)

Archive a financial account to prevent future use.

Archives a financial account, marking it inactive. Archived accounts cannot be used as payout destinations but remain in your account history.

Arguments:
  • payload: Archive parameters including account_id
Returns:

domain object containing the archived financial_account

Example:
result = client.financial_accounts.archive({"account_id": "fa_abc123"})
See Also:
  • connect(): Add replacement financial account
def page( self, payload: inttegro.financial_account.PageRequest | None = None) -> inttegro.financial_account.Page:
213    def page(self, payload: dict | None = None):
214        """
215        List connected financial accounts with pagination and filtering.
216
217        Retrieves a paginated list of your financial accounts with optional filtering
218        by type and status.
219
220        Args:
221            payload: Optional pagination parameters and filters
222
223        Returns:
224            domain object containing data (list of accounts), has_more, and count
225
226        Example:
227            ```python
228            result = client.financial_accounts.page({"limit": 20, "status": "active"})
229            ```
230
231        See Also:
232            - connect(): Add new financial accounts
233        """
234        return self.http.post("/financial_accounts/page", payload or {})

List connected financial accounts with pagination and filtering.

Retrieves a paginated list of your financial accounts with optional filtering by type and status.

Arguments:
  • payload: Optional pagination parameters and filters
Returns:

domain object containing data (list of accounts), has_more, and count

Example:
result = client.financial_accounts.page({"limit": 20, "status": "active"})
See Also:
  • connect(): Add new financial accounts
def search( self, payload: inttegro.search.Request) -> inttegro.search.Page:
236    def search(self, payload: SearchRequest) -> SearchPage:
237        """Search financial-account projections owned by the authenticated application."""
238        return self.http.post("/financial_accounts/search", payload)

Search financial-account projections owned by the authenticated application.

240    def verify(self, payload: dict):
241        """
242        Initiate or complete verification of a financial account.
243
244        Verification confirms ownership of the financial account. For mobile money, this
245        sends an OTP that must be submitted to complete verification.
246
247        Args:
248            payload: Verification parameters including account_id and optionally token
249
250        Returns:
251            domain object containing the financial_account with updated verification status
252
253        Example:
254            ```python
255            # Initiate verification
256            client.financial_accounts.verify({"account_id": "fa_abc123"})
257            # Complete verification
258            result = client.financial_accounts.verify({
259                "account_id": "fa_abc123",
260                "token": "123456"
261            })
262            ```
263
264        See Also:
265            - connect(): Add financial accounts that need verification
266        """
267        return self.http.post("/financial_accounts/verify", payload)

Initiate or complete verification of a financial account.

Verification confirms ownership of the financial account. For mobile money, this sends an OTP that must be submitted to complete verification.

Arguments:
  • payload: Verification parameters including account_id and optionally token
Returns:

domain object containing the financial_account with updated verification status

Example:
# Initiate verification
client.financial_accounts.verify({"account_id": "fa_abc123"})
# Complete verification
result = client.financial_accounts.verify({
    "account_id": "fa_abc123",
    "token": "123456"
})
See Also:
  • connect(): Add financial accounts that need verification
269    def update(self, payload: dict):
270        """
271        Update a financial account (PATCH semantics).
272
273        All fields except account_id are optional. custom_data merges with existing data; null deletes keys.
274
275        Args:
276            payload: Update parameters including account_id and fields to change
277
278        Returns:
279            domain object containing the updated financial_account
280        """
281        return self.http.post("/financial_accounts/update", payload)

Update a financial account (PATCH semantics).

All fields except account_id are optional. custom_data merges with existing data; null deletes keys.

Arguments:
  • payload: Update parameters including account_id and fields to change
Returns:

domain object containing the updated financial_account

def enable_push( self, account_id: str) -> inttegro.financial_account.FinancialAccount:
283    def enable_push(self, account_id: str):
284        """Enable push configuration for payouts.
285
286        API endpoint: ``/financial_accounts/enable_push``.
287
288        Args:
289            account_id (str): Unique identifier of the account.
290
291        Returns:
292            ``FinancialAccount`` decoded from the documented response shape.
293
294        Raises:
295            APIError: The API rejected the request or could not complete it.
296            NetworkError: The request could not reach the Inttegro API.
297            TimeoutError: The configured request deadline elapsed.
298        """
299        return self.http.post("/financial_accounts/enable_push", {"account_id": account_id})

Enable push configuration for payouts.

API endpoint: /financial_accounts/enable_push.

Arguments:
  • account_id (str): Unique identifier of the account.
Returns:

FinancialAccount decoded from the documented response shape.

Raises:
  • APIError: The API rejected the request or could not complete it.
  • NetworkError: The request could not reach the Inttegro API.
  • TimeoutError: The configured request deadline elapsed.
def disable_push( self, account_id: str, unset_as_payout_destination: bool | None = None) -> inttegro.financial_account.FinancialAccount:
301    def disable_push(self, account_id: str, unset_as_payout_destination: bool | None = None):
302        """
303        Disable push configuration for payouts.
304
305        If the account is a payout destination, set unset_as_payout_destination to True to
306        automatically remove it before disabling push.
307        """
308        payload = {"account_id": account_id}
309        if unset_as_payout_destination is not None:
310            payload["unset_as_payout_destination"] = unset_as_payout_destination
311        return self.http.post("/financial_accounts/disable_push", payload)

Disable push configuration for payouts.

If the account is a payout destination, set unset_as_payout_destination to True to automatically remove it before disabling push.

def disconnect( self, account_id: str, unset_as_payout_destination: bool | None = None) -> inttegro.financial_account.FinancialAccount:
313    def disconnect(self, account_id: str, unset_as_payout_destination: bool | None = None):
314        """
315        Disconnect a financial account.
316
317        If the account is a payout destination, set unset_as_payout_destination to True to
318        automatically remove it before disconnecting.
319        """
320        payload = {"account_id": account_id}
321        if unset_as_payout_destination is not None:
322            payload["unset_as_payout_destination"] = unset_as_payout_destination
323        return self.http.post("/financial_accounts/disconnect", payload)

Disconnect a financial account.

If the account is a payout destination, set unset_as_payout_destination to True to automatically remove it before disconnecting.

def reconnect( self, account_id: str) -> inttegro.financial_account.FinancialAccount:
325    def reconnect(self, account_id: str):
326        """
327        Reconnect a previously disconnected financial account.
328
329        Args:
330            account_id: The financial account ID to reconnect.
331
332        Returns:
333            domain object containing the reconnected financial account.
334        """
335        return self.http.post("/financial_accounts/reconnect", {"account_id": account_id})

Reconnect a previously disconnected financial account.

Arguments:
  • account_id: The financial account ID to reconnect.
Returns:

domain object containing the reconnected financial account.

def enable_pull( self, account_id: str) -> inttegro.financial_account.FinancialAccount:
337    def enable_pull(self, account_id: str):
338        """Enable pull configuration for charges (creates mandate).
339
340        API endpoint: ``/financial_accounts/enable_pull``.
341
342        Args:
343            account_id (str): Unique identifier of the account.
344
345        Returns:
346            ``FinancialAccount`` decoded from the documented response shape.
347
348        Raises:
349            APIError: The API rejected the request or could not complete it.
350            NetworkError: The request could not reach the Inttegro API.
351            TimeoutError: The configured request deadline elapsed.
352        """
353        return self.http.post("/financial_accounts/enable_pull", {"account_id": account_id})

Enable pull configuration for charges (creates mandate).

API endpoint: /financial_accounts/enable_pull.

Arguments:
  • account_id (str): Unique identifier of the account.
Returns:

FinancialAccount decoded from the documented response shape.

Raises:
  • APIError: The API rejected the request or could not complete it.
  • NetworkError: The request could not reach the Inttegro API.
  • TimeoutError: The configured request deadline elapsed.
def disable_pull( self, account_id: str) -> inttegro.financial_account.FinancialAccount:
355    def disable_pull(self, account_id: str):
356        """Disable pull configuration for charges.
357
358        API endpoint: ``/financial_accounts/disable_pull``.
359
360        Args:
361            account_id (str): Unique identifier of the account.
362
363        Returns:
364            ``FinancialAccount`` decoded from the documented response shape.
365
366        Raises:
367            APIError: The API rejected the request or could not complete it.
368            NetworkError: The request could not reach the Inttegro API.
369            TimeoutError: The configured request deadline elapsed.
370        """
371        return self.http.post("/financial_accounts/disable_pull", {"account_id": account_id})

Disable pull configuration for charges.

API endpoint: /financial_accounts/disable_pull.

Arguments:
  • account_id (str): Unique identifier of the account.
Returns:

FinancialAccount decoded from the documented response shape.

Raises:
  • APIError: The API rejected the request or could not complete it.
  • NetworkError: The request could not reach the Inttegro API.
  • TimeoutError: The configured request deadline elapsed.