Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): adds additional fields to TransactionEvents #684

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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