Skip to content

Commit ab6b3e5

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore(api): new PaymentEventType for ACH Returns and small updates to 3DS AuthenticationResult (#690)
- adds `ACH_RETURN_SETTLED` to PaymentEventTypes: https://docs.lithic.com/changelog/january-22-2025 - adds `PENDING_CHALLENGE` and `PENDING_DECISION` to 3DS AuthenticationResult. Updates this field to be required and also adds `challenge_orchestrated_by` property
1 parent 2d0fc56 commit ab6b3e5

File tree

7 files changed

+31
-12
lines changed

7 files changed

+31
-12
lines changed

src/lithic/resources/payments.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ def simulate_action(
267267
"ACH_RECEIPT_SETTLED",
268268
"ACH_RETURN_INITIATED",
269269
"ACH_RETURN_PROCESSED",
270+
"ACH_RETURN_SETTLED",
270271
],
271272
decline_reason: Literal[
272273
"PROGRAM_TRANSACTION_LIMIT_EXCEEDED", "PROGRAM_DAILY_LIMIT_EXCEEDED", "PROGRAM_MONTHLY_LIMIT_EXCEEDED"
@@ -680,6 +681,7 @@ async def simulate_action(
680681
"ACH_RECEIPT_SETTLED",
681682
"ACH_RETURN_INITIATED",
682683
"ACH_RETURN_PROCESSED",
684+
"ACH_RETURN_SETTLED",
683685
],
684686
decline_reason: Literal[
685687
"PROGRAM_TRANSACTION_LIMIT_EXCEEDED", "PROGRAM_DAILY_LIMIT_EXCEEDED", "PROGRAM_MONTHLY_LIMIT_EXCEEDED"

src/lithic/types/financial_accounts/statements/statement_line_items.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class Data(BaseModel):
5050
"ACH_RECEIPT_SETTLED",
5151
"ACH_RETURN_INITIATED",
5252
"ACH_RETURN_PROCESSED",
53+
"ACH_RETURN_SETTLED",
5354
"AUTHORIZATION",
5455
"AUTHORIZATION_ADVICE",
5556
"AUTHORIZATION_EXPIRY",

src/lithic/types/financial_transaction.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class Event(BaseModel):
4040
"ACH_RECEIPT_SETTLED",
4141
"ACH_RETURN_INITIATED",
4242
"ACH_RETURN_PROCESSED",
43+
"ACH_RETURN_SETTLED",
4344
"AUTHORIZATION",
4445
"AUTHORIZATION_ADVICE",
4546
"AUTHORIZATION_EXPIRY",

src/lithic/types/payment.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class Event(BaseModel):
3939
"ACH_RECEIPT_SETTLED",
4040
"ACH_RETURN_INITIATED",
4141
"ACH_RETURN_PROCESSED",
42+
"ACH_RETURN_SETTLED",
4243
]
4344
"""Event types:
4445
@@ -58,6 +59,8 @@ class Event(BaseModel):
5859
- `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled.
5960
- `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available
6061
balance.
62+
- `ACH_RETURN_SETTLED` - ACH receipt return settled by the Receiving Depository
63+
Financial Institution.
6164
"""
6265

6366
detailed_results: Optional[

src/lithic/types/payment_simulate_action_params.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class PaymentSimulateActionParams(TypedDict, total=False):
1717
"ACH_RECEIPT_SETTLED",
1818
"ACH_RETURN_INITIATED",
1919
"ACH_RETURN_PROCESSED",
20+
"ACH_RETURN_SETTLED",
2021
]
2122
]
2223
"""Event Type"""

src/lithic/types/three_ds/authentication_retrieve_response.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ class AuthenticationRetrieveResponse(BaseModel):
323323
Maps to EMV 3DS field `acctType`.
324324
"""
325325

326-
authentication_result: Optional[Literal["DECLINE", "SUCCESS"]] = None
326+
authentication_result: Literal["DECLINE", "SUCCESS", "PENDING_CHALLENGE", "PENDING_DECISION"]
327327
"""Indicates the outcome of the 3DS authentication process."""
328328

329329
card_expiry_check: Literal["MATCH", "MISMATCH", "NOT_PRESENT"]
@@ -428,6 +428,9 @@ class AuthenticationRetrieveResponse(BaseModel):
428428
Present if the channel is 'BROWSER'.
429429
"""
430430

431+
challenge_orchestrated_by: Optional[Literal["LITHIC", "CUSTOMER", "NO_CHALLENGE"]] = None
432+
"""Entity that orchestrates the challenge."""
433+
431434
three_ri_request_type: Optional[
432435
Literal[
433436
"ACCOUNT_VERIFICATION",

src/lithic/types/transaction.py

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -389,16 +389,14 @@ class EventNetworkInfoAcquirer(BaseModel):
389389

390390
class EventNetworkInfoMastercard(BaseModel):
391391
banknet_reference_number: Optional[str] = None
392-
"""Identifier assigned by Mastercard."""
392+
"""Identifier assigned by Mastercard.
393393
394-
switch_serial_number: Optional[str] = None
395-
"""
396-
Identifier assigned by Mastercard, applicable to single-message transactions
397-
only.
394+
Guaranteed by Mastercard to be unique for any transaction within a specific
395+
financial network on any processing day.
398396
"""
399397

400398
original_banknet_reference_number: Optional[str] = None
401-
"""[Available on January 28th] Identifier assigned by Mastercard.
399+
"""Identifier assigned by Mastercard.
402400
403401
Matches the `banknet_reference_number` of a prior related event. May be
404402
populated in authorization reversals, incremental authorizations (authorization
@@ -413,26 +411,36 @@ class EventNetworkInfoMastercard(BaseModel):
413411
"""
414412

415413
original_switch_serial_number: Optional[str] = None
416-
"""[Available on January 28th] Identifier assigned by Mastercard.
414+
"""Identifier assigned by Mastercard.
417415
418416
Matches the `switch_serial_number` of a prior related event. May be populated in
419417
returns and return reversals. Applicable to single-message transactions only.
420418
"""
421419

420+
switch_serial_number: Optional[str] = None
421+
"""
422+
Identifier assigned by Mastercard, applicable to single-message transactions
423+
only.
424+
"""
425+
422426

423427
class EventNetworkInfoVisa(BaseModel):
424-
transaction_id: Optional[str] = None
425-
"""Identifier assigned by Visa."""
426-
427428
original_transaction_id: Optional[str] = None
428-
"""[Available on January 28th] Identifier assigned by Visa.
429+
"""Identifier assigned by Visa.
429430
430431
Matches the `transaction_id` of a prior related event. May be populated in
431432
incremental authorizations (authorization requests that augment a previously
432433
authorized amount), authorization advices, financial authorizations, and
433434
clearings.
434435
"""
435436

437+
transaction_id: Optional[str] = None
438+
"""Identifier assigned by Visa to link original messages to subsequent messages.
439+
440+
Guaranteed by Visa to be unique for each original authorization and financial
441+
authorization.
442+
"""
443+
436444

437445
class EventNetworkInfo(BaseModel):
438446
acquirer: Optional[EventNetworkInfoAcquirer] = None

0 commit comments

Comments
 (0)