Skip to content
Closed
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
4 changes: 2 additions & 2 deletions openapi/SOURCE.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"verification.json": {
"url": "https://docs.didit.me/openapi-25.json",
"sha256": "9ada6192b24a5d85e983e57e87fccb6e762d74060b6f0b892928356dd432137c",
"fetched_at": "2026-10-23T06:48:14Z"
"sha256": "c4b1165f80a29a0b87f84657fc4cc68794b43a66ca5fd85824c400f6e4fcef09",
"fetched_at": "2026-10-23T22:13:07Z"
},
"account.json": {
"url": "https://docs.didit.me/openapi-auth.json",
Expand Down
974 changes: 974 additions & 0 deletions openapi/verification.json

Large diffs are not rendered by default.

151 changes: 151 additions & 0 deletions src/main/java/me/didit/resources/BankResource.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
// Code generated by codegen from openapi/*.json. DO NOT EDIT.
package me.didit.resources;

import java.util.concurrent.CompletableFuture;
import me.didit.core.ApiClient;
import me.didit.core.ApiRequest;
import me.didit.core.Conv;
import me.didit.core.RawResponse;
import me.didit.core.RequestOptions;
import me.didit.core.ResponseHandler;
import me.didit.core.Responses;
import me.didit.types.BankAccountCheckRequest;
import me.didit.types.BankAccountCheckResponse;

/** The {@code bank} resource: {@code client.bank()}. */
public final class BankResource {
private final ApiClient client;
private final WithRawResponse withRawResponse;

BankResource(ApiClient client) {
this.client = client;
this.withRawResponse = new WithRawResponse(client);
}

/**
* The same operations, returning the HTTP status, headers and request id with the parsed body.
*
* @return the raw response view
*/
public WithRawResponse withRawResponse() {
return withRawResponse;
}

/**
* Check a bank account
*
* <p>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.
*
* <p><b>What you send.</b> The account's <code>country</code> (ISO 3166-1 alpha-3), the <code>account</code> the way that country writes it, and the <code>holder</code> name: <code>full_name</code> for a person or <code>business_name</code> for a company. A business name checks a business account.
*
* <p><b>What you get back.</b> <code>result</code> is <code>match</code>, <code>close_match</code>, <code>no_match</code> or <code>cannot_verify</code>. On a <code>close_match</code>, <code>holder_name</code> is the name the bank holds the account under, when the bank returned it. <code>account</code> comes back masked to its last 4 characters.
*
* <p><b>Billing.</b> Each check the bank answers is billed once at the Account check price of the account's country, whatever the result: a <code>no_match</code>, an account that does not exist and a <code>cannot_verify</code> are billed too. A request answered with an error is never billed.
*
* <p><b>Every request is a new check.</b> 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.
*
* <p><b>Sandbox.</b> 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: <code>0001</code> a <code>close_match</code> with a <code>holder_name</code>, <code>0002</code> a <code>close_match</code> without one, <code>0003</code> and <code>0006</code> a <code>no_match</code>, <code>0004</code> <code>cannot_verify</code>, <code>0005</code> a <code>503</code> and <code>0009</code> a <code>400</code>. Any other ending is a <code>match</code>.
*
* <p><b>API keys.</b> A scoped API key needs write access to sessions.
*
* <p>{@code POST /v3/bank/account-check/}
*
* @param params the request parameters
* @param options per-request options that override the client options
* @return the response body
*/
public BankAccountCheckResponse accountCheck(BankAccountCheckRequest params, RequestOptions options) {
return client.execute(accountCheckRequest(params), options, ACCOUNT_CHECK_RESPONSE).data();
}

/**
* Asynchronous {@link #accountCheck(BankAccountCheckRequest, RequestOptions)}.
*
* @param params the request parameters
* @param options per-request options
* @return a future completed with the result
*/
public CompletableFuture<BankAccountCheckResponse> accountCheckAsync(BankAccountCheckRequest params, RequestOptions options) {
return client.executeAsync(accountCheckRequest(params), options, ACCOUNT_CHECK_RESPONSE).thenApply(RawResponse::data);
}

/**
* Same as {@link #accountCheck(BankAccountCheckRequest, RequestOptions)}, with the client's options.
*
* @param params the request parameters
* @return the result
*/
public BankAccountCheckResponse accountCheck(BankAccountCheckRequest params) {
return client.execute(accountCheckRequest(params), RequestOptions.none(), ACCOUNT_CHECK_RESPONSE).data();
}

/**
* Asynchronous {@link #accountCheck(BankAccountCheckRequest, RequestOptions)}, with the client's options.
*
* @param params the request parameters
* @return a future completed with the result
*/
public CompletableFuture<BankAccountCheckResponse> accountCheckAsync(BankAccountCheckRequest params) {
return client.executeAsync(accountCheckRequest(params), RequestOptions.none(), ACCOUNT_CHECK_RESPONSE).thenApply(RawResponse::data);
}

private static final ResponseHandler<BankAccountCheckResponse> ACCOUNT_CHECK_RESPONSE = Responses.json(Conv.model(BankAccountCheckResponse::fromJson));

private static ApiRequest accountCheckRequest(BankAccountCheckRequest params) {
return ApiRequest.builder("POST", "/v3/bank/account-check/")
.params(params)
.body(ApiRequest.BodyEncoding.JSON)
.build();
}

/** The {@code bank} operations returning {@link RawResponse}. */
public static final class WithRawResponse {
private final ApiClient client;

WithRawResponse(ApiClient client) {
this.client = client;
}

/**
* {@link #accountCheck(BankAccountCheckRequest, RequestOptions)} with the raw response.
*
* @param params the request parameters
* @param options per-request options
* @return the result
*/
public RawResponse<BankAccountCheckResponse> accountCheck(BankAccountCheckRequest params, RequestOptions options) {
return client.execute(accountCheckRequest(params), options, ACCOUNT_CHECK_RESPONSE);
}

/**
* Asynchronous {@link #accountCheck(BankAccountCheckRequest, RequestOptions)} with the raw response.
*
* @param params the request parameters
* @param options per-request options
* @return a future completed with the result
*/
public CompletableFuture<RawResponse<BankAccountCheckResponse>> accountCheckAsync(BankAccountCheckRequest params, RequestOptions options) {
return client.executeAsync(accountCheckRequest(params), options, ACCOUNT_CHECK_RESPONSE);
}

/**
* {@link #accountCheck(BankAccountCheckRequest, RequestOptions)} with the raw response, with the client's options.
*
* @param params the request parameters
* @return the result
*/
public RawResponse<BankAccountCheckResponse> accountCheck(BankAccountCheckRequest params) {
return client.execute(accountCheckRequest(params), RequestOptions.none(), ACCOUNT_CHECK_RESPONSE);
}

/**
* Asynchronous {@link #accountCheck(BankAccountCheckRequest, RequestOptions)} with the raw response, with the client's options.
*
* @param params the request parameters
* @return a future completed with the result
*/
public CompletableFuture<RawResponse<BankAccountCheckResponse>> accountCheckAsync(BankAccountCheckRequest params) {
return client.executeAsync(accountCheckRequest(params), RequestOptions.none(), ACCOUNT_CHECK_RESPONSE);
}
}
}
11 changes: 11 additions & 0 deletions src/main/java/me/didit/resources/DiditResources.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public abstract class DiditResources {
private final AmlResource aml;
private final AmlMonitoringResource amlMonitoring;
private final AnalyticsResource analytics;
private final BankResource bank;
private final BillingResource billing;
private final BiometricTemplatesResource biometricTemplates;
private final BlocklistResource blocklist;
Expand Down Expand Up @@ -59,6 +60,7 @@ protected DiditResources(ApiClient client) {
this.aml = new AmlResource(client);
this.amlMonitoring = new AmlMonitoringResource(client);
this.analytics = new AnalyticsResource(client);
this.bank = new BankResource(client);
this.billing = new BillingResource(client);
this.biometricTemplates = new BiometricTemplatesResource(client);
this.blocklist = new BlocklistResource(client);
Expand Down Expand Up @@ -140,6 +142,15 @@ public final AnalyticsResource analytics() {
return analytics;
}

/**
* The {@code bank} resource.
*
* @return the resource
*/
public final BankResource bank() {
return bank;
}

/**
* The {@code billing} resource.
*
Expand Down
Loading