Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions openapi/SOURCE.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"verification.json": {
"url": "https://docs.didit.me/openapi-25.json",
"sha256": "9ada6192b24a5d85e983e57e87fccb6e762d74060b6f0b892928356dd432137c",
"fetched_at": "2026-10-23T06:48:12Z"
"sha256": "da776b2226bd264797268988b179f37b906c0b2e4953a16111c0d4296c89fcd4",
"fetched_at": "2026-10-23T22:31:09Z"
},
"account.json": {
"url": "https://docs.didit.me/openapi-auth.json",
"sha256": "5fafb88b306ab60c7c105b0bf00fa2a6a49b5d2ca8115eb003b332f073844b39",
"fetched_at": "2026-10-23T06:48:12Z"
"fetched_at": "2026-10-23T22:31:09Z"
},
"webhook-vectors.json": {
"generator": "product-automations scripts/server-sdks/make_vectors.py (seeded 2026-10-17)",
Expand Down
973 changes: 973 additions & 0 deletions openapi/verification.json

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions src/didit/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from didit.resources.aml import Aml, AsyncAml
from didit.resources.aml_monitoring import AmlMonitoring, AsyncAmlMonitoring
from didit.resources.analytics import Analytics, AsyncAnalytics
from didit.resources.bank import AsyncBank, Bank
from didit.resources.billing import AsyncBilling, Billing
from didit.resources.biometric_templates import AsyncBiometricTemplates, BiometricTemplates
from didit.resources.blocklist import AsyncBlocklist, Blocklist
Expand Down Expand Up @@ -85,6 +86,12 @@ def analytics(self) -> Analytics:

return Analytics(self)

@cached_property
def bank(self) -> Bank:
from didit.resources.bank import Bank

return Bank(self)

@cached_property
def billing(self) -> Billing:
from didit.resources.billing import Billing
Expand Down Expand Up @@ -323,6 +330,12 @@ def analytics(self) -> AsyncAnalytics:

return AsyncAnalytics(self)

@cached_property
def bank(self) -> AsyncBank:
from didit.resources.bank import AsyncBank

return AsyncBank(self)

@cached_property
def billing(self) -> AsyncBilling:
from didit.resources.billing import AsyncBilling
Expand Down
208 changes: 208 additions & 0 deletions src/didit/resources/bank.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
# Code generated by codegen from openapi/*.json. DO NOT EDIT.
"""The ``bank`` resource."""

from __future__ import annotations

from functools import cached_property
from typing import cast

import httpx

from didit._resource import AsyncAPIResource, SyncAPIResource
from didit._response import (
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
to_raw_response_wrapper,
to_streamed_response_wrapper,
)
from didit._types import NOT_GIVEN, Body, Headers, NotGiven, Query
from didit.types.bank.account_check_params import BankAccountCheckParamsAccount
from didit.types.components.bank_account_check_holder import BankAccountCheckHolder
from didit.types.components.bank_account_check_response import BankAccountCheckResponse

__all__ = [
"Bank",
"AsyncBank",
"BankWithRawResponse",
"AsyncBankWithRawResponse",
"BankWithStreamingResponse",
"AsyncBankWithStreamingResponse",
]


class Bank(SyncAPIResource):
"""The ``bank`` resource of the Didit API.

Methods: ``account_check``.
"""

@cached_property
def with_raw_response(self) -> BankWithRawResponse:
"""Every method of this resource, returning the raw HTTP response."""
return BankWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> BankWithStreamingResponse:
"""Every method of this resource, returning the HTTP response before reading its body."""
return BankWithStreamingResponse(self)

def account_check(
self,
*,
country: str,
account: BankAccountCheckParamsAccount,
holder: BankAccountCheckHolder,
vendor_data: str | None | NotGiven = NOT_GIVEN,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> BankAccountCheckResponse:
"""Check a bank account.

Check that a bank account belongs to the person or company you name, before you send money to it. No session and no sign-in: send the name and the account, read the result. It is the [account check](/core-technology/bank-verification/account-check) of the Bank Verification step, run from your backend.

**What you send.** The account's `country` (ISO 3166-1 alpha-3), the `account` the way that country writes it, and the `holder` name: `full_name` for a person or `business_name` for a company. A business name checks a business account.

**What you get back.** `result` is `match`, `close_match`, `no_match` or `cannot_verify`. On a `close_match`, `holder_name` is the name the bank holds the account under, when the bank returned it. `account` comes back masked to its last 4 characters.

**Billing.** Each check the bank answers is billed once at the Account check price of the account's country, whatever the result: a `no_match`, an account that does not exist and a `cannot_verify` are billed too. A request answered with an error is never billed.

**Every request is a new check.** There is no idempotency key and no endpoint to read a check back, so a retried request runs, and is billed, again. Store the response.

**Sandbox.** A sandbox key calls no bank and is charged nothing. The last 4 characters of the IBAN, else of the account number, choose the answer: `0001` a `close_match` with a `holder_name`, `0002` a `close_match` without one, `0003` and `0006` a `no_match`, `0004` `cannot_verify`, `0005` a `503` and `0009` a `400`. Any other ending is a `match`.

**API keys.** A scoped API key needs write access to sessions.

``POST /v3/bank/account-check/``

Args:
country: The account's country, as an ISO 3166-1 alpha-3 code, for example `GBR`. Lowercase is accepted.
account: The account the way its country writes it: an `iban`, or an `account_number` with the bank or branch code the country needs (`sort_code`, `routing_number`, `transit_institution`, `bsb`, `ifsc`, `bank_code` or `bic`). Mexico takes a `clabe` and Argentina a `cbu_cvu`, which already name the bank. A business account adds a `registration_id` where the country asks for one. Spaces, dashes and dots are ignored. Keys the country's check does not use are ignored; a key it needs and does not get is a `400` that names it.
holder: The name the account is checked against. Send exactly one of `full_name` and `business_name`.
vendor_data: Your own reference for this check, returned unchanged.
extra_headers: Headers to add to (or, with ``None``, remove from) this request.
extra_query: Query parameters to add to this request.
extra_body: Top-level JSON fields to add to this request's body.
timeout: Overrides the client's timeout for this request, in seconds.
"""
return cast(
"BankAccountCheckResponse",
self._client.request(
"post",
"/v3/bank/account-check/",
cast_to=BankAccountCheckResponse,
auth="api_key",
body={
"country": country,
"account": account,
"holder": holder,
"vendor_data": vendor_data,
},
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
),
)


class AsyncBank(AsyncAPIResource):
"""The ``bank`` resource of the Didit API.

Methods: ``account_check``.
"""

@cached_property
def with_raw_response(self) -> AsyncBankWithRawResponse:
"""Every method of this resource, returning the raw HTTP response."""
return AsyncBankWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AsyncBankWithStreamingResponse:
"""Every method of this resource, returning the HTTP response before reading its body."""
return AsyncBankWithStreamingResponse(self)

async def account_check(
self,
*,
country: str,
account: BankAccountCheckParamsAccount,
holder: BankAccountCheckHolder,
vendor_data: str | None | NotGiven = NOT_GIVEN,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> BankAccountCheckResponse:
"""Check a bank account.

Check that a bank account belongs to the person or company you name, before you send money to it. No session and no sign-in: send the name and the account, read the result. It is the [account check](/core-technology/bank-verification/account-check) of the Bank Verification step, run from your backend.

**What you send.** The account's `country` (ISO 3166-1 alpha-3), the `account` the way that country writes it, and the `holder` name: `full_name` for a person or `business_name` for a company. A business name checks a business account.

**What you get back.** `result` is `match`, `close_match`, `no_match` or `cannot_verify`. On a `close_match`, `holder_name` is the name the bank holds the account under, when the bank returned it. `account` comes back masked to its last 4 characters.

**Billing.** Each check the bank answers is billed once at the Account check price of the account's country, whatever the result: a `no_match`, an account that does not exist and a `cannot_verify` are billed too. A request answered with an error is never billed.

**Every request is a new check.** There is no idempotency key and no endpoint to read a check back, so a retried request runs, and is billed, again. Store the response.

**Sandbox.** A sandbox key calls no bank and is charged nothing. The last 4 characters of the IBAN, else of the account number, choose the answer: `0001` a `close_match` with a `holder_name`, `0002` a `close_match` without one, `0003` and `0006` a `no_match`, `0004` `cannot_verify`, `0005` a `503` and `0009` a `400`. Any other ending is a `match`.

**API keys.** A scoped API key needs write access to sessions.

``POST /v3/bank/account-check/``

Args:
country: The account's country, as an ISO 3166-1 alpha-3 code, for example `GBR`. Lowercase is accepted.
account: The account the way its country writes it: an `iban`, or an `account_number` with the bank or branch code the country needs (`sort_code`, `routing_number`, `transit_institution`, `bsb`, `ifsc`, `bank_code` or `bic`). Mexico takes a `clabe` and Argentina a `cbu_cvu`, which already name the bank. A business account adds a `registration_id` where the country asks for one. Spaces, dashes and dots are ignored. Keys the country's check does not use are ignored; a key it needs and does not get is a `400` that names it.
holder: The name the account is checked against. Send exactly one of `full_name` and `business_name`.
vendor_data: Your own reference for this check, returned unchanged.
extra_headers: Headers to add to (or, with ``None``, remove from) this request.
extra_query: Query parameters to add to this request.
extra_body: Top-level JSON fields to add to this request's body.
timeout: Overrides the client's timeout for this request, in seconds.
"""
return cast(
"BankAccountCheckResponse",
await self._client.request(
"post",
"/v3/bank/account-check/",
cast_to=BankAccountCheckResponse,
auth="api_key",
body={
"country": country,
"account": account,
"holder": holder,
"vendor_data": vendor_data,
},
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
),
)


class BankWithRawResponse:
def __init__(self, resource: Bank) -> None:
self._resource = resource
self.account_check = to_raw_response_wrapper(resource.account_check)


class AsyncBankWithRawResponse:
def __init__(self, resource: AsyncBank) -> None:
self._resource = resource
self.account_check = async_to_raw_response_wrapper(resource.account_check)


class BankWithStreamingResponse:
def __init__(self, resource: Bank) -> None:
self._resource = resource
self.account_check = to_streamed_response_wrapper(resource.account_check)


class AsyncBankWithStreamingResponse:
def __init__(self, resource: AsyncBank) -> None:
self._resource = resource
self.account_check = async_to_streamed_response_wrapper(resource.account_check)
65 changes: 65 additions & 0 deletions src/didit/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@
from didit.types.aml_monitoring.retrieve_job_response import (
AmlMonitoringRetrieveJobResponseResults as AmlMonitoringRetrieveJobResponseResults,
)
from didit.types.bank.account_check_params import (
BankAccountCheckParams as BankAccountCheckParams,
)
from didit.types.bank.account_check_params import (
BankAccountCheckParamsAccount as BankAccountCheckParamsAccount,
)
from didit.types.billing.retrieve_balance_response import (
BillingRetrieveBalanceResponse as BillingRetrieveBalanceResponse,
)
Expand Down Expand Up @@ -486,6 +492,39 @@
ApplicationCredentialsSummary as ApplicationCredentialsSummary,
)
from didit.types.components.application_product import ApplicationProduct as ApplicationProduct
from didit.types.components.bank_account_check_business_holder import (
BankAccountCheckBusinessHolder as BankAccountCheckBusinessHolder,
)
from didit.types.components.bank_account_check_holder import (
BankAccountCheckHolder as BankAccountCheckHolder,
)
from didit.types.components.bank_account_check_person_holder import (
BankAccountCheckPersonHolder as BankAccountCheckPersonHolder,
)
from didit.types.components.bank_account_check_response import (
BankAccountCheckResponse as BankAccountCheckResponse,
)
from didit.types.components.bank_verification_result import (
BankVerificationResult as BankVerificationResult,
)
from didit.types.components.bank_verification_result import (
BankVerificationResultAccount as BankVerificationResultAccount,
)
from didit.types.components.bank_verification_result import (
BankVerificationResultBilling as BankVerificationResultBilling,
)
from didit.types.components.bank_verification_result import (
BankVerificationResultConnection as BankVerificationResultConnection,
)
from didit.types.components.bank_verification_result import (
BankVerificationResultFinancialData as BankVerificationResultFinancialData,
)
from didit.types.components.bank_verification_result import (
BankVerificationResultOwnership as BankVerificationResultOwnership,
)
from didit.types.components.bank_verification_result import (
BankVerificationResultRoute as BankVerificationResultRoute,
)
from didit.types.components.blocklisted_item import BlocklistedItem as BlocklistedItem
from didit.types.components.branding_customization import (
BrandingCustomization as BrandingCustomization,
Expand Down Expand Up @@ -3101,6 +3140,19 @@
"ApplicationAnalyticsWorkflowFunnelValueStepsValue": "components.application_analytics_workflow_funnel",
"ApplicationCredentialsSummary": "components.application_credentials_summary",
"ApplicationProduct": "components.application_product",
"BankAccountCheckBusinessHolder": "components.bank_account_check_business_holder",
"BankAccountCheckHolder": "components.bank_account_check_holder",
"BankAccountCheckParams": "bank.account_check_params",
"BankAccountCheckParamsAccount": "bank.account_check_params",
"BankAccountCheckPersonHolder": "components.bank_account_check_person_holder",
"BankAccountCheckResponse": "components.bank_account_check_response",
"BankVerificationResult": "components.bank_verification_result",
"BankVerificationResultAccount": "components.bank_verification_result",
"BankVerificationResultBilling": "components.bank_verification_result",
"BankVerificationResultConnection": "components.bank_verification_result",
"BankVerificationResultFinancialData": "components.bank_verification_result",
"BankVerificationResultOwnership": "components.bank_verification_result",
"BankVerificationResultRoute": "components.bank_verification_result",
"BillingRetrieveBalanceResponse": "billing.retrieve_balance_response",
"BillingTopUpParams": "billing.top_up_params",
"BillingTopUpResponse": "billing.top_up_response",
Expand Down Expand Up @@ -4202,6 +4254,19 @@
"ApplicationAnalyticsWorkflowFunnelValueStepsValue",
"ApplicationCredentialsSummary",
"ApplicationProduct",
"BankAccountCheckBusinessHolder",
"BankAccountCheckHolder",
"BankAccountCheckParams",
"BankAccountCheckParamsAccount",
"BankAccountCheckPersonHolder",
"BankAccountCheckResponse",
"BankVerificationResult",
"BankVerificationResultAccount",
"BankVerificationResultBilling",
"BankVerificationResultConnection",
"BankVerificationResultFinancialData",
"BankVerificationResultOwnership",
"BankVerificationResultRoute",
"BillingRetrieveBalanceResponse",
"BillingTopUpParams",
"BillingTopUpResponse",
Expand Down
1 change: 1 addition & 0 deletions src/didit/types/bank/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Code generated by codegen from openapi/*.json. DO NOT EDIT.
Loading
Loading