didit-sdk 1.0.1 → 2.1.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +33 -0
- data/lib/didit/resources/account.rb +20 -5
- data/lib/didit/resources/address_validation.rb +2 -2
- data/lib/didit/resources/analytics.rb +29 -0
- data/lib/didit/resources/bank.rb +15 -6
- data/lib/didit/resources/billing.rb +2 -2
- data/lib/didit/resources/database_validation.rb +65 -0
- data/lib/didit/resources/email.rb +22 -2
- data/lib/didit/resources/id_verification.rb +14 -13
- data/lib/didit/resources/id_wallets.rb +84 -0
- data/lib/didit/resources/ip.rb +2 -2
- data/lib/didit/resources/kyb.rb +14 -7
- data/lib/didit/resources/phone.rb +28 -2
- data/lib/didit/resources/pricing.rb +4 -2
- data/lib/didit/resources/sessions.rb +463 -33
- data/lib/didit/resources/transactions.rb +16 -6
- data/lib/didit/resources/travel_rule.rb +96 -0
- data/lib/didit/resources/users.rb +25 -6
- data/lib/didit/resources/wallet_screening.rb +5 -6
- data/lib/didit/resources/webhooks.rb +8 -1
- data/lib/didit/types/account_components.rb +17 -1
- data/lib/didit/types/aml.rb +19 -0
- data/lib/didit/types/components.rb +919 -30
- data/lib/didit/types/email.rb +28 -0
- data/lib/didit/types/kyb.rb +135 -5
- data/lib/didit/types/phone.rb +38 -0
- data/lib/didit/types/sessions.rb +476 -5
- data/lib/didit/types/travel_rule.rb +7 -0
- data/lib/didit/types/wallet_screening.rb +13 -6
- data/lib/didit/types.rb +128 -0
- data/lib/didit/version.rb +1 -1
- data/sig/didit/resources/account.rbs +2 -2
- data/sig/didit/resources/analytics.rbs +1 -0
- data/sig/didit/resources/bank.rbs +1 -1
- data/sig/didit/resources/database_validation.rbs +1 -1
- data/sig/didit/resources/email.rbs +1 -1
- data/sig/didit/resources/id_wallets.rbs +2 -0
- data/sig/didit/resources/phone.rbs +1 -1
- data/sig/didit/resources/sessions.rbs +14 -5
- data/sig/didit/resources/transactions.rbs +1 -1
- data/sig/didit/resources/travel_rule.rbs +5 -0
- data/sig/didit/resources/users.rbs +1 -1
- data/sig/didit/resources/wallet_screening.rbs +1 -1
- data/sig/didit/resources/webhooks.rbs +1 -1
- data/sig/didit/types/account.rbs +2 -2
- data/sig/didit/types/account_components.rbs +10 -0
- data/sig/didit/types/aml.rbs +18 -0
- data/sig/didit/types/bank.rbs +1 -1
- data/sig/didit/types/components.rbs +787 -4
- data/sig/didit/types/database_validation.rbs +1 -1
- data/sig/didit/types/email.rbs +22 -1
- data/sig/didit/types/id_wallets.rbs +4 -0
- data/sig/didit/types/kyb.rbs +115 -5
- data/sig/didit/types/phone.rbs +29 -1
- data/sig/didit/types/sessions.rbs +462 -2
- data/sig/didit/types/travel_rule.rbs +9 -0
- data/sig/didit/types/users.rbs +1 -1
- data/sig/didit/types/wallet_screening.rbs +5 -1
- data/sig/didit/types/webhooks.rbs +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1fa451d45da8ebb9f7175d6a30ab643f3fb301afc67b1c7dfb820ceff65e9ede
|
|
4
|
+
data.tar.gz: e5bb12c7c01fd0703e167b009ab48d77191f48f80ee1ab3f8138aa0a2ac97380
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 94e2d08d505c8d899af221bd6a57c73b17423037a2974d5d41d7cb8a9d8cc54301b25d9d98b3d90c24c8b2db37e43e49d0c2507febe3c788cc34982f884c9b09
|
|
7
|
+
data.tar.gz: 7ba084aacf9fa7180ac50d2e3b33c9013a37e6c097ba991b81709086c0e743cb46ffed007265c72b46853b9df2635b09f36b41495a678950d4f58014dfdba3f7
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.1.0](https://github.com/didit-protocol/sdk-ruby/compare/v2.0.0...v2.1.0) (2026-11-05)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **spec:** sync API spec 2026-11-05 (application data location) ([97b7d9c](https://github.com/didit-protocol/sdk-ruby/commit/97b7d9c8568a18f0712050e0f75d1353c78f9ce9))
|
|
9
|
+
|
|
10
|
+
## [2.0.0](https://github.com/didit-protocol/sdk-ruby/compare/v1.0.1...v2.0.0) (2026-11-05)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### ⚠ BREAKING CHANGES
|
|
14
|
+
|
|
15
|
+
* **spec:** the API spec sync changes the SDK surface.
|
|
16
|
+
- `sessions.retrieve_decision` (`GET /v3/session/{sessionId}/decision/`): response 200 `signatures[].confirmation.channel`: can now be null
|
|
17
|
+
- `sessions.retrieve_decision` (`GET /v3/session/{sessionId}/decision/`): response 200 `registry_checks[].company.registry_data`: can now be null
|
|
18
|
+
- `sessions.retrieve_decision` (`GET /v3/session/{sessionId}/decision/`): response 200 `registry_checks[].ownership_structure`: can now be null
|
|
19
|
+
- `email.assess_risk` (`POST /v3/email/risk/`): response 200 `email.email_intelligence.reason_codes[]`: type changed from string to object
|
|
20
|
+
- `kyb.select` (`POST /v3/kyb/select/`): response 200 `kyb_registry.registry_data`: can now be null
|
|
21
|
+
- `kyb.list_shareholders` (`POST /v3/kyb/shareholders/`): response 200 `kyb_registry.registry_data`: can now be null
|
|
22
|
+
- `kyb.list_ubos` (`POST /v3/kyb/ubo/`): response 200 `kyb_registry.registry_data`: can now be null
|
|
23
|
+
- `phone.assess_risk` (`POST /v3/phone/risk/`): response 200 `phone.phone_intelligence.reason_codes[]`: type changed from string to object
|
|
24
|
+
- `sessions.import_shared` (`POST /v3/session/import-shared/`): response 201 `signatures[].confirmation.channel`: can now be null
|
|
25
|
+
- `sessions.import_shared` (`POST /v3/session/import-shared/`): response 201 `registry_checks[].company.registry_data`: can now be null
|
|
26
|
+
- `sessions.import_shared` (`POST /v3/session/import-shared/`): response 201 `registry_checks[].ownership_structure`: can now be null
|
|
27
|
+
- `sessions.signatures.validate` (`POST /v3/session/{sessionId}/signatures/{nodeId}/validate/`): response 200 `signatures[].confirmation.channel`: can now be null
|
|
28
|
+
|
|
29
|
+
### API Spec Updates
|
|
30
|
+
|
|
31
|
+
* **spec:** sync API spec 2026-11-04 ([5299349](https://github.com/didit-protocol/sdk-ruby/commit/529934919db87731a0d4f4eec5d51e8fd627cac0))
|
|
32
|
+
* **spec:** sync API spec 2026-11-04 ([7282245](https://github.com/didit-protocol/sdk-ruby/commit/72822454ca1e4b130fe37d403ef6958ac4701433))
|
|
33
|
+
* **spec:** sync API spec 2026-11-05 ([ced5cdf](https://github.com/didit-protocol/sdk-ruby/commit/ced5cdf2388483c754c2d0ecc137be3fa4c15421))
|
|
34
|
+
* **spec:** sync API spec 2026-11-05 ([d0444ca](https://github.com/didit-protocol/sdk-ruby/commit/d0444caa414fe0cd5404e4241d9e57081adcb07e))
|
|
35
|
+
|
|
3
36
|
## [1.0.1](https://github.com/didit-protocol/sdk-ruby/compare/v1.0.0...v1.0.1) (2026-10-29)
|
|
4
37
|
|
|
5
38
|
|
|
@@ -133,8 +133,9 @@ module Didit
|
|
|
133
133
|
class Applications < Didit::Resource
|
|
134
134
|
# Create Application
|
|
135
135
|
#
|
|
136
|
-
# Create an application inside an organization
|
|
137
|
-
#
|
|
136
|
+
# Create an application inside an organization, in the data location you choose (`data_location`, the European
|
|
137
|
+
# Union by default; it can't be changed afterwards). The response includes `api_key`; persist it now
|
|
138
|
+
# (recoverable via GET). Requires owner/admin JWT.
|
|
138
139
|
#
|
|
139
140
|
# +POST /organizations/me/{org_id}/applications/+
|
|
140
141
|
#
|
|
@@ -145,6 +146,10 @@ module Didit
|
|
|
145
146
|
# @param terms_url [String] Terms of service URL shown in the verification flow.
|
|
146
147
|
# @param privacy_url [String] Privacy policy URL shown in the verification flow.
|
|
147
148
|
# @param description [String] Internal description for the application (not shown to end users).
|
|
149
|
+
# @param data_location [String] Where the application's verification data is stored and processed, chosen when
|
|
150
|
+
# the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney) and
|
|
151
|
+
# `mx` (Mexico) are coming soon: a request that names them answers 400 `This data location is not available
|
|
152
|
+
# yet.` An organization's Sandbox application is always in the European Union.
|
|
148
153
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
149
154
|
# @return [Didit::Types::Application]
|
|
150
155
|
def create(
|
|
@@ -155,6 +160,7 @@ module Didit
|
|
|
155
160
|
terms_url: OMIT,
|
|
156
161
|
privacy_url: OMIT,
|
|
157
162
|
description: OMIT,
|
|
163
|
+
data_location: OMIT,
|
|
158
164
|
request_options: nil
|
|
159
165
|
)
|
|
160
166
|
@client.request(
|
|
@@ -167,7 +173,8 @@ module Didit
|
|
|
167
173
|
"redirect_uris" => redirect_uris,
|
|
168
174
|
"terms_url" => terms_url,
|
|
169
175
|
"privacy_url" => privacy_url,
|
|
170
|
-
"description" => description
|
|
176
|
+
"description" => description,
|
|
177
|
+
"data_location" => data_location
|
|
171
178
|
},
|
|
172
179
|
auth: :account_token,
|
|
173
180
|
api: :account,
|
|
@@ -231,7 +238,9 @@ module Didit
|
|
|
231
238
|
# Update Application
|
|
232
239
|
#
|
|
233
240
|
# Update application metadata (name, URLs, redirect URIs). `api_key` and `client_id` are never rotated.
|
|
234
|
-
# `products` is read-only: a `products` key in the body is ignored.
|
|
241
|
+
# `products` is read-only: a `products` key in the body is ignored. `data_location` can't be changed after the
|
|
242
|
+
# application is created, except once on the live application created with your organization, while it is
|
|
243
|
+
# unused (see the request body). Requires owner/admin JWT.
|
|
235
244
|
#
|
|
236
245
|
# +PATCH /organizations/me/{org_id}/applications/{app_id}/+
|
|
237
246
|
#
|
|
@@ -243,6 +252,10 @@ module Didit
|
|
|
243
252
|
# @param terms_url [String] Terms of service URL shown in the verification flow.
|
|
244
253
|
# @param privacy_url [String] Privacy policy URL shown in the verification flow.
|
|
245
254
|
# @param description [String] Internal description for the application.
|
|
255
|
+
# @param data_location [String] Where the application's verification data is stored and processed, chosen when
|
|
256
|
+
# the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney) and
|
|
257
|
+
# `mx` (Mexico) are coming soon: a request that names them answers 400 `This data location is not available
|
|
258
|
+
# yet.` An organization's Sandbox application is always in the European Union.
|
|
246
259
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
247
260
|
# @return [Didit::Types::Application]
|
|
248
261
|
def update(
|
|
@@ -254,6 +267,7 @@ module Didit
|
|
|
254
267
|
terms_url: OMIT,
|
|
255
268
|
privacy_url: OMIT,
|
|
256
269
|
description: OMIT,
|
|
270
|
+
data_location: OMIT,
|
|
257
271
|
request_options: nil
|
|
258
272
|
)
|
|
259
273
|
@client.request(
|
|
@@ -266,7 +280,8 @@ module Didit
|
|
|
266
280
|
"redirect_uris" => redirect_uris,
|
|
267
281
|
"terms_url" => terms_url,
|
|
268
282
|
"privacy_url" => privacy_url,
|
|
269
|
-
"description" => description
|
|
283
|
+
"description" => description,
|
|
284
|
+
"data_location" => data_location
|
|
270
285
|
},
|
|
271
286
|
auth: :account_token,
|
|
272
287
|
api: :account,
|
|
@@ -28,8 +28,8 @@ module Didit
|
|
|
28
28
|
# **Authentication.** Send your application's API key in `x-api-key`. Missing or invalid credentials return
|
|
29
29
|
# `403` - this API never returns `401`.
|
|
30
30
|
#
|
|
31
|
-
# **Rate limit.** Shared write budget of 300 requests per minute per API key across
|
|
32
|
-
#
|
|
31
|
+
# **Rate limit.** Shared write budget of 300 requests per minute per API key across POST/PATCH/DELETE endpoints
|
|
32
|
+
# (transaction creates and event ingestion have a separate budget of 600).
|
|
33
33
|
#
|
|
34
34
|
# +POST /v3/address-validation/+
|
|
35
35
|
#
|
|
@@ -82,6 +82,35 @@ module Didit
|
|
|
82
82
|
request_options: request_options
|
|
83
83
|
)
|
|
84
84
|
end
|
|
85
|
+
|
|
86
|
+
# Get today's verifications by hour
|
|
87
|
+
#
|
|
88
|
+
# Today's user verification (KYC) sessions, from local midnight in `tz`, counted per local hour they were
|
|
89
|
+
# created in, next to the same hours of the same weekday one week before, and split by the outcome each one
|
|
90
|
+
# holds now: approved, in review or declined. This is the volume card of the Business Console's Home.
|
|
91
|
+
#
|
|
92
|
+
# `total` is today so far. `previous_total_so_far` counts the comparison day only up to the same local time, so
|
|
93
|
+
# a change between them compares the same part of both days. The hours still to come today are `0`. A day on
|
|
94
|
+
# which the clocks change has 23 or 25 hours: the missing hour stays `0` and the repeated hour holds both.
|
|
95
|
+
#
|
|
96
|
+
# +GET /v3/organization/{organization_id}/application/{application_id}/analytics/today/+
|
|
97
|
+
#
|
|
98
|
+
# @param tz [String] IANA time zone whose midnight starts today, for example `Europe/Madrid` or
|
|
99
|
+
# `America/Mexico_City`. Omit it for UTC.
|
|
100
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
101
|
+
# @return [Didit::Types::ApplicationAnalyticsToday]
|
|
102
|
+
def retrieve_today(tz: OMIT, request_options: nil)
|
|
103
|
+
@client.request(
|
|
104
|
+
:get,
|
|
105
|
+
"/v3/organization/{organization_id}/application/{application_id}/analytics/today/",
|
|
106
|
+
query: {
|
|
107
|
+
"tz" => tz
|
|
108
|
+
},
|
|
109
|
+
scope: :application,
|
|
110
|
+
response: Types::ApplicationAnalyticsToday,
|
|
111
|
+
request_options: request_options
|
|
112
|
+
)
|
|
113
|
+
end
|
|
85
114
|
end
|
|
86
115
|
end
|
|
87
116
|
end
|
data/lib/didit/resources/bank.rb
CHANGED
|
@@ -7,6 +7,10 @@ module Didit
|
|
|
7
7
|
class Bank < Didit::Resource
|
|
8
8
|
# Check a bank account
|
|
9
9
|
#
|
|
10
|
+
# **Not available in production yet.** Bank Verification is switched off in production, so until it is switched
|
|
11
|
+
# on this endpoint answers `404` with `bank_verification_not_available`. Do not build on it yet. The rest of
|
|
12
|
+
# this description is what the endpoint does once it is available.
|
|
13
|
+
#
|
|
10
14
|
# Check that a bank account belongs to the person or company you name, before you send money to it. No session
|
|
11
15
|
# and no sign-in: send the name and the account, read the result. It is the [account
|
|
12
16
|
# check](/core-technology/bank-verification/account-check) of the Bank Verification step, run from your backend.
|
|
@@ -26,10 +30,10 @@ module Didit
|
|
|
26
30
|
# **Every request is a new check.** There is no idempotency key and no endpoint to read a check back, so a
|
|
27
31
|
# retried request runs, and is billed, again. Store the response.
|
|
28
32
|
#
|
|
29
|
-
# **Sandbox.**
|
|
30
|
-
# the account number, choose the answer: `0001` a `close_match` with a
|
|
31
|
-
# without one, `0003` and `0006` a `no_match`, `0004` `cannot_verify`,
|
|
32
|
-
# other ending is a `match`.
|
|
33
|
+
# **Sandbox.** Where Bank Verification is available, a sandbox key calls no bank and is charged nothing. The
|
|
34
|
+
# last 4 characters of the IBAN, else of the account number, choose the answer: `0001` a `close_match` with a
|
|
35
|
+
# `holder_name`, `0002` a `close_match` without one, `0003` and `0006` a `no_match`, `0004` `cannot_verify`,
|
|
36
|
+
# `0005` a `503` and `0009` a `400`. Any other ending is a `match`.
|
|
33
37
|
#
|
|
34
38
|
# **API keys.** A scoped API key needs write access to sessions.
|
|
35
39
|
#
|
|
@@ -44,9 +48,13 @@ module Didit
|
|
|
44
48
|
# @param holder [Hash] The name the account is checked against. Send exactly one of `full_name` and
|
|
45
49
|
# `business_name`.
|
|
46
50
|
# @param vendor_data [String, nil] Your own reference for this check, returned unchanged.
|
|
51
|
+
# @param consent [Boolean] Set to `true` when the account holder has explicitly consented to this check.
|
|
52
|
+
# Required in the countries whose account check needs that consent: without it the check is refused with a `400`
|
|
53
|
+
# whose `field` is `consent` and whose `reason` is `required`, and nothing is billed. Elsewhere it is optional,
|
|
54
|
+
# and Didit records it with the check's charge when you send it.
|
|
47
55
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
48
56
|
# @return [Didit::Types::BankAccountCheckResponse]
|
|
49
|
-
def account_check(country:, account:, holder:, vendor_data: OMIT, request_options: nil)
|
|
57
|
+
def account_check(country:, account:, holder:, vendor_data: OMIT, consent: OMIT, request_options: nil)
|
|
50
58
|
@client.request(
|
|
51
59
|
:post,
|
|
52
60
|
"/v3/bank/account-check/",
|
|
@@ -54,7 +62,8 @@ module Didit
|
|
|
54
62
|
"country" => country,
|
|
55
63
|
"account" => account,
|
|
56
64
|
"holder" => holder,
|
|
57
|
-
"vendor_data" => vendor_data
|
|
65
|
+
"vendor_data" => vendor_data,
|
|
66
|
+
"consent" => consent
|
|
58
67
|
},
|
|
59
68
|
response: Types::BankAccountCheckResponse,
|
|
60
69
|
request_options: request_options
|
|
@@ -25,13 +25,13 @@ module Didit
|
|
|
25
25
|
|
|
26
26
|
# Top up credits
|
|
27
27
|
#
|
|
28
|
-
# Add credits via a hosted Stripe Checkout session (**\$50 to \$
|
|
28
|
+
# Add credits via a hosted Stripe Checkout session (**\$50 to \$20,000** per top-up). Top-ups are available on
|
|
29
29
|
# the Free, Growth and Scale plans, added at face value with no discount or bonus, and last 12 months;
|
|
30
30
|
# Enterprise annual contracts cannot top up. Redirect the customer to the returned `checkout_session_url`.
|
|
31
31
|
#
|
|
32
32
|
# +POST /v3/billing/top-up/+
|
|
33
33
|
#
|
|
34
|
-
# @param amount_in_dollars [Numeric] Amount to charge, in USD. **Must be from 50 to
|
|
34
|
+
# @param amount_in_dollars [Numeric] Amount to charge, in USD. **Must be from 50 to 20,000.** The balance
|
|
35
35
|
# receives the same amount, with no discount or bonus. Tax is added automatically at checkout based on the
|
|
36
36
|
# customer's billing address.
|
|
37
37
|
# @param success_url [String] URL the hosted checkout redirects the customer to after a successful payment.
|
|
@@ -156,6 +156,39 @@ module Didit
|
|
|
156
156
|
# (A/B/C) in `mex_ine_vigencia`.
|
|
157
157
|
# @param bvn [String] Nigerian Bank Verification Number.
|
|
158
158
|
# @param bank_card_number [String] Bank card number (CHN bank-card verification).
|
|
159
|
+
# @param company_registration_number [String] Company registration number as issued by the companies register:
|
|
160
|
+
# the CNPJ in Brazil (e.g. `11222333000181`), the registration number in South Africa (e.g. `1936/007721/06`).
|
|
161
|
+
# Required by the company registry and company directors services (`bra_company_registry`,
|
|
162
|
+
# `bra_company_directors`, `zaf_company_registry`, `zaf_company_directors`).
|
|
163
|
+
# @param company_name [String] Registered company name, cross-checked against the register entry. Optional for
|
|
164
|
+
# `zaf_company_registry`.
|
|
165
|
+
# @param initials [String] The person's initials as printed on the document. Required by `zaf_drivers_license`;
|
|
166
|
+
# accepted by `zaf_bank_account_holder`.
|
|
167
|
+
# @param licence_number [String] Driving licence number as printed on the card, for `zaf_drivers_license`. When
|
|
168
|
+
# omitted, `document_number` is used.
|
|
169
|
+
# @param refugee_file_number [String] Refugee file number issued by South Africa's Department of Home Affairs.
|
|
170
|
+
# Required by `zaf_refugee`.
|
|
171
|
+
# @param bank_name [String] Name of the bank that holds the account. Required by `zaf_bank_account_holder`.
|
|
172
|
+
# @param bank_account_number [String] Bank account number. Required by `zaf_bank_account_holder`; accepted by
|
|
173
|
+
# `zaf_fraud_prevention`.
|
|
174
|
+
# @param account_type [String] Bank account type for `zaf_bank_account_holder`: `current`, `savings`,
|
|
175
|
+
# `transmission`, `subscriptionShare` or `notKnown`, case-insensitive. Any other value returns `400`. Omit it
|
|
176
|
+
# when you do not know the type: the account-type cross-check is then reported as not confirmed.
|
|
177
|
+
# @param phone_number [String] Contact mobile number, for the services that cross-check contactability
|
|
178
|
+
# (`zaf_bank_account_holder`, `zaf_fraud_prevention`, `zaf_refugee`).
|
|
179
|
+
# @param right_thumb [String] Base64-encoded right thumb fingerprint for `zaf_dha_fingerprint_match`, with
|
|
180
|
+
# `left_thumb` or on its own.
|
|
181
|
+
# @param left_thumb [String] Base64-encoded left thumb fingerprint for `zaf_dha_fingerprint_match`, with
|
|
182
|
+
# `right_thumb` or on its own.
|
|
183
|
+
# @param score_level [Integer] Minimum biometric score level for `zaf_criminal_face_screening`. Defaults to `3`.
|
|
184
|
+
# @param max_matches [Integer] Maximum number of candidate matches `zaf_criminal_face_screening` returns.
|
|
185
|
+
# Defaults to `1`.
|
|
186
|
+
# @param vehicle_register_number [String] Vehicle register number. Required, with `vehicle_licence_plate` and
|
|
187
|
+
# `vin`, by `zaf_vehicle_ownership`.
|
|
188
|
+
# @param vehicle_licence_plate [String] Vehicle licence plate number. Required, with `vehicle_register_number`
|
|
189
|
+
# and `vin`, by `zaf_vehicle_ownership`.
|
|
190
|
+
# @param vin [String] Vehicle Identification Number (VIN or chassis number). Required, with
|
|
191
|
+
# `vehicle_register_number` and `vehicle_licence_plate`, by `zaf_vehicle_ownership`.
|
|
159
192
|
# @param ssn [String] Social Security Number (USA).
|
|
160
193
|
# @param phone [String] Phone number for phone-verification services.
|
|
161
194
|
# @param landline [String] Landline number for phone-verification services.
|
|
@@ -232,6 +265,22 @@ module Didit
|
|
|
232
265
|
emission_number: OMIT,
|
|
233
266
|
bvn: OMIT,
|
|
234
267
|
bank_card_number: OMIT,
|
|
268
|
+
company_registration_number: OMIT,
|
|
269
|
+
company_name: OMIT,
|
|
270
|
+
initials: OMIT,
|
|
271
|
+
licence_number: OMIT,
|
|
272
|
+
refugee_file_number: OMIT,
|
|
273
|
+
bank_name: OMIT,
|
|
274
|
+
bank_account_number: OMIT,
|
|
275
|
+
account_type: OMIT,
|
|
276
|
+
phone_number: OMIT,
|
|
277
|
+
right_thumb: OMIT,
|
|
278
|
+
left_thumb: OMIT,
|
|
279
|
+
score_level: OMIT,
|
|
280
|
+
max_matches: OMIT,
|
|
281
|
+
vehicle_register_number: OMIT,
|
|
282
|
+
vehicle_licence_plate: OMIT,
|
|
283
|
+
vin: OMIT,
|
|
235
284
|
ssn: OMIT,
|
|
236
285
|
phone: OMIT,
|
|
237
286
|
landline: OMIT,
|
|
@@ -304,6 +353,22 @@ module Didit
|
|
|
304
353
|
"emission_number" => emission_number,
|
|
305
354
|
"bvn" => bvn,
|
|
306
355
|
"bank_card_number" => bank_card_number,
|
|
356
|
+
"company_registration_number" => company_registration_number,
|
|
357
|
+
"company_name" => company_name,
|
|
358
|
+
"initials" => initials,
|
|
359
|
+
"licence_number" => licence_number,
|
|
360
|
+
"refugee_file_number" => refugee_file_number,
|
|
361
|
+
"bank_name" => bank_name,
|
|
362
|
+
"bank_account_number" => bank_account_number,
|
|
363
|
+
"account_type" => account_type,
|
|
364
|
+
"phone_number" => phone_number,
|
|
365
|
+
"right_thumb" => right_thumb,
|
|
366
|
+
"left_thumb" => left_thumb,
|
|
367
|
+
"score_level" => score_level,
|
|
368
|
+
"max_matches" => max_matches,
|
|
369
|
+
"vehicle_register_number" => vehicle_register_number,
|
|
370
|
+
"vehicle_licence_plate" => vehicle_licence_plate,
|
|
371
|
+
"vin" => vin,
|
|
307
372
|
"ssn" => ssn,
|
|
308
373
|
"phone" => phone,
|
|
309
374
|
"landline" => landline,
|
|
@@ -26,8 +26,8 @@ module Didit
|
|
|
26
26
|
# **Authentication.** Send your application's API key in `x-api-key`. Missing or invalid credentials return
|
|
27
27
|
# `403` - this API never returns `401`.
|
|
28
28
|
#
|
|
29
|
-
# **Rate limit.** Shared write budget of 300 requests per minute per API key across
|
|
30
|
-
#
|
|
29
|
+
# **Rate limit.** Shared write budget of 300 requests per minute per API key across POST/PATCH/DELETE endpoints
|
|
30
|
+
# (transaction creates and event ingestion have a separate budget of 600).
|
|
31
31
|
#
|
|
32
32
|
# **Social footprint.** Set `enable_social` to `true` to add a `email_social` block: the online platforms this
|
|
33
33
|
# address is registered on, with per-category counts and any profile details available. `profiles_registered: 0`
|
|
@@ -143,6 +143,18 @@ module Didit
|
|
|
143
143
|
# @param disposable_email_action [String] What to do when the domain belongs to a disposable/temporary-mail
|
|
144
144
|
# provider (`email.is_disposable`). `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the
|
|
145
145
|
# risk in `email.warnings`.
|
|
146
|
+
# @param enable_enrichment [Boolean] When `true`, also run email intelligence on the address: a risk score and
|
|
147
|
+
# its breach history. Billed as one `email_intelligence_api` unit per request ($0.05 at list price) in addition
|
|
148
|
+
# to this endpoint's own price. The request returns `403` when your balance cannot cover it.
|
|
149
|
+
# @param email_intelligence_score_action [String] Action when the email intelligence risk score is above the
|
|
150
|
+
# threshold. `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the signal without declining.
|
|
151
|
+
# Only takes effect when `enable_enrichment` is `true`.
|
|
152
|
+
# @param recent_email_breach_action [String] Action when the address appears in a recent known data breach.
|
|
153
|
+
# `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the signal without declining. Only takes
|
|
154
|
+
# effect when `enable_enrichment` is `true`.
|
|
155
|
+
# @param frequent_email_breach_action [String] Action when the address appears in many known data breaches.
|
|
156
|
+
# `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the signal without declining. Only takes
|
|
157
|
+
# effect when `enable_enrichment` is `true`.
|
|
146
158
|
# @param enable_social [Boolean] When true, also look up the social footprint of the address - the email,
|
|
147
159
|
# social, professional, e-commerce and entertainment platforms it is registered on. Billed as one `email_social`
|
|
148
160
|
# unit per request in addition to this endpoint's own price.
|
|
@@ -157,6 +169,10 @@ module Didit
|
|
|
157
169
|
duplicated_email_action: OMIT,
|
|
158
170
|
breached_email_action: OMIT,
|
|
159
171
|
disposable_email_action: OMIT,
|
|
172
|
+
enable_enrichment: OMIT,
|
|
173
|
+
email_intelligence_score_action: OMIT,
|
|
174
|
+
recent_email_breach_action: OMIT,
|
|
175
|
+
frequent_email_breach_action: OMIT,
|
|
160
176
|
enable_social: OMIT,
|
|
161
177
|
email_no_social_presence_action: OMIT,
|
|
162
178
|
request_options: nil
|
|
@@ -170,6 +186,10 @@ module Didit
|
|
|
170
186
|
"duplicated_email_action" => duplicated_email_action,
|
|
171
187
|
"breached_email_action" => breached_email_action,
|
|
172
188
|
"disposable_email_action" => disposable_email_action,
|
|
189
|
+
"enable_enrichment" => enable_enrichment,
|
|
190
|
+
"email_intelligence_score_action" => email_intelligence_score_action,
|
|
191
|
+
"recent_email_breach_action" => recent_email_breach_action,
|
|
192
|
+
"frequent_email_breach_action" => frequent_email_breach_action,
|
|
173
193
|
"enable_social" => enable_social,
|
|
174
194
|
"email_no_social_presence_action" => email_no_social_presence_action
|
|
175
195
|
},
|
|
@@ -23,19 +23,20 @@ module Didit
|
|
|
23
23
|
# hard-failure risks always decline: `DOCUMENT_EXPIRED`, `SCREEN_CAPTURE_DETECTED`, `PRINTED_COPY_DETECTED`,
|
|
24
24
|
# `PORTRAIT_MANIPULATION_DETECTED`, `PUBLIC_DOCUMENT_IMAGE_DETECTED`, plus extraction failures
|
|
25
25
|
# (`NAME_NOT_DETECTED`, `DATE_OF_BIRTH_NOT_DETECTED`, `DOCUMENT_NUMBER_NOT_DETECTED`).
|
|
26
|
-
# (`PORTRAIT_IMAGE_NOT_DETECTED`, `
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
#
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
#
|
|
38
|
-
#
|
|
26
|
+
# (`PORTRAIT_IMAGE_NOT_DETECTED`, `INVALID_DATE`, and `MRZ_NOT_DETECTED` exist in workflow sessions but are
|
|
27
|
+
# never produced by this standalone endpoint. `COULD_NOT_DETECT_DOCUMENT_TYPE` is returned here when the front
|
|
28
|
+
# image does not match a known official document design with high confidence, and declines the request.) Three
|
|
29
|
+
# risk groups are configurable per request via `invalid_mrz_action`, `inconsistent_data_action`, and
|
|
30
|
+
# `expiration_date_not_detected_action` (`DECLINE` or `NO_ACTION`). All other warnings (e.g.
|
|
31
|
+
# `POSSIBLE_DUPLICATED_USER`) are informational and never decline on their own. When
|
|
32
|
+
# `perform_document_liveness=true` (the default) and the forgery check returns no usable score - the provider
|
|
33
|
+
# failed, answered non-200, or answered HTTP 200 with `status="ERR"` - the call returns `200` with `status: "In
|
|
34
|
+
# Review"` and a `DOCUMENT_LIVENESS_NOT_COMPUTED` warning (`log_type: "warning"`) instead of `Approved`: a check
|
|
35
|
+
# that did not run is not evidence that the document is genuine. This escalation is not configurable and never
|
|
36
|
+
# overrides a `Declined`; with `perform_document_liveness=false` the check is skipped and the status follows the
|
|
37
|
+
# remaining warnings as before. A document that cannot be processed at all returns `400` with `{"error":
|
|
38
|
+
# "COULD_NOT_RECOGNIZE_DOCUMENT"}`; a readable but problematic document returns `200` with `status: "Declined"`
|
|
39
|
+
# - always inspect `id_verification.status` and `id_verification.warnings`, not just the HTTP code.
|
|
39
40
|
#
|
|
40
41
|
# **Billing.** Each `200` response consumes one ID Verification API credit (paid from your plan credit or top-up
|
|
41
42
|
# balance). When the organization's balance cannot cover the call, the endpoint returns `403` with the
|
|
@@ -757,6 +757,61 @@ module Didit
|
|
|
757
757
|
)
|
|
758
758
|
end
|
|
759
759
|
|
|
760
|
+
# Start Google Wallet verification
|
|
761
|
+
#
|
|
762
|
+
# Start a Google Wallet sign-in (Google Wallet (ID pass) and US state issuers (mobile driving licence); USA,
|
|
763
|
+
# GBR, BRA, SGP, TWN) without any workflow. Billed once, only when the identity is verified. The response
|
|
764
|
+
# carries next_action.type=request_digital_credential with a request Didit signed for your application, usable
|
|
765
|
+
# only from origin. In a user gesture there, pass next_action.digital_credentials.request to
|
|
766
|
+
# navigator.credentials.get({digital: ...}) (or to Android Credential Manager as GetDigitalCredentialOption
|
|
767
|
+
# requestJson), then POST what the wallet returns to
|
|
768
|
+
# /v3/id-verification/wallets/verifications/{request_id}/response/. The browser offers its own QR code when the
|
|
769
|
+
# wallet is on another device. Sandbox applications get a deterministic simulation (simulated: true) that never
|
|
770
|
+
# contacts the provider.
|
|
771
|
+
#
|
|
772
|
+
# +POST /v3/id-verification/wallets/google-wallet/+
|
|
773
|
+
#
|
|
774
|
+
# @param country [String] ISO 3166-1 alpha-3 country of the Google Wallet identity. * `USA` - USA * `GBR` - GBR
|
|
775
|
+
# * `BRA` - BRA * `SGP` - SGP * `TWN` - TWN
|
|
776
|
+
# @param origin [String] Where your page or app will ask the wallet: the https origin of your page (its host
|
|
777
|
+
# must be in the application's allowed_return_hosts, or be its white-label domain), e.g.
|
|
778
|
+
# https://app.example.com, or android:apk-key-hash:<base64 SHA-256 of your app's signing certificate, no
|
|
779
|
+
# padding>. The wallet refuses the request anywhere else.
|
|
780
|
+
# @param vendor_data [String, nil] Your own reference for this verification (e.g. your user id). Returned in
|
|
781
|
+
# results and webhooks.
|
|
782
|
+
# @param metadata [Hash, nil] Optional JSON object stored with the verification and returned in results and
|
|
783
|
+
# webhooks.
|
|
784
|
+
# @param sandbox_scenario [String] Sandbox applications only: the simulated outcome - 'wallet_cancelled',
|
|
785
|
+
# 'wallet_timeout' or 'wallet_provider_error'; any other scenario (or none) verifies. Rejected on live
|
|
786
|
+
# applications. The full catalog is available at GET /v1/sandbox/scenarios/.
|
|
787
|
+
# @param idempotency_key [String] sent as the Idempotency-Key header
|
|
788
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
789
|
+
# @return [Didit::Types::DigitalIdWalletApiWalletVerificationResponse]
|
|
790
|
+
def start_google_wallet(
|
|
791
|
+
country:,
|
|
792
|
+
origin:,
|
|
793
|
+
vendor_data: OMIT,
|
|
794
|
+
metadata: OMIT,
|
|
795
|
+
sandbox_scenario: OMIT,
|
|
796
|
+
idempotency_key: OMIT,
|
|
797
|
+
request_options: nil
|
|
798
|
+
)
|
|
799
|
+
@client.request(
|
|
800
|
+
:post,
|
|
801
|
+
"/v3/id-verification/wallets/google-wallet/",
|
|
802
|
+
body: {
|
|
803
|
+
"country" => country,
|
|
804
|
+
"origin" => origin,
|
|
805
|
+
"vendor_data" => vendor_data,
|
|
806
|
+
"metadata" => metadata,
|
|
807
|
+
"sandbox_scenario" => sandbox_scenario
|
|
808
|
+
},
|
|
809
|
+
headers: { "Idempotency-Key" => idempotency_key },
|
|
810
|
+
response: Types::DigitalIdWalletApiWalletVerificationResponse,
|
|
811
|
+
request_options: request_options
|
|
812
|
+
)
|
|
813
|
+
end
|
|
814
|
+
|
|
760
815
|
# Start gov.br verification
|
|
761
816
|
#
|
|
762
817
|
# Start a gov.br sign-in (Governo Federal do Brasil; BRA) without any workflow. Billed once, only when the
|
|
@@ -1463,6 +1518,35 @@ module Didit
|
|
|
1463
1518
|
request_options: request_options
|
|
1464
1519
|
)
|
|
1465
1520
|
end
|
|
1521
|
+
|
|
1522
|
+
# Submit a wallet response
|
|
1523
|
+
#
|
|
1524
|
+
# Digital Credentials API wallets (Google Wallet): send what the wallet returned to your page or app for a
|
|
1525
|
+
# verification whose next_action is request_digital_credential. Didit decrypts it, checks the issuer's signature
|
|
1526
|
+
# against the trusted issuer roots, every returned value against its signed digest, and the device signature
|
|
1527
|
+
# over your origin and this request, then decides the verification: verified (billed once) or declined with the
|
|
1528
|
+
# error code. Single use: a second submit returns the decided verification.
|
|
1529
|
+
#
|
|
1530
|
+
# +POST /v3/id-verification/wallets/verifications/{request_id}/response/+
|
|
1531
|
+
#
|
|
1532
|
+
# @param request_id [String] The request_id the start endpoint returned.
|
|
1533
|
+
# @param response [Hash] Exactly what the wallet returned: {protocol, data} of the DigitalCredential from
|
|
1534
|
+
# navigator.credentials.get, or the parsed credentialJson of Android's DigitalCredential. Encrypted to Didit; do
|
|
1535
|
+
# not alter it.
|
|
1536
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
1537
|
+
# @return [Didit::Types::DigitalIdWalletApiWalletVerificationResponse]
|
|
1538
|
+
def submit_verification_response(request_id, response:, request_options: nil)
|
|
1539
|
+
@client.request(
|
|
1540
|
+
:post,
|
|
1541
|
+
"/v3/id-verification/wallets/verifications/{request_id}/response/",
|
|
1542
|
+
path_params: { "request_id" => request_id },
|
|
1543
|
+
body: {
|
|
1544
|
+
"response" => response
|
|
1545
|
+
},
|
|
1546
|
+
response: Types::DigitalIdWalletApiWalletVerificationResponse,
|
|
1547
|
+
request_options: request_options
|
|
1548
|
+
)
|
|
1549
|
+
end
|
|
1466
1550
|
end
|
|
1467
1551
|
end
|
|
1468
1552
|
end
|
data/lib/didit/resources/ip.rb
CHANGED
|
@@ -25,8 +25,8 @@ module Didit
|
|
|
25
25
|
# **Authentication.** Send your application's API key in `x-api-key`. Missing or invalid credentials return
|
|
26
26
|
# `403` - this API never returns `401`.
|
|
27
27
|
#
|
|
28
|
-
# **Rate limit.** Shared write budget of 300 requests per minute per API key across
|
|
29
|
-
#
|
|
28
|
+
# **Rate limit.** Shared write budget of 300 requests per minute per API key across POST/PATCH/DELETE endpoints
|
|
29
|
+
# (transaction creates and event ingestion have a separate budget of 600).
|
|
30
30
|
#
|
|
31
31
|
# +POST /v3/ip/risk/+
|
|
32
32
|
#
|
data/lib/didit/resources/kyb.rb
CHANGED
|
@@ -11,8 +11,10 @@ module Didit
|
|
|
11
11
|
# ownership bands) of one candidate returned by `POST /v3/kyb/search/`.
|
|
12
12
|
#
|
|
13
13
|
# **Pairing with search.** Pass the candidate's `kyb_response_id` exactly as returned by a search of the same
|
|
14
|
-
# application.
|
|
15
|
-
# registry
|
|
14
|
+
# application. Search at the tier you intend to buy (`tier` on `POST /v3/kyb/search/`), because the search runs
|
|
15
|
+
# on the registry chain that serves that tier and an empty Lite search is not proof that the registry does not
|
|
16
|
+
# hold the company. When the country's ownership data lives at another registry, Didit re-finds the company
|
|
17
|
+
# there by registration number, at no extra cost.
|
|
16
18
|
#
|
|
17
19
|
# **Billing.** Billed at the country's Shareholders price - see [KYB registry
|
|
18
20
|
# pricing](/getting-started/kyb-registry-pricing). When the registry holds no shareholder record for the company
|
|
@@ -32,7 +34,8 @@ module Didit
|
|
|
32
34
|
# +POST /v3/kyb/shareholders/+
|
|
33
35
|
#
|
|
34
36
|
# @param kyb_response_id [String] Candidate handle from `POST /v3/kyb/search/`
|
|
35
|
-
# (`kyb_registry.companies[].kyb_response_id`). Ephemeral
|
|
37
|
+
# (`kyb_registry.companies[].kyb_response_id`). Ephemeral: use it shortly after the search that produced it.
|
|
38
|
+
# Handles can be long, so store and send the value exactly as returned, without trimming or assuming a length.
|
|
36
39
|
# @param vendor_data [String] Your identifier for this company; echoed back and stored with the business
|
|
37
40
|
# session.
|
|
38
41
|
# @param metadata [Hash, nil] Free-form JSON stored with the business session and echoed back.
|
|
@@ -68,8 +71,10 @@ module Didit
|
|
|
68
71
|
# by `POST /v3/kyb/search/`.
|
|
69
72
|
#
|
|
70
73
|
# **Pairing with search.** Pass the candidate's `kyb_response_id` exactly as returned by a search of the same
|
|
71
|
-
# application.
|
|
72
|
-
# registry
|
|
74
|
+
# application. Search at the tier you intend to buy (`tier` on `POST /v3/kyb/search/`), because the search runs
|
|
75
|
+
# on the registry chain that serves that tier and an empty Lite search is not proof that the registry does not
|
|
76
|
+
# hold the company. When the country's ownership data lives at another registry, Didit re-finds the company
|
|
77
|
+
# there by registration number, at no extra cost.
|
|
73
78
|
#
|
|
74
79
|
# **Billing.** Billed at the country's UBO price - see [KYB registry
|
|
75
80
|
# pricing](/getting-started/kyb-registry-pricing). The tier delivered is the highest the country and the
|
|
@@ -89,7 +94,8 @@ module Didit
|
|
|
89
94
|
# +POST /v3/kyb/ubo/+
|
|
90
95
|
#
|
|
91
96
|
# @param kyb_response_id [String] Candidate handle from `POST /v3/kyb/search/`
|
|
92
|
-
# (`kyb_registry.companies[].kyb_response_id`). Ephemeral
|
|
97
|
+
# (`kyb_registry.companies[].kyb_response_id`). Ephemeral: use it shortly after the search that produced it.
|
|
98
|
+
# Handles can be long, so store and send the value exactly as returned, without trimming or assuming a length.
|
|
93
99
|
# @param vendor_data [String] Your identifier for this company; echoed back and stored with the business
|
|
94
100
|
# session.
|
|
95
101
|
# @param metadata [Hash, nil] Free-form JSON stored with the business session and echoed back.
|
|
@@ -229,7 +235,8 @@ module Didit
|
|
|
229
235
|
# +POST /v3/kyb/select/+
|
|
230
236
|
#
|
|
231
237
|
# @param kyb_response_id [String] Candidate handle from `POST /v3/kyb/search/`
|
|
232
|
-
# (`kyb_registry.companies[].kyb_response_id`). Ephemeral
|
|
238
|
+
# (`kyb_registry.companies[].kyb_response_id`). Ephemeral: use it shortly after the search that produced it.
|
|
239
|
+
# Handles can be long, so store and send the value exactly as returned, without trimming or assuming a length.
|
|
233
240
|
# @param vendor_data [String] Your identifier for this company; echoed back and stored with the business
|
|
234
241
|
# session.
|
|
235
242
|
# @param metadata [Hash, nil] Free-form JSON stored with the business session and echoed back.
|