Skip to content

Commit 5667961

Browse files
feat(api): adds additional fields to TransactionEvents (#684)
- adds `original_banknet_reference_number` and `original_switch_serial_number` to `network_info.mastercard` - adds `original_transaction_id` to `network_info.visa`
1 parent f29020a commit 5667961

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

src/lithic/types/transaction.py

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,11 +397,42 @@ class EventNetworkInfoMastercard(BaseModel):
397397
only.
398398
"""
399399

400+
original_banknet_reference_number: Optional[str] = None
401+
"""[Available on January 28th] Identifier assigned by Mastercard.
402+
403+
Matches the `banknet_reference_number` of a prior related event. May be
404+
populated in authorization reversals, incremental authorizations (authorization
405+
requests that augment a previously authorized amount), automated fuel dispenser
406+
authorization advices and clearings, and financial authorizations. If the
407+
original banknet reference number contains all zeroes, then no actual reference
408+
number could be found by the network or acquirer. If Mastercard converts a
409+
transaction from dual-message to single-message, such as for certain ATM
410+
transactions, it will populate the original banknet reference number in the
411+
resulting financial authorization with the banknet reference number of the
412+
initial authorization, which Lithic does not receive.
413+
"""
414+
415+
original_switch_serial_number: Optional[str] = None
416+
"""[Available on January 28th] Identifier assigned by Mastercard.
417+
418+
Matches the `switch_serial_number` of a prior related event. May be populated in
419+
returns and return reversals. Applicable to single-message transactions only.
420+
"""
421+
400422

401423
class EventNetworkInfoVisa(BaseModel):
402424
transaction_id: Optional[str] = None
403425
"""Identifier assigned by Visa."""
404426

427+
original_transaction_id: Optional[str] = None
428+
"""[Available on January 28th] Identifier assigned by Visa.
429+
430+
Matches the `transaction_id` of a prior related event. May be populated in
431+
incremental authorizations (authorization requests that augment a previously
432+
authorized amount), authorization advices, financial authorizations, and
433+
clearings.
434+
"""
435+
405436

406437
class EventNetworkInfo(BaseModel):
407438
acquirer: Optional[EventNetworkInfoAcquirer] = None
@@ -563,7 +594,9 @@ class Event(BaseModel):
563594
within the same transaction lifecycle and can be used to locate a particular
564595
transaction, such as during processing of disputes. Not all fields are available
565596
in all events, and the presence of these fields is dependent on the card network
566-
and the event type.
597+
and the event type. If the field is populated by the network, we will pass it
598+
through as is unless otherwise specified. Please consult the official network
599+
documentation for more details about these fields and how to use them.
567600
"""
568601

569602
result: Literal[

0 commit comments

Comments
 (0)