Skip to content

Commit 0a5a2ba

Browse files
feat(api): adds support for delegated KYB onboarding and more device details in 3DS Authentications
- adds support for KYB Delegated when creating an AccountHolder - adds support for IS_EQUAL_TO, IS_NOT_EQUAL_TO, IS_GREATER_THAN_OR_EQUAL_TO and IS_LESS_THAN_OR_EQUAL_TO to Conditional Block Parameters - moves wire details into debtor and creditor specific properties - adds additional device related data fields to 3DS Authentications: https://docs.lithic.com/changelog/new-mobile-device-info-for-3ds-authentications
1 parent fa51159 commit 0a5a2ba

22 files changed

+744
-98
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 168
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-e16df7d65a6ababc8e0ca1f2a65070893d82d3b2b046394ab708d56fe717b3ad.yml
3-
openapi_spec_hash: ee82cf8fd5bb6b86abbae304f6c43934
4-
config_hash: c6d56596249e319c59d49d8e49a190b1
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-117e0ee9b030a2efc3b09e189e445fb1a26fd32f1c563f385b9d7071a959c550.yml
3+
openapi_spec_hash: e529a3fa8c3a79d3664db391683334c3
4+
config_hash: 22e4b128e110e2767daa9d95428ebf9d

api.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,11 @@ Methods:
772772
Types:
773773

774774
```python
775-
from lithic.types import AccountActivityListResponse, AccountActivityRetrieveTransactionResponse
775+
from lithic.types import (
776+
WirePartyDetails,
777+
AccountActivityListResponse,
778+
AccountActivityRetrieveTransactionResponse,
779+
)
776780
```
777781

778782
Methods:

src/lithic/resources/account_holders.py

Lines changed: 158 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,79 @@ def create(
140140
"""
141141
...
142142

143+
@overload
144+
def create(
145+
self,
146+
*,
147+
business_entity: account_holder_create_params.KYBDelegatedBusinessEntity,
148+
beneficial_owner_individuals: Iterable[account_holder_create_params.KYBDelegatedBeneficialOwnerIndividual]
149+
| NotGiven = NOT_GIVEN,
150+
control_person: account_holder_create_params.KYBDelegatedControlPerson | NotGiven = NOT_GIVEN,
151+
external_id: str | NotGiven = NOT_GIVEN,
152+
nature_of_business: str | NotGiven = NOT_GIVEN,
153+
tos_timestamp: str | NotGiven = NOT_GIVEN,
154+
website_url: str | NotGiven = NOT_GIVEN,
155+
workflow: Literal["KYB_DELEGATED"] | NotGiven = NOT_GIVEN,
156+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
157+
# The extra values given here take precedence over values defined on the client or passed to this method.
158+
extra_headers: Headers | None = None,
159+
extra_query: Query | None = None,
160+
extra_body: Body | None = None,
161+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
162+
) -> AccountHolderCreateResponse:
163+
"""
164+
Create an account holder and initiate the appropriate onboarding workflow.
165+
Account holders and accounts have a 1:1 relationship. When an account holder is
166+
successfully created an associated account is also created. All calls to this
167+
endpoint will return a synchronous response. The response time will depend on
168+
the workflow. In some cases, the response may indicate the workflow is under
169+
review or further action will be needed to complete the account creation
170+
process. This endpoint can only be used on accounts that are part of the program
171+
that the calling API key manages.
172+
173+
Args:
174+
business_entity: Information for business for which the account is being opened.
175+
176+
beneficial_owner_individuals: You can submit a list of all direct and indirect individuals with 25% or more
177+
ownership in the company. A maximum of 4 beneficial owners can be submitted. If
178+
no individual owns 25% of the company you do not need to send beneficial owner
179+
information. See
180+
[FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)
181+
(Section I) for more background on individuals that should be included.
182+
183+
control_person: An individual with significant responsibility for managing the legal entity
184+
(e.g., a Chief Executive Officer, Chief Financial Officer, Chief Operating
185+
Officer, Managing Member, General Partner, President, Vice President, or
186+
Treasurer). This can be an executive, or someone who will have program-wide
187+
access to the cards that Lithic will provide. In some cases, this individual
188+
could also be a beneficial owner listed above. See
189+
[FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)
190+
(Section II) for more background.
191+
192+
external_id: A user provided id that can be used to link an account holder with an external
193+
system
194+
195+
nature_of_business: Short description of the company's line of business (i.e., what does the company
196+
do?).
197+
198+
tos_timestamp: An RFC 3339 timestamp indicating when the account holder accepted the applicable
199+
legal agreements (e.g., cardholder terms) as agreed upon during API customer's
200+
implementation with Lithic.
201+
202+
website_url: Company website URL.
203+
204+
workflow: Specifies the type of KYB workflow to run.
205+
206+
extra_headers: Send extra headers
207+
208+
extra_query: Add additional query parameters to the request
209+
210+
extra_body: Add additional JSON properties to the request
211+
212+
timeout: Override the client-level default timeout for this request, in seconds
213+
"""
214+
...
215+
143216
@overload
144217
def create(
145218
self,
@@ -266,6 +339,7 @@ def create(
266339
"tos_timestamp",
267340
"workflow",
268341
],
342+
["business_entity"],
269343
["individual", "tos_timestamp", "workflow"],
270344
["address", "email", "first_name", "kyc_exemption_type", "last_name", "phone_number", "workflow"],
271345
)
@@ -278,7 +352,11 @@ def create(
278352
control_person: account_holder_create_params.KYBControlPerson | NotGiven = NOT_GIVEN,
279353
nature_of_business: str | NotGiven = NOT_GIVEN,
280354
tos_timestamp: str | NotGiven = NOT_GIVEN,
281-
workflow: Literal["KYB_BASIC", "KYB_BYO"] | Literal["KYC_BASIC", "KYC_BYO"] | Literal["KYC_EXEMPT"],
355+
workflow: Literal["KYB_BASIC", "KYB_BYO"]
356+
| Literal["KYB_DELEGATED"]
357+
| Literal["KYC_BASIC", "KYC_BYO"]
358+
| Literal["KYC_EXEMPT"]
359+
| NotGiven = NOT_GIVEN,
282360
beneficial_owner_entities: Iterable[account_holder_create_params.KYBBeneficialOwnerEntity]
283361
| NotGiven = NOT_GIVEN,
284362
external_id: str | NotGiven = NOT_GIVEN,
@@ -1129,6 +1207,79 @@ async def create(
11291207
"""
11301208
...
11311209

1210+
@overload
1211+
async def create(
1212+
self,
1213+
*,
1214+
business_entity: account_holder_create_params.KYBDelegatedBusinessEntity,
1215+
beneficial_owner_individuals: Iterable[account_holder_create_params.KYBDelegatedBeneficialOwnerIndividual]
1216+
| NotGiven = NOT_GIVEN,
1217+
control_person: account_holder_create_params.KYBDelegatedControlPerson | NotGiven = NOT_GIVEN,
1218+
external_id: str | NotGiven = NOT_GIVEN,
1219+
nature_of_business: str | NotGiven = NOT_GIVEN,
1220+
tos_timestamp: str | NotGiven = NOT_GIVEN,
1221+
website_url: str | NotGiven = NOT_GIVEN,
1222+
workflow: Literal["KYB_DELEGATED"] | NotGiven = NOT_GIVEN,
1223+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1224+
# The extra values given here take precedence over values defined on the client or passed to this method.
1225+
extra_headers: Headers | None = None,
1226+
extra_query: Query | None = None,
1227+
extra_body: Body | None = None,
1228+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1229+
) -> AccountHolderCreateResponse:
1230+
"""
1231+
Create an account holder and initiate the appropriate onboarding workflow.
1232+
Account holders and accounts have a 1:1 relationship. When an account holder is
1233+
successfully created an associated account is also created. All calls to this
1234+
endpoint will return a synchronous response. The response time will depend on
1235+
the workflow. In some cases, the response may indicate the workflow is under
1236+
review or further action will be needed to complete the account creation
1237+
process. This endpoint can only be used on accounts that are part of the program
1238+
that the calling API key manages.
1239+
1240+
Args:
1241+
business_entity: Information for business for which the account is being opened.
1242+
1243+
beneficial_owner_individuals: You can submit a list of all direct and indirect individuals with 25% or more
1244+
ownership in the company. A maximum of 4 beneficial owners can be submitted. If
1245+
no individual owns 25% of the company you do not need to send beneficial owner
1246+
information. See
1247+
[FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)
1248+
(Section I) for more background on individuals that should be included.
1249+
1250+
control_person: An individual with significant responsibility for managing the legal entity
1251+
(e.g., a Chief Executive Officer, Chief Financial Officer, Chief Operating
1252+
Officer, Managing Member, General Partner, President, Vice President, or
1253+
Treasurer). This can be an executive, or someone who will have program-wide
1254+
access to the cards that Lithic will provide. In some cases, this individual
1255+
could also be a beneficial owner listed above. See
1256+
[FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)
1257+
(Section II) for more background.
1258+
1259+
external_id: A user provided id that can be used to link an account holder with an external
1260+
system
1261+
1262+
nature_of_business: Short description of the company's line of business (i.e., what does the company
1263+
do?).
1264+
1265+
tos_timestamp: An RFC 3339 timestamp indicating when the account holder accepted the applicable
1266+
legal agreements (e.g., cardholder terms) as agreed upon during API customer's
1267+
implementation with Lithic.
1268+
1269+
website_url: Company website URL.
1270+
1271+
workflow: Specifies the type of KYB workflow to run.
1272+
1273+
extra_headers: Send extra headers
1274+
1275+
extra_query: Add additional query parameters to the request
1276+
1277+
extra_body: Add additional JSON properties to the request
1278+
1279+
timeout: Override the client-level default timeout for this request, in seconds
1280+
"""
1281+
...
1282+
11321283
@overload
11331284
async def create(
11341285
self,
@@ -1255,6 +1406,7 @@ async def create(
12551406
"tos_timestamp",
12561407
"workflow",
12571408
],
1409+
["business_entity"],
12581410
["individual", "tos_timestamp", "workflow"],
12591411
["address", "email", "first_name", "kyc_exemption_type", "last_name", "phone_number", "workflow"],
12601412
)
@@ -1267,7 +1419,11 @@ async def create(
12671419
control_person: account_holder_create_params.KYBControlPerson | NotGiven = NOT_GIVEN,
12681420
nature_of_business: str | NotGiven = NOT_GIVEN,
12691421
tos_timestamp: str | NotGiven = NOT_GIVEN,
1270-
workflow: Literal["KYB_BASIC", "KYB_BYO"] | Literal["KYC_BASIC", "KYC_BYO"] | Literal["KYC_EXEMPT"],
1422+
workflow: Literal["KYB_BASIC", "KYB_BYO"]
1423+
| Literal["KYB_DELEGATED"]
1424+
| Literal["KYC_BASIC", "KYC_BYO"]
1425+
| Literal["KYC_EXEMPT"]
1426+
| NotGiven = NOT_GIVEN,
12711427
beneficial_owner_entities: Iterable[account_holder_create_params.KYBBeneficialOwnerEntity]
12721428
| NotGiven = NOT_GIVEN,
12731429
external_id: str | NotGiven = NOT_GIVEN,

src/lithic/resources/book_transfers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ def create(
8484
"DISPUTE_WON",
8585
"SERVICE",
8686
"TRANSFER",
87+
"COLLECTION",
8788
],
8889
token: str | NotGiven = NOT_GIVEN,
8990
external_id: str | NotGiven = NOT_GIVEN,
@@ -379,6 +380,7 @@ async def create(
379380
"DISPUTE_WON",
380381
"SERVICE",
381382
"TRANSFER",
383+
"COLLECTION",
382384
],
383385
token: str | NotGiven = NOT_GIVEN,
384386
external_id: str | NotGiven = NOT_GIVEN,

src/lithic/resources/reports/settlement/settlement.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def list_details(
7575
ending_before: A cursor representing an item's token before which a page of results should end.
7676
Used to retrieve the previous page of results before this item.
7777
78-
page_size: Page size (for pagination).
78+
page_size: Number of records per page.
7979
8080
starting_after: A cursor representing an item's token after which a page of results should
8181
begin. Used to retrieve the next page of results after this item.
@@ -190,7 +190,7 @@ def list_details(
190190
ending_before: A cursor representing an item's token before which a page of results should end.
191191
Used to retrieve the previous page of results before this item.
192192
193-
page_size: Page size (for pagination).
193+
page_size: Number of records per page.
194194
195195
starting_after: A cursor representing an item's token after which a page of results should
196196
begin. Used to retrieve the next page of results after this item.

src/lithic/types/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
from .card_create_params import CardCreateParams as CardCreateParams
4848
from .card_update_params import CardUpdateParams as CardUpdateParams
4949
from .event_subscription import EventSubscription as EventSubscription
50+
from .wire_party_details import WirePartyDetails as WirePartyDetails
5051
from .account_list_params import AccountListParams as AccountListParams
5152
from .balance_list_params import BalanceListParams as BalanceListParams
5253
from .card_embed_response import CardEmbedResponse as CardEmbedResponse

src/lithic/types/account_activity_list_response.py

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from .transaction import Transaction
99
from .external_payment import ExternalPayment
1010
from .external_resource import ExternalResource
11+
from .wire_party_details import WirePartyDetails
1112
from .management_operation_transaction import ManagementOperationTransaction
1213

1314
__all__ = [
@@ -235,6 +236,7 @@ class BookTransferTransactionEvent(BaseModel):
235236
"DISPUTE_WON",
236237
"SERVICE",
237238
"TRANSFER",
239+
"COLLECTION",
238240
]
239241
"""Type of the book transfer"""
240242

@@ -416,38 +418,24 @@ class PaymentTransactionMethodAttributesACHMethodAttributes(BaseModel):
416418

417419

418420
class PaymentTransactionMethodAttributesWireMethodAttributes(BaseModel):
419-
wire_transfer_type: Literal["FEDWIRE", "SWIFT"]
421+
wire_network: Literal["FEDWIRE", "SWIFT"]
420422
"""Type of wire transfer"""
421423

422-
external_bank_name: Optional[str] = None
423-
"""External bank name"""
424+
creditor: Optional[WirePartyDetails] = None
424425

425-
external_bank_routing_number: Optional[str] = None
426-
"""External bank routing number"""
426+
debtor: Optional[WirePartyDetails] = None
427427

428-
external_individual_name: Optional[str] = None
429-
"""External individual name"""
430-
431-
imad: Optional[str] = None
432-
"""IMAD"""
433-
434-
lithic_bank_name: Optional[str] = None
435-
"""Lithic bank name"""
436-
437-
lithic_bank_routing_number: Optional[str] = None
438-
"""Lithic bank routing number"""
439-
440-
lithic_individual_name: Optional[str] = None
441-
"""Lithic individual name"""
442-
443-
omad: Optional[str] = None
444-
"""OMAD"""
428+
message_id: Optional[str] = None
429+
"""
430+
Point to point reference identifier, as assigned by the instructing party, used
431+
for tracking the message through the Fedwire system
432+
"""
445433

446-
previous_transfer: Optional[str] = None
447-
"""UUID of previous transfer if this is a retry"""
434+
remittance_information: Optional[str] = None
435+
"""Payment details or invoice reference"""
448436

449-
wire_token: Optional[str] = None
450-
"""Wire token"""
437+
wire_message_type: Optional[str] = None
438+
"""Type of wire message"""
451439

452440

453441
PaymentTransactionMethodAttributes: TypeAlias = Union[
@@ -537,6 +525,19 @@ class PaymentTransaction(BaseModel):
537525
external_bank_account_token: Optional[str] = None
538526
"""External bank account token"""
539527

528+
type: Optional[
529+
Literal[
530+
"ORIGINATION_CREDIT",
531+
"ORIGINATION_DEBIT",
532+
"RECEIPT_CREDIT",
533+
"RECEIPT_DEBIT",
534+
"WIRE_INBOUND_PAYMENT",
535+
"WIRE_INBOUND_ADMIN",
536+
"WIRE_OUTBOUND_PAYMENT",
537+
"WIRE_OUTBOUND_ADMIN",
538+
]
539+
] = None
540+
540541
user_defined_id: Optional[str] = None
541542
"""User-defined identifier"""
542543

0 commit comments

Comments
 (0)