Skip to content

Commit

Permalink
feat(api): adds additional fields to TransactionEvents (#684)
Browse files Browse the repository at this point in the history
- adds `original_banknet_reference_number` and `original_switch_serial_number` to `network_info.mastercard`
- adds `original_transaction_id` to `network_info.visa`
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jan 24, 2025
1 parent 3fd3619 commit 90da354
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion src/lithic/types/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,42 @@ class EventNetworkInfoMastercard(BaseModel):
only.
"""

original_banknet_reference_number: Optional[str] = None
"""[Available on January 28th] Identifier assigned by Mastercard.
Matches the `banknet_reference_number` of a prior related event. May be
populated in authorization reversals, incremental authorizations (authorization
requests that augment a previously authorized amount), automated fuel dispenser
authorization advices and clearings, and financial authorizations. If the
original banknet reference number contains all zeroes, then no actual reference
number could be found by the network or acquirer. If Mastercard converts a
transaction from dual-message to single-message, such as for certain ATM
transactions, it will populate the original banknet reference number in the
resulting financial authorization with the banknet reference number of the
initial authorization, which Lithic does not receive.
"""

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


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

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


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

result: Literal[
Expand Down

0 comments on commit 90da354

Please sign in to comment.