@didit-protocol/sdk-node 2.1.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/dist/index.cjs +5 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -12
- package/dist/index.d.ts +14 -12
- package/dist/index.js +5 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -5610,7 +5610,7 @@ interface SessionDecision {
|
|
|
5610
5610
|
document_ai_documents?: SessionDecisionDocumentAiDocuments[] | null;
|
|
5611
5611
|
/** **Array of questionnaire response reports** - always a JSON array, never a singular `questionnaire` object. `null` until at least one questionnaire step has produced data. Each item is the full report, including `node_id`, the questionnaire metadata, sections with form elements, and the user's answers. */
|
|
5612
5612
|
questionnaire_responses?: SessionDecisionQuestionnaireResponses[] | null;
|
|
5613
|
-
/** Bank Verification results, one item per Bank Verification step, for User and Business Verification. `null` until a step produces one. Each item's `method` says how the account was verified: `open_banking` (bank sign-in) or `account_lookup` (account check), or a `statement` or `microdeposits` fallback, and `none` when the person continued without a bank before any attempt was evaluated (`continued_without_bank`). See [Bank verification methods](/core-technology/bank-verification/verification-methods).
|
|
5613
|
+
/** Bank Verification results, one item per Bank Verification step, for User and Business Verification. `null` until a step produces one. Each item's `method` says how the account was verified: `open_banking` (bank sign-in) or `account_lookup` (account check), or a `statement` or `microdeposits` fallback, and `none` when the person continued without a bank before any attempt was evaluated (`continued_without_bank`). See [Bank verification methods](/core-technology/bank-verification/verification-methods). */
|
|
5614
5614
|
bank_verifications?: BankVerificationResult[] | null;
|
|
5615
5615
|
/** E-signature results, one item per signer and signature step, for User and Business Verification. Present only when the workflow has an E-signature step; an empty array until a signer reaches it. See the [E-signature report](/core-technology/electronic-signature/report-electronic-signature). */
|
|
5616
5616
|
signatures?: SignatureResult[];
|
|
@@ -6030,6 +6030,8 @@ interface SessionDecisionDocumentVerificationsItemsDocumentMetadataOverlayManipu
|
|
|
6030
6030
|
detected?: boolean;
|
|
6031
6031
|
/** Whether the PDF could be analyzed. */
|
|
6032
6032
|
analyzed?: boolean;
|
|
6033
|
+
/** Present and true only when the file could not be checked in full. What was checked keeps its findings where it can, and the document raises the unproven text replacement warning. */
|
|
6034
|
+
analysis_incomplete?: boolean;
|
|
6033
6035
|
/** Forensic signals that fired, such as duplicate_font_subset or glyph_fragmentation. */
|
|
6034
6036
|
signals?: string[];
|
|
6035
6037
|
/** Suspected manipulated areas in PDF page coordinates. */
|
|
@@ -7460,6 +7462,8 @@ interface SessionDecisionPoaVerificationsDocumentMetadataOverlayManipulation {
|
|
|
7460
7462
|
detected?: boolean;
|
|
7461
7463
|
/** Whether the PDF could be analyzed. */
|
|
7462
7464
|
analyzed?: boolean;
|
|
7465
|
+
/** Present and true only when the file could not be checked in full. What was checked keeps its findings where it can, and the document raises the unproven text replacement warning. */
|
|
7466
|
+
analysis_incomplete?: boolean;
|
|
7463
7467
|
/** Forensic signals that fired, such as duplicate_font_subset or glyph_fragmentation. */
|
|
7464
7468
|
signals?: string[];
|
|
7465
7469
|
/** Suspected manipulated areas in PDF page coordinates. */
|
|
@@ -11281,7 +11285,7 @@ declare class Analytics extends APIResource {
|
|
|
11281
11285
|
}
|
|
11282
11286
|
|
|
11283
11287
|
interface BankAccountCheckParams {
|
|
11284
|
-
/** The account's country, as an ISO 3166-1 alpha-3 code, for example `
|
|
11288
|
+
/** The account's country, as an ISO 3166-1 alpha-3 code, for example `NGA`. Lowercase is accepted. */
|
|
11285
11289
|
country: string;
|
|
11286
11290
|
/** 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. */
|
|
11287
11291
|
account: BankAccountCheckParamsAccount;
|
|
@@ -11326,8 +11330,6 @@ declare class Bank extends APIResource {
|
|
|
11326
11330
|
/**
|
|
11327
11331
|
* Check a bank account
|
|
11328
11332
|
*
|
|
11329
|
-
* **Not available in production yet.** Bank Verification is switched off in production, so until it is switched on this endpoint answers `404` with `bank_verification_not_available`. Do not build on it yet. The rest of this description is what the endpoint does once it is available.
|
|
11330
|
-
*
|
|
11331
11333
|
* 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.
|
|
11332
11334
|
*
|
|
11333
11335
|
* **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.
|
|
@@ -11338,7 +11340,7 @@ declare class Bank extends APIResource {
|
|
|
11338
11340
|
*
|
|
11339
11341
|
* **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.
|
|
11340
11342
|
*
|
|
11341
|
-
* **Sandbox.**
|
|
11343
|
+
* **Sandbox.** Use a sandbox API key with the sample account details. 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`.
|
|
11342
11344
|
*
|
|
11343
11345
|
* **API keys.** A scoped API key needs write access to sessions.
|
|
11344
11346
|
*
|
|
@@ -13745,7 +13747,7 @@ declare class Email extends APIResource {
|
|
|
13745
13747
|
*
|
|
13746
13748
|
* **How send and check pair up.** Verification state is keyed by your application plus the `email` address - the check call does not take `request_id`. Each new send creates a pending verification that lives for **5 minutes**: call the check with the same address and the code the user received before the window closes. Calling send again for the same address while a verification is pending generates a fresh code for that same verification (`status: "Retry"`, same `request_id`); the previous code stops working. At most one retry is attached this way (two sends total); a further send starts a fresh verification with a new `request_id`. The 5-minute window is measured from the first send and is not extended by retries.
|
|
13747
13749
|
*
|
|
13748
|
-
* **Deliverability pre-check.** Before anything is sent, the address goes through syntax and DNS/MX validation. Addresses that cannot receive mail return `200` with `status: "Undeliverable"` and `reason: "email_can_not_be_delivered"` - no email is sent, nothing is billed, and the verification is immediately finalized as `Declined` (a follow-up check returns `Expired or Not Found`). A
|
|
13750
|
+
* **Deliverability pre-check.** Before anything is sent, the address goes through syntax and DNS/MX validation. Addresses that cannot receive mail return `200` with `status: "Undeliverable"` and `reason: "email_can_not_be_delivered"` - no email is sent, nothing is billed, and the verification is immediately finalized as `Declined` (a follow-up check returns `Expired or Not Found`). A send that fails for a reason that is not the address (the email could not be handed over for delivery) returns `503` instead: no code is sent, nothing is billed, the verification stays open and the same request can be repeated.
|
|
13749
13751
|
*
|
|
13750
13752
|
* **Code format and branding.** Codes are 4–8 characters (`options.code_size`, default 6), numeric by default; set `options.alphanumeric_code: true` for uppercase letters and digits (the check comparison is case-insensitive). The email template is localized via `options.locale` (54 supported languages) and can use your application's white-label branding via `options.use_white_label_customization`.
|
|
13751
13753
|
*
|
|
@@ -17711,7 +17713,7 @@ declare class Pricing extends APIResource {
|
|
|
17711
17713
|
/**
|
|
17712
17714
|
* Get bank verification prices (public, unauthenticated)
|
|
17713
17715
|
*
|
|
17714
|
-
* Returns the list price of each Bank Verification method in every country: bank sign-in with its balance and transactions add-ons, and the account check.
|
|
17716
|
+
* Returns the list price of each Bank Verification method in every country: bank sign-in with its balance and transactions add-ons, and the account check. A method a country does not offer today shows as not available, with no price. Use it to quote a bank step before you build a workflow, or to show bank prices in your own product.
|
|
17715
17717
|
*
|
|
17716
17718
|
* Public: send no auth header. The response contains no organization data and is the same for every caller. It is cached publicly for one hour and carries an `ETag`, so send `If-None-Match` to get a `304 Not Modified` when nothing changed.
|
|
17717
17719
|
*
|
|
@@ -17745,7 +17747,7 @@ interface ProofOfAddressVerifyParams {
|
|
|
17745
17747
|
poa_name_mismatch_action?: "DECLINE" | "NO_ACTION" | (string & {});
|
|
17746
17748
|
/** What to do on file-integrity problems - in practice only `DOCUMENT_METADATA_MISMATCH` is produced by this endpoint. */
|
|
17747
17749
|
poa_document_issues_action?: "DECLINE" | "NO_ACTION" | (string & {});
|
|
17748
|
-
/** What to do when document manipulation is suspected (`SUSPECTED_DOCUMENT_MANIPULATION`) - e.g. the PDF was modified after digital signing, processed by a known PDF editor, shows overlay-text manipulation, or has inconsistent EXIF dates. */
|
|
17750
|
+
/** What to do when document manipulation is suspected (`SUSPECTED_DOCUMENT_MANIPULATION`) - e.g. the PDF was modified after digital signing, processed by a known PDF editor, shows overlay-text manipulation, or has inconsistent EXIF dates. Also governs `POA_DOCUMENT_UNPROVEN_TEXT_REPLACEMENT` (a re-typed text field the file cannot prove changed or unchanged): `DECLINE` declines it too, `NO_ACTION` keeps it as a warning. */
|
|
17749
17751
|
poa_document_authenticity_action?: "DECLINE" | "NO_ACTION" | (string & {});
|
|
17750
17752
|
/** What to do when the document language is outside `poa_languages_allowed` (`UNSUPPORTED_DOCUMENT_LANGUAGE`). */
|
|
17751
17753
|
poa_unsupported_language_action?: "DECLINE" | "NO_ACTION" | (string & {});
|
|
@@ -17841,11 +17843,11 @@ interface ProofOfAddressVerifyResponsePoaPoaParsedAddressDocumentLocation {
|
|
|
17841
17843
|
longitude?: number;
|
|
17842
17844
|
}
|
|
17843
17845
|
interface ProofOfAddressVerifyResponsePoaWarnings {
|
|
17844
|
-
/** Machine-readable risk code. Always-decline: `MISSING_ADDRESS_INFORMATION`, `POA_DOCUMENT_EXPIRED`, `INVALID_DOCUMENT_TYPE`, `UNABLE_TO_VALIDATE_DOCUMENT_AGE`, plus `UNABLE_TO_EXTRACT_ISSUE_DATE` and `POA_NAME_NOT_DETECTED` (fixed to decline on this endpoint). Governed by request options: `NAME_MISMATCH_WITH_PROVIDED` / `ADDRESS_MISMATCH_WITH_PROVIDED` / `POA_COUNTRY_MISMATCH_WITH_PROVIDED` (`poa_address_mismatch_action`), `POOR_DOCUMENT_QUALITY` (never produced by this endpoint) / `DOCUMENT_METADATA_MISMATCH` (`poa_document_issues_action`), `SUSPECTED_DOCUMENT_MANIPULATION` (`poa_document_authenticity_action`), `UNSUPPORTED_DOCUMENT_LANGUAGE` (`poa_unsupported_language_action`), `ISSUER_NOT_IDENTIFIED` (`poa_issuer_not_identified_action`). Informational on this endpoint: `POA_DOCUMENT_NOT_SUPPORTED_FOR_APPLICATION`, `UNPARSABLE_OR_INVALID_ADDRESS`. */
|
|
17846
|
+
/** Machine-readable risk code. Always-decline: `MISSING_ADDRESS_INFORMATION`, `POA_DOCUMENT_EXPIRED`, `INVALID_DOCUMENT_TYPE`, `UNABLE_TO_VALIDATE_DOCUMENT_AGE`, plus `UNABLE_TO_EXTRACT_ISSUE_DATE` and `POA_NAME_NOT_DETECTED` (fixed to decline on this endpoint). Governed by request options: `NAME_MISMATCH_WITH_PROVIDED` / `ADDRESS_MISMATCH_WITH_PROVIDED` / `POA_COUNTRY_MISMATCH_WITH_PROVIDED` (`poa_address_mismatch_action`), `POOR_DOCUMENT_QUALITY` (never produced by this endpoint) / `DOCUMENT_METADATA_MISMATCH` (`poa_document_issues_action`), `SUSPECTED_DOCUMENT_MANIPULATION` and `POA_DOCUMENT_UNPROVEN_TEXT_REPLACEMENT` (`poa_document_authenticity_action`), `UNSUPPORTED_DOCUMENT_LANGUAGE` (`poa_unsupported_language_action`), `ISSUER_NOT_IDENTIFIED` (`poa_issuer_not_identified_action`). Informational on this endpoint: `POA_DOCUMENT_NOT_SUPPORTED_FOR_APPLICATION`, `UNPARSABLE_OR_INVALID_ADDRESS`. */
|
|
17845
17847
|
risk?: string;
|
|
17846
17848
|
/** Feature that raised the warning. Always `PROOF_OF_ADDRESS` on this endpoint. */
|
|
17847
17849
|
feature?: "PROOF_OF_ADDRESS" | (string & {});
|
|
17848
|
-
/** Extra context for some risks - e.g. `POA_DOCUMENT_EXPIRED` includes `expiration_reason` (`printed_expiration` or `age_window`), `document_type`, `document_subtype`, and `issue_date`, plus `expiration_date` on the `printed_expiration` path or `max_age_months` on the `age_window` path; `SUSPECTED_DOCUMENT_MANIPULATION` includes `reason` and `detection_method`. `null` for most risks. */
|
|
17850
|
+
/** Extra context for some risks - e.g. `POA_DOCUMENT_EXPIRED` includes `expiration_reason` (`printed_expiration` or `age_window`), `document_type`, `document_subtype`, and `issue_date`, plus `expiration_date` on the `printed_expiration` path or `max_age_months` on the `age_window` path; `SUSPECTED_DOCUMENT_MANIPULATION` includes `reason` and `detection_method`; `POA_DOCUMENT_UNPROVEN_TEXT_REPLACEMENT` includes `reason`, `detection_method` (`unproven_text_replacement`), `replaced_text`, `manipulated_regions` and `manipulated_blocks`. `null` for most risks. */
|
|
17849
17851
|
additional_data?: Record<string, unknown> | null;
|
|
17850
17852
|
/** Severity. `error` warnings drive `status` to `Declined`; `information` entries are advisory and never decline on their own. (`warning` is not produced by this endpoint - its options only accept `DECLINE` or `NO_ACTION`.) */
|
|
17851
17853
|
log_type?: "error" | "information" | (string & {});
|
|
@@ -17864,7 +17866,7 @@ declare class ProofOfAddress extends APIResource {
|
|
|
17864
17866
|
*
|
|
17865
17867
|
* **Latency.** Extraction is LLM-based: typical calls take **5–15 seconds**, multi-page PDFs up to **~30 seconds**. Configure a client timeout of **at least 45 seconds** and do not retry before the call completes.
|
|
17866
17868
|
*
|
|
17867
|
-
* **How it works.** The document (image or PDF, up to 15 MB; encrypted PDFs require `document_password`) is classified into a document type and subtype (e.g. `UTILITY_BILL` / `WATER_BILL`), and the issuer, dates, holder name, and address are extracted with LLM-based extraction. The address is parsed and geocoded into `poa_parsed_address`. PDF/EXIF forensics screen for tampering - modification after digital signing, known PDF editors, overlay-text manipulation, suspicious re-exports - surfacing `SUSPECTED_DOCUMENT_MANIPULATION` or `DOCUMENT_METADATA_MISMATCH`. Document age is validated against `poa_document_age_months`, and the language against `poa_languages_allowed`. If you pass `expected_address`, `expected_country`, or `expected_first_name`/`expected_last_name`, the extracted values are cross-checked and mismatches are flagged.
|
|
17869
|
+
* **How it works.** The document (image or PDF, up to 15 MB; encrypted PDFs require `document_password`) is classified into a document type and subtype (e.g. `UTILITY_BILL` / `WATER_BILL`), and the issuer, dates, holder name, and address are extracted with LLM-based extraction. The address is parsed and geocoded into `poa_parsed_address`. PDF/EXIF forensics screen for tampering - modification after digital signing, known PDF editors, overlay-text manipulation, suspicious re-exports - surfacing `SUSPECTED_DOCUMENT_MANIPULATION` or `DOCUMENT_METADATA_MISMATCH`. A text field that was blanked and re-typed in another font, where the file itself holds no proof of whether its content changed, surfaces `POA_DOCUMENT_UNPROVEN_TEXT_REPLACEMENT`. Document age is validated against `poa_document_age_months`, and the language against `poa_languages_allowed`. If you pass `expected_address`, `expected_country`, or `expected_first_name`/`expected_last_name`, the extracted values are cross-checked and mismatches are flagged.
|
|
17868
17870
|
*
|
|
17869
17871
|
* **Decision logic.** `status` is `Approved` unless at least one warning resolves to a decline. Hard failures always decline: `MISSING_ADDRESS_INFORMATION`, `POA_DOCUMENT_EXPIRED`, `INVALID_DOCUMENT_TYPE`, `UNABLE_TO_VALIDATE_DOCUMENT_AGE`, plus `UNABLE_TO_EXTRACT_ISSUE_DATE` and `POA_NAME_NOT_DETECTED` (not configurable on this endpoint). Five risk groups are configurable per request via the `poa_*_action` options (`DECLINE` or `NO_ACTION`, all defaulting to `DECLINE`). `POA_DOCUMENT_NOT_SUPPORTED_FOR_APPLICATION` and `UNPARSABLE_OR_INVALID_ADDRESS` are informational on this endpoint and never decline. A document that cannot be processed at all returns `400`; a readable but problematic document returns `200` with `status: "Declined"` - always inspect `poa.status` and `poa.warnings`, not just the HTTP code.
|
|
17870
17872
|
*
|
|
@@ -23279,7 +23281,7 @@ declare class TokenVerificationError extends DiditError {
|
|
|
23279
23281
|
constructor(reason: TokenVerificationReason, message: string);
|
|
23280
23282
|
}
|
|
23281
23283
|
|
|
23282
|
-
declare const VERSION = "2.
|
|
23284
|
+
declare const VERSION = "2.3.0";
|
|
23283
23285
|
|
|
23284
23286
|
/**
|
|
23285
23287
|
* The canonical JSON of a parsed webhook body: the text `X-Signature-V2` signs
|
package/dist/index.d.ts
CHANGED
|
@@ -5610,7 +5610,7 @@ interface SessionDecision {
|
|
|
5610
5610
|
document_ai_documents?: SessionDecisionDocumentAiDocuments[] | null;
|
|
5611
5611
|
/** **Array of questionnaire response reports** - always a JSON array, never a singular `questionnaire` object. `null` until at least one questionnaire step has produced data. Each item is the full report, including `node_id`, the questionnaire metadata, sections with form elements, and the user's answers. */
|
|
5612
5612
|
questionnaire_responses?: SessionDecisionQuestionnaireResponses[] | null;
|
|
5613
|
-
/** Bank Verification results, one item per Bank Verification step, for User and Business Verification. `null` until a step produces one. Each item's `method` says how the account was verified: `open_banking` (bank sign-in) or `account_lookup` (account check), or a `statement` or `microdeposits` fallback, and `none` when the person continued without a bank before any attempt was evaluated (`continued_without_bank`). See [Bank verification methods](/core-technology/bank-verification/verification-methods).
|
|
5613
|
+
/** Bank Verification results, one item per Bank Verification step, for User and Business Verification. `null` until a step produces one. Each item's `method` says how the account was verified: `open_banking` (bank sign-in) or `account_lookup` (account check), or a `statement` or `microdeposits` fallback, and `none` when the person continued without a bank before any attempt was evaluated (`continued_without_bank`). See [Bank verification methods](/core-technology/bank-verification/verification-methods). */
|
|
5614
5614
|
bank_verifications?: BankVerificationResult[] | null;
|
|
5615
5615
|
/** E-signature results, one item per signer and signature step, for User and Business Verification. Present only when the workflow has an E-signature step; an empty array until a signer reaches it. See the [E-signature report](/core-technology/electronic-signature/report-electronic-signature). */
|
|
5616
5616
|
signatures?: SignatureResult[];
|
|
@@ -6030,6 +6030,8 @@ interface SessionDecisionDocumentVerificationsItemsDocumentMetadataOverlayManipu
|
|
|
6030
6030
|
detected?: boolean;
|
|
6031
6031
|
/** Whether the PDF could be analyzed. */
|
|
6032
6032
|
analyzed?: boolean;
|
|
6033
|
+
/** Present and true only when the file could not be checked in full. What was checked keeps its findings where it can, and the document raises the unproven text replacement warning. */
|
|
6034
|
+
analysis_incomplete?: boolean;
|
|
6033
6035
|
/** Forensic signals that fired, such as duplicate_font_subset or glyph_fragmentation. */
|
|
6034
6036
|
signals?: string[];
|
|
6035
6037
|
/** Suspected manipulated areas in PDF page coordinates. */
|
|
@@ -7460,6 +7462,8 @@ interface SessionDecisionPoaVerificationsDocumentMetadataOverlayManipulation {
|
|
|
7460
7462
|
detected?: boolean;
|
|
7461
7463
|
/** Whether the PDF could be analyzed. */
|
|
7462
7464
|
analyzed?: boolean;
|
|
7465
|
+
/** Present and true only when the file could not be checked in full. What was checked keeps its findings where it can, and the document raises the unproven text replacement warning. */
|
|
7466
|
+
analysis_incomplete?: boolean;
|
|
7463
7467
|
/** Forensic signals that fired, such as duplicate_font_subset or glyph_fragmentation. */
|
|
7464
7468
|
signals?: string[];
|
|
7465
7469
|
/** Suspected manipulated areas in PDF page coordinates. */
|
|
@@ -11281,7 +11285,7 @@ declare class Analytics extends APIResource {
|
|
|
11281
11285
|
}
|
|
11282
11286
|
|
|
11283
11287
|
interface BankAccountCheckParams {
|
|
11284
|
-
/** The account's country, as an ISO 3166-1 alpha-3 code, for example `
|
|
11288
|
+
/** The account's country, as an ISO 3166-1 alpha-3 code, for example `NGA`. Lowercase is accepted. */
|
|
11285
11289
|
country: string;
|
|
11286
11290
|
/** 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. */
|
|
11287
11291
|
account: BankAccountCheckParamsAccount;
|
|
@@ -11326,8 +11330,6 @@ declare class Bank extends APIResource {
|
|
|
11326
11330
|
/**
|
|
11327
11331
|
* Check a bank account
|
|
11328
11332
|
*
|
|
11329
|
-
* **Not available in production yet.** Bank Verification is switched off in production, so until it is switched on this endpoint answers `404` with `bank_verification_not_available`. Do not build on it yet. The rest of this description is what the endpoint does once it is available.
|
|
11330
|
-
*
|
|
11331
11333
|
* 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.
|
|
11332
11334
|
*
|
|
11333
11335
|
* **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.
|
|
@@ -11338,7 +11340,7 @@ declare class Bank extends APIResource {
|
|
|
11338
11340
|
*
|
|
11339
11341
|
* **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.
|
|
11340
11342
|
*
|
|
11341
|
-
* **Sandbox.**
|
|
11343
|
+
* **Sandbox.** Use a sandbox API key with the sample account details. 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`.
|
|
11342
11344
|
*
|
|
11343
11345
|
* **API keys.** A scoped API key needs write access to sessions.
|
|
11344
11346
|
*
|
|
@@ -13745,7 +13747,7 @@ declare class Email extends APIResource {
|
|
|
13745
13747
|
*
|
|
13746
13748
|
* **How send and check pair up.** Verification state is keyed by your application plus the `email` address - the check call does not take `request_id`. Each new send creates a pending verification that lives for **5 minutes**: call the check with the same address and the code the user received before the window closes. Calling send again for the same address while a verification is pending generates a fresh code for that same verification (`status: "Retry"`, same `request_id`); the previous code stops working. At most one retry is attached this way (two sends total); a further send starts a fresh verification with a new `request_id`. The 5-minute window is measured from the first send and is not extended by retries.
|
|
13747
13749
|
*
|
|
13748
|
-
* **Deliverability pre-check.** Before anything is sent, the address goes through syntax and DNS/MX validation. Addresses that cannot receive mail return `200` with `status: "Undeliverable"` and `reason: "email_can_not_be_delivered"` - no email is sent, nothing is billed, and the verification is immediately finalized as `Declined` (a follow-up check returns `Expired or Not Found`). A
|
|
13750
|
+
* **Deliverability pre-check.** Before anything is sent, the address goes through syntax and DNS/MX validation. Addresses that cannot receive mail return `200` with `status: "Undeliverable"` and `reason: "email_can_not_be_delivered"` - no email is sent, nothing is billed, and the verification is immediately finalized as `Declined` (a follow-up check returns `Expired or Not Found`). A send that fails for a reason that is not the address (the email could not be handed over for delivery) returns `503` instead: no code is sent, nothing is billed, the verification stays open and the same request can be repeated.
|
|
13749
13751
|
*
|
|
13750
13752
|
* **Code format and branding.** Codes are 4–8 characters (`options.code_size`, default 6), numeric by default; set `options.alphanumeric_code: true` for uppercase letters and digits (the check comparison is case-insensitive). The email template is localized via `options.locale` (54 supported languages) and can use your application's white-label branding via `options.use_white_label_customization`.
|
|
13751
13753
|
*
|
|
@@ -17711,7 +17713,7 @@ declare class Pricing extends APIResource {
|
|
|
17711
17713
|
/**
|
|
17712
17714
|
* Get bank verification prices (public, unauthenticated)
|
|
17713
17715
|
*
|
|
17714
|
-
* Returns the list price of each Bank Verification method in every country: bank sign-in with its balance and transactions add-ons, and the account check.
|
|
17716
|
+
* Returns the list price of each Bank Verification method in every country: bank sign-in with its balance and transactions add-ons, and the account check. A method a country does not offer today shows as not available, with no price. Use it to quote a bank step before you build a workflow, or to show bank prices in your own product.
|
|
17715
17717
|
*
|
|
17716
17718
|
* Public: send no auth header. The response contains no organization data and is the same for every caller. It is cached publicly for one hour and carries an `ETag`, so send `If-None-Match` to get a `304 Not Modified` when nothing changed.
|
|
17717
17719
|
*
|
|
@@ -17745,7 +17747,7 @@ interface ProofOfAddressVerifyParams {
|
|
|
17745
17747
|
poa_name_mismatch_action?: "DECLINE" | "NO_ACTION" | (string & {});
|
|
17746
17748
|
/** What to do on file-integrity problems - in practice only `DOCUMENT_METADATA_MISMATCH` is produced by this endpoint. */
|
|
17747
17749
|
poa_document_issues_action?: "DECLINE" | "NO_ACTION" | (string & {});
|
|
17748
|
-
/** What to do when document manipulation is suspected (`SUSPECTED_DOCUMENT_MANIPULATION`) - e.g. the PDF was modified after digital signing, processed by a known PDF editor, shows overlay-text manipulation, or has inconsistent EXIF dates. */
|
|
17750
|
+
/** What to do when document manipulation is suspected (`SUSPECTED_DOCUMENT_MANIPULATION`) - e.g. the PDF was modified after digital signing, processed by a known PDF editor, shows overlay-text manipulation, or has inconsistent EXIF dates. Also governs `POA_DOCUMENT_UNPROVEN_TEXT_REPLACEMENT` (a re-typed text field the file cannot prove changed or unchanged): `DECLINE` declines it too, `NO_ACTION` keeps it as a warning. */
|
|
17749
17751
|
poa_document_authenticity_action?: "DECLINE" | "NO_ACTION" | (string & {});
|
|
17750
17752
|
/** What to do when the document language is outside `poa_languages_allowed` (`UNSUPPORTED_DOCUMENT_LANGUAGE`). */
|
|
17751
17753
|
poa_unsupported_language_action?: "DECLINE" | "NO_ACTION" | (string & {});
|
|
@@ -17841,11 +17843,11 @@ interface ProofOfAddressVerifyResponsePoaPoaParsedAddressDocumentLocation {
|
|
|
17841
17843
|
longitude?: number;
|
|
17842
17844
|
}
|
|
17843
17845
|
interface ProofOfAddressVerifyResponsePoaWarnings {
|
|
17844
|
-
/** Machine-readable risk code. Always-decline: `MISSING_ADDRESS_INFORMATION`, `POA_DOCUMENT_EXPIRED`, `INVALID_DOCUMENT_TYPE`, `UNABLE_TO_VALIDATE_DOCUMENT_AGE`, plus `UNABLE_TO_EXTRACT_ISSUE_DATE` and `POA_NAME_NOT_DETECTED` (fixed to decline on this endpoint). Governed by request options: `NAME_MISMATCH_WITH_PROVIDED` / `ADDRESS_MISMATCH_WITH_PROVIDED` / `POA_COUNTRY_MISMATCH_WITH_PROVIDED` (`poa_address_mismatch_action`), `POOR_DOCUMENT_QUALITY` (never produced by this endpoint) / `DOCUMENT_METADATA_MISMATCH` (`poa_document_issues_action`), `SUSPECTED_DOCUMENT_MANIPULATION` (`poa_document_authenticity_action`), `UNSUPPORTED_DOCUMENT_LANGUAGE` (`poa_unsupported_language_action`), `ISSUER_NOT_IDENTIFIED` (`poa_issuer_not_identified_action`). Informational on this endpoint: `POA_DOCUMENT_NOT_SUPPORTED_FOR_APPLICATION`, `UNPARSABLE_OR_INVALID_ADDRESS`. */
|
|
17846
|
+
/** Machine-readable risk code. Always-decline: `MISSING_ADDRESS_INFORMATION`, `POA_DOCUMENT_EXPIRED`, `INVALID_DOCUMENT_TYPE`, `UNABLE_TO_VALIDATE_DOCUMENT_AGE`, plus `UNABLE_TO_EXTRACT_ISSUE_DATE` and `POA_NAME_NOT_DETECTED` (fixed to decline on this endpoint). Governed by request options: `NAME_MISMATCH_WITH_PROVIDED` / `ADDRESS_MISMATCH_WITH_PROVIDED` / `POA_COUNTRY_MISMATCH_WITH_PROVIDED` (`poa_address_mismatch_action`), `POOR_DOCUMENT_QUALITY` (never produced by this endpoint) / `DOCUMENT_METADATA_MISMATCH` (`poa_document_issues_action`), `SUSPECTED_DOCUMENT_MANIPULATION` and `POA_DOCUMENT_UNPROVEN_TEXT_REPLACEMENT` (`poa_document_authenticity_action`), `UNSUPPORTED_DOCUMENT_LANGUAGE` (`poa_unsupported_language_action`), `ISSUER_NOT_IDENTIFIED` (`poa_issuer_not_identified_action`). Informational on this endpoint: `POA_DOCUMENT_NOT_SUPPORTED_FOR_APPLICATION`, `UNPARSABLE_OR_INVALID_ADDRESS`. */
|
|
17845
17847
|
risk?: string;
|
|
17846
17848
|
/** Feature that raised the warning. Always `PROOF_OF_ADDRESS` on this endpoint. */
|
|
17847
17849
|
feature?: "PROOF_OF_ADDRESS" | (string & {});
|
|
17848
|
-
/** Extra context for some risks - e.g. `POA_DOCUMENT_EXPIRED` includes `expiration_reason` (`printed_expiration` or `age_window`), `document_type`, `document_subtype`, and `issue_date`, plus `expiration_date` on the `printed_expiration` path or `max_age_months` on the `age_window` path; `SUSPECTED_DOCUMENT_MANIPULATION` includes `reason` and `detection_method`. `null` for most risks. */
|
|
17850
|
+
/** Extra context for some risks - e.g. `POA_DOCUMENT_EXPIRED` includes `expiration_reason` (`printed_expiration` or `age_window`), `document_type`, `document_subtype`, and `issue_date`, plus `expiration_date` on the `printed_expiration` path or `max_age_months` on the `age_window` path; `SUSPECTED_DOCUMENT_MANIPULATION` includes `reason` and `detection_method`; `POA_DOCUMENT_UNPROVEN_TEXT_REPLACEMENT` includes `reason`, `detection_method` (`unproven_text_replacement`), `replaced_text`, `manipulated_regions` and `manipulated_blocks`. `null` for most risks. */
|
|
17849
17851
|
additional_data?: Record<string, unknown> | null;
|
|
17850
17852
|
/** Severity. `error` warnings drive `status` to `Declined`; `information` entries are advisory and never decline on their own. (`warning` is not produced by this endpoint - its options only accept `DECLINE` or `NO_ACTION`.) */
|
|
17851
17853
|
log_type?: "error" | "information" | (string & {});
|
|
@@ -17864,7 +17866,7 @@ declare class ProofOfAddress extends APIResource {
|
|
|
17864
17866
|
*
|
|
17865
17867
|
* **Latency.** Extraction is LLM-based: typical calls take **5–15 seconds**, multi-page PDFs up to **~30 seconds**. Configure a client timeout of **at least 45 seconds** and do not retry before the call completes.
|
|
17866
17868
|
*
|
|
17867
|
-
* **How it works.** The document (image or PDF, up to 15 MB; encrypted PDFs require `document_password`) is classified into a document type and subtype (e.g. `UTILITY_BILL` / `WATER_BILL`), and the issuer, dates, holder name, and address are extracted with LLM-based extraction. The address is parsed and geocoded into `poa_parsed_address`. PDF/EXIF forensics screen for tampering - modification after digital signing, known PDF editors, overlay-text manipulation, suspicious re-exports - surfacing `SUSPECTED_DOCUMENT_MANIPULATION` or `DOCUMENT_METADATA_MISMATCH`. Document age is validated against `poa_document_age_months`, and the language against `poa_languages_allowed`. If you pass `expected_address`, `expected_country`, or `expected_first_name`/`expected_last_name`, the extracted values are cross-checked and mismatches are flagged.
|
|
17869
|
+
* **How it works.** The document (image or PDF, up to 15 MB; encrypted PDFs require `document_password`) is classified into a document type and subtype (e.g. `UTILITY_BILL` / `WATER_BILL`), and the issuer, dates, holder name, and address are extracted with LLM-based extraction. The address is parsed and geocoded into `poa_parsed_address`. PDF/EXIF forensics screen for tampering - modification after digital signing, known PDF editors, overlay-text manipulation, suspicious re-exports - surfacing `SUSPECTED_DOCUMENT_MANIPULATION` or `DOCUMENT_METADATA_MISMATCH`. A text field that was blanked and re-typed in another font, where the file itself holds no proof of whether its content changed, surfaces `POA_DOCUMENT_UNPROVEN_TEXT_REPLACEMENT`. Document age is validated against `poa_document_age_months`, and the language against `poa_languages_allowed`. If you pass `expected_address`, `expected_country`, or `expected_first_name`/`expected_last_name`, the extracted values are cross-checked and mismatches are flagged.
|
|
17868
17870
|
*
|
|
17869
17871
|
* **Decision logic.** `status` is `Approved` unless at least one warning resolves to a decline. Hard failures always decline: `MISSING_ADDRESS_INFORMATION`, `POA_DOCUMENT_EXPIRED`, `INVALID_DOCUMENT_TYPE`, `UNABLE_TO_VALIDATE_DOCUMENT_AGE`, plus `UNABLE_TO_EXTRACT_ISSUE_DATE` and `POA_NAME_NOT_DETECTED` (not configurable on this endpoint). Five risk groups are configurable per request via the `poa_*_action` options (`DECLINE` or `NO_ACTION`, all defaulting to `DECLINE`). `POA_DOCUMENT_NOT_SUPPORTED_FOR_APPLICATION` and `UNPARSABLE_OR_INVALID_ADDRESS` are informational on this endpoint and never decline. A document that cannot be processed at all returns `400`; a readable but problematic document returns `200` with `status: "Declined"` - always inspect `poa.status` and `poa.warnings`, not just the HTTP code.
|
|
17870
17872
|
*
|
|
@@ -23279,7 +23281,7 @@ declare class TokenVerificationError extends DiditError {
|
|
|
23279
23281
|
constructor(reason: TokenVerificationReason, message: string);
|
|
23280
23282
|
}
|
|
23281
23283
|
|
|
23282
|
-
declare const VERSION = "2.
|
|
23284
|
+
declare const VERSION = "2.3.0";
|
|
23283
23285
|
|
|
23284
23286
|
/**
|
|
23285
23287
|
* The canonical JSON of a parsed webhook body: the text `X-Signature-V2` signs
|
package/dist/index.js
CHANGED
|
@@ -278,7 +278,7 @@ function decodeDates(value, plan, named, depth = 0) {
|
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
// src/core/version.ts
|
|
281
|
-
var VERSION = "2.
|
|
281
|
+
var VERSION = "2.3.0";
|
|
282
282
|
|
|
283
283
|
// src/core/runtime.ts
|
|
284
284
|
function processLike() {
|
|
@@ -2260,8 +2260,6 @@ var Bank = class extends APIResource {
|
|
|
2260
2260
|
/**
|
|
2261
2261
|
* Check a bank account
|
|
2262
2262
|
*
|
|
2263
|
-
* **Not available in production yet.** Bank Verification is switched off in production, so until it is switched on this endpoint answers `404` with `bank_verification_not_available`. Do not build on it yet. The rest of this description is what the endpoint does once it is available.
|
|
2264
|
-
*
|
|
2265
2263
|
* 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.
|
|
2266
2264
|
*
|
|
2267
2265
|
* **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.
|
|
@@ -2272,7 +2270,7 @@ var Bank = class extends APIResource {
|
|
|
2272
2270
|
*
|
|
2273
2271
|
* **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.
|
|
2274
2272
|
*
|
|
2275
|
-
* **Sandbox.**
|
|
2273
|
+
* **Sandbox.** Use a sandbox API key with the sample account details. 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`.
|
|
2276
2274
|
*
|
|
2277
2275
|
* **API keys.** A scoped API key needs write access to sessions.
|
|
2278
2276
|
*
|
|
@@ -4190,7 +4188,7 @@ var Email = class extends APIResource {
|
|
|
4190
4188
|
*
|
|
4191
4189
|
* **How send and check pair up.** Verification state is keyed by your application plus the `email` address - the check call does not take `request_id`. Each new send creates a pending verification that lives for **5 minutes**: call the check with the same address and the code the user received before the window closes. Calling send again for the same address while a verification is pending generates a fresh code for that same verification (`status: "Retry"`, same `request_id`); the previous code stops working. At most one retry is attached this way (two sends total); a further send starts a fresh verification with a new `request_id`. The 5-minute window is measured from the first send and is not extended by retries.
|
|
4192
4190
|
*
|
|
4193
|
-
* **Deliverability pre-check.** Before anything is sent, the address goes through syntax and DNS/MX validation. Addresses that cannot receive mail return `200` with `status: "Undeliverable"` and `reason: "email_can_not_be_delivered"` - no email is sent, nothing is billed, and the verification is immediately finalized as `Declined` (a follow-up check returns `Expired or Not Found`). A
|
|
4191
|
+
* **Deliverability pre-check.** Before anything is sent, the address goes through syntax and DNS/MX validation. Addresses that cannot receive mail return `200` with `status: "Undeliverable"` and `reason: "email_can_not_be_delivered"` - no email is sent, nothing is billed, and the verification is immediately finalized as `Declined` (a follow-up check returns `Expired or Not Found`). A send that fails for a reason that is not the address (the email could not be handed over for delivery) returns `503` instead: no code is sent, nothing is billed, the verification stays open and the same request can be repeated.
|
|
4194
4192
|
*
|
|
4195
4193
|
* **Code format and branding.** Codes are 4–8 characters (`options.code_size`, default 6), numeric by default; set `options.alphanumeric_code: true` for uppercase letters and digits (the check comparison is case-insensitive). The email template is localized via `options.locale` (54 supported languages) and can use your application's white-label branding via `options.use_white_label_customization`.
|
|
4196
4194
|
*
|
|
@@ -6111,7 +6109,7 @@ var Pricing = class extends APIResource {
|
|
|
6111
6109
|
/**
|
|
6112
6110
|
* Get bank verification prices (public, unauthenticated)
|
|
6113
6111
|
*
|
|
6114
|
-
* Returns the list price of each Bank Verification method in every country: bank sign-in with its balance and transactions add-ons, and the account check.
|
|
6112
|
+
* Returns the list price of each Bank Verification method in every country: bank sign-in with its balance and transactions add-ons, and the account check. A method a country does not offer today shows as not available, with no price. Use it to quote a bank step before you build a workflow, or to show bank prices in your own product.
|
|
6115
6113
|
*
|
|
6116
6114
|
* Public: send no auth header. The response contains no organization data and is the same for every caller. It is cached publicly for one hour and carries an `ETag`, so send `If-None-Match` to get a `304 Not Modified` when nothing changed.
|
|
6117
6115
|
*
|
|
@@ -6142,7 +6140,7 @@ var ProofOfAddress = class extends APIResource {
|
|
|
6142
6140
|
*
|
|
6143
6141
|
* **Latency.** Extraction is LLM-based: typical calls take **5–15 seconds**, multi-page PDFs up to **~30 seconds**. Configure a client timeout of **at least 45 seconds** and do not retry before the call completes.
|
|
6144
6142
|
*
|
|
6145
|
-
* **How it works.** The document (image or PDF, up to 15 MB; encrypted PDFs require `document_password`) is classified into a document type and subtype (e.g. `UTILITY_BILL` / `WATER_BILL`), and the issuer, dates, holder name, and address are extracted with LLM-based extraction. The address is parsed and geocoded into `poa_parsed_address`. PDF/EXIF forensics screen for tampering - modification after digital signing, known PDF editors, overlay-text manipulation, suspicious re-exports - surfacing `SUSPECTED_DOCUMENT_MANIPULATION` or `DOCUMENT_METADATA_MISMATCH`. Document age is validated against `poa_document_age_months`, and the language against `poa_languages_allowed`. If you pass `expected_address`, `expected_country`, or `expected_first_name`/`expected_last_name`, the extracted values are cross-checked and mismatches are flagged.
|
|
6143
|
+
* **How it works.** The document (image or PDF, up to 15 MB; encrypted PDFs require `document_password`) is classified into a document type and subtype (e.g. `UTILITY_BILL` / `WATER_BILL`), and the issuer, dates, holder name, and address are extracted with LLM-based extraction. The address is parsed and geocoded into `poa_parsed_address`. PDF/EXIF forensics screen for tampering - modification after digital signing, known PDF editors, overlay-text manipulation, suspicious re-exports - surfacing `SUSPECTED_DOCUMENT_MANIPULATION` or `DOCUMENT_METADATA_MISMATCH`. A text field that was blanked and re-typed in another font, where the file itself holds no proof of whether its content changed, surfaces `POA_DOCUMENT_UNPROVEN_TEXT_REPLACEMENT`. Document age is validated against `poa_document_age_months`, and the language against `poa_languages_allowed`. If you pass `expected_address`, `expected_country`, or `expected_first_name`/`expected_last_name`, the extracted values are cross-checked and mismatches are flagged.
|
|
6146
6144
|
*
|
|
6147
6145
|
* **Decision logic.** `status` is `Approved` unless at least one warning resolves to a decline. Hard failures always decline: `MISSING_ADDRESS_INFORMATION`, `POA_DOCUMENT_EXPIRED`, `INVALID_DOCUMENT_TYPE`, `UNABLE_TO_VALIDATE_DOCUMENT_AGE`, plus `UNABLE_TO_EXTRACT_ISSUE_DATE` and `POA_NAME_NOT_DETECTED` (not configurable on this endpoint). Five risk groups are configurable per request via the `poa_*_action` options (`DECLINE` or `NO_ACTION`, all defaulting to `DECLINE`). `POA_DOCUMENT_NOT_SUPPORTED_FOR_APPLICATION` and `UNPARSABLE_OR_INVALID_ADDRESS` are informational on this endpoint and never decline. A document that cannot be processed at all returns `400`; a readable but problematic document returns `200` with `status: "Declined"` - always inspect `poa.status` and `poa.warnings`, not just the HTTP code.
|
|
6148
6146
|
*
|