From 85d2d9657022d3e7848477b329ba7f347efa7007 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 9 Jul 2026 22:18:47 +0000 Subject: [PATCH 1/7] docs(api): clarify simulate_clearing behavior in transactions --- .stats.yml | 4 +-- .../resources/transactions/transactions.py | 28 +++++++++++-------- .../transaction_simulate_clearing_params.py | 7 +++-- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8f07c5db..212b17fe 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 213 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-9e397c65ffb81e2928b8ecf979769a79131ae6058b6fb373a5e930dc8a168732.yml -openapi_spec_hash: 93aea3855d2d1c390107d223762aa818 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-1514911f233cb8bf0d6752c45bfa53a61b8f9b8ff215a4ea94a95f9505911000.yml +openapi_spec_hash: 9820a9c9a4ff778c627041eb53fd4ee5 config_hash: 5bb913c05ebeb301ec925b16e75bb251 diff --git a/src/lithic/resources/transactions/transactions.py b/src/lithic/resources/transactions/transactions.py index 979da846..65f3daca 100644 --- a/src/lithic/resources/transactions/transactions.py +++ b/src/lithic/resources/transactions/transactions.py @@ -470,9 +470,10 @@ def simulate_clearing( After this event, the transaction transitions from `PENDING` to `SETTLED` status. - If `amount` is not set, the full amount of the transaction will be cleared. - Transactions that have already cleared, either partially or fully, cannot be - cleared again using this endpoint. + If `amount` is not set, the full amount of the transaction will be cleared. This + endpoint may be called multiple times against the same authorization to simulate + a multiple-completion scenario, with each call creating a separate clearing + event. Args: token: The transaction token returned from the /v1/simulate/authorize response. @@ -483,9 +484,10 @@ def simulate_clearing( example, entering 100 in this field will result in a -100 amount in the transaction, if the original authorization is a credit authorization. - If `amount` is not set, the full amount of the transaction will be cleared. - Transactions that have already cleared, either partially or fully, cannot be - cleared again using this endpoint. + If `amount` is not set, the full amount of the transaction will be cleared. This + endpoint may be called multiple times against the same authorization to simulate + a multiple-completion scenario, with each call creating a separate clearing + event. extra_headers: Send extra headers @@ -1214,9 +1216,10 @@ async def simulate_clearing( After this event, the transaction transitions from `PENDING` to `SETTLED` status. - If `amount` is not set, the full amount of the transaction will be cleared. - Transactions that have already cleared, either partially or fully, cannot be - cleared again using this endpoint. + If `amount` is not set, the full amount of the transaction will be cleared. This + endpoint may be called multiple times against the same authorization to simulate + a multiple-completion scenario, with each call creating a separate clearing + event. Args: token: The transaction token returned from the /v1/simulate/authorize response. @@ -1227,9 +1230,10 @@ async def simulate_clearing( example, entering 100 in this field will result in a -100 amount in the transaction, if the original authorization is a credit authorization. - If `amount` is not set, the full amount of the transaction will be cleared. - Transactions that have already cleared, either partially or fully, cannot be - cleared again using this endpoint. + If `amount` is not set, the full amount of the transaction will be cleared. This + endpoint may be called multiple times against the same authorization to simulate + a multiple-completion scenario, with each call creating a separate clearing + event. extra_headers: Send extra headers diff --git a/src/lithic/types/transaction_simulate_clearing_params.py b/src/lithic/types/transaction_simulate_clearing_params.py index ab45523f..ed7e202c 100644 --- a/src/lithic/types/transaction_simulate_clearing_params.py +++ b/src/lithic/types/transaction_simulate_clearing_params.py @@ -20,7 +20,8 @@ class TransactionSimulateClearingParams(TypedDict, total=False): will result in a -100 amount in the transaction, if the original authorization is a credit authorization. - If `amount` is not set, the full amount of the transaction will be cleared. - Transactions that have already cleared, either partially or fully, cannot be - cleared again using this endpoint. + If `amount` is not set, the full amount of the transaction will be cleared. This + endpoint may be called multiple times against the same authorization to simulate + a multiple-completion scenario, with each call creating a separate clearing + event. """ From 7c331aae7db42d9e5663d71d26ec2f8a7ee91153 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 14:54:46 +0000 Subject: [PATCH 2/7] docs(api): update category parameter description in external_payments --- .stats.yml | 4 ++-- src/lithic/resources/external_payments.py | 4 ++-- src/lithic/types/external_payment_list_params.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 212b17fe..d510754b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 213 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-1514911f233cb8bf0d6752c45bfa53a61b8f9b8ff215a4ea94a95f9505911000.yml -openapi_spec_hash: 9820a9c9a4ff778c627041eb53fd4ee5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-021aecb037a2f6b44056d6ebe08129e55f2dd95d8a6944c6e2c1c8e2bede56b4.yml +openapi_spec_hash: 3567c6592916d79ce38248d922cd0db6 config_hash: 5bb913c05ebeb301ec925b16e75bb251 diff --git a/src/lithic/resources/external_payments.py b/src/lithic/resources/external_payments.py index 2ad951b2..19116fd9 100644 --- a/src/lithic/resources/external_payments.py +++ b/src/lithic/resources/external_payments.py @@ -175,7 +175,7 @@ def list( Only entries created after the specified time will be included. UTC time zone. - category: External Payment category to be returned. + category: The external rail the funds moved on end: Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone. @@ -563,7 +563,7 @@ def list( Only entries created after the specified time will be included. UTC time zone. - category: External Payment category to be returned. + category: The external rail the funds moved on end: Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone. diff --git a/src/lithic/types/external_payment_list_params.py b/src/lithic/types/external_payment_list_params.py index f54ac91c..13c3710b 100644 --- a/src/lithic/types/external_payment_list_params.py +++ b/src/lithic/types/external_payment_list_params.py @@ -23,7 +23,7 @@ class ExternalPaymentListParams(TypedDict, total=False): category: Literal[ "EXTERNAL_WIRE", "EXTERNAL_ACH", "EXTERNAL_CHECK", "EXTERNAL_FEDNOW", "EXTERNAL_RTP", "EXTERNAL_TRANSFER" ] - """External Payment category to be returned.""" + """The external rail the funds moved on""" end: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """Date string in RFC 3339 format. From 92638f2617ed8c2114082008a5d30171bbdd17ae Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 17:10:26 +0000 Subject: [PATCH 3/7] docs(api): clarify dispute event descriptions in Event model --- .stats.yml | 4 ++-- src/lithic/types/event.py | 21 ++++++++++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index d510754b..97796a96 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 213 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-021aecb037a2f6b44056d6ebe08129e55f2dd95d8a6944c6e2c1c8e2bede56b4.yml -openapi_spec_hash: 3567c6592916d79ce38248d922cd0db6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-7944f9c14da86359cf30f16d97dff357f656f8fab9a59e923c436304624438ee.yml +openapi_spec_hash: 4b45cf81f64bc52e739731108d2cc482 config_hash: 5bb913c05ebeb301ec925b16e75bb251 diff --git a/src/lithic/types/event.py b/src/lithic/types/event.py index 2d663b0a..4c8b4e08 100644 --- a/src/lithic/types/event.py +++ b/src/lithic/types/event.py @@ -85,7 +85,7 @@ class Event(BaseModel): """The type of event that occurred. Possible values: - account_holder_document.updated: Occurs when an account holder's document - upload status has been updated + upload status has been updated. - account_holder.created: Occurs when a new account_holder is created. - account_holder.updated: Occurs when an account_holder is updated. - account_holder.verification: Occurs when an asynchronous account_holder's @@ -149,10 +149,21 @@ class Event(BaseModel): This event will be deprecated in the future. We recommend using `tokenization.updated` instead. - - dispute_evidence.upload_failed: Occurs when a dispute evidence upload fails. + - dispute_evidence.upload_failed: Occurs when an evidence upload fails for a + dispute filed through the Chargebacks API (`/v1/disputes`). + + This event is not emitted for Managed Disputes. + - dispute_transaction.created: Occurs when a new dispute transaction is created - - dispute_transaction.updated: Occurs when a dispute transaction is updated - - dispute.updated: Occurs when a dispute is updated. + for a Managed Disputes case. + - dispute_transaction.updated: Occurs when a dispute transaction for a Managed + Disputes case is updated. + - dispute.updated: Occurs when a dispute filed through the Chargebacks API + (`/v1/disputes`) is created or updated. + + This event is not emitted for Managed Disputes. Use + `dispute_transaction.created` and `dispute_transaction.updated` instead. + - external_bank_account.created: Occurs when an external bank account is created. - external_bank_account.updated: Occurs when an external bank account is @@ -174,7 +185,7 @@ class Event(BaseModel): - payment_transaction.updated: Occurs when a payment transaction is updated. - settlement_report.updated: Occurs when a settlement report is created or updated. - - statements.created: Occurs when a statement has been created + - statements.created: Occurs when a statement has been created. - three_ds_authentication.challenge: The `three_ds_authentication.challenge` event. Upon receiving this request, the Card Program should issue its own challenge to the cardholder. After a cardholder challenge is successfully From d2bf66d3cb39aaeb20363b620223a1c010aaf846 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 17:18:57 +0000 Subject: [PATCH 4/7] feat(stlc): configurable CI runner and private-production-repo support in workflow templates --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8406231a..72eb57b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: lint: timeout-minutes: 10 name: lint - runs-on: ${{ github.repository == 'stainless-sdks/lithic-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -44,7 +44,7 @@ jobs: permissions: contents: read id-token: write - runs-on: ${{ github.repository == 'stainless-sdks/lithic-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -84,7 +84,7 @@ jobs: test: timeout-minutes: 10 name: test - runs-on: ${{ github.repository == 'stainless-sdks/lithic-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -106,7 +106,7 @@ jobs: examples: timeout-minutes: 10 name: examples - runs-on: ${{ github.repository == 'stainless-sdks/lithic-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.repository == 'lithic-com/lithic-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: From 64b535810856b0344875a50a10bfed3212a1bb8a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 20:23:17 +0000 Subject: [PATCH 5/7] feat(api): add PAYMENT enum value to book_transfers --- .stats.yml | 4 ++-- src/lithic/resources/book_transfers.py | 2 ++ src/lithic/types/book_transfer_create_params.py | 1 + src/lithic/types/book_transfer_response.py | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 97796a96..ae55d298 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 213 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-7944f9c14da86359cf30f16d97dff357f656f8fab9a59e923c436304624438ee.yml -openapi_spec_hash: 4b45cf81f64bc52e739731108d2cc482 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-09b6d1b85c657173562e9a372adc74551f07d476122003078e9168467329f792.yml +openapi_spec_hash: a2b3a526310ceccd4ccb59ec428d246f config_hash: 5bb913c05ebeb301ec925b16e75bb251 diff --git a/src/lithic/resources/book_transfers.py b/src/lithic/resources/book_transfers.py index 5addf008..5acfc9b2 100644 --- a/src/lithic/resources/book_transfers.py +++ b/src/lithic/resources/book_transfers.py @@ -86,6 +86,7 @@ def create( "INTEREST", "LATE_PAYMENT", "BILL_PAYMENT", + "PAYMENT_FEE", "CASH_BACK", "ACCOUNT_TO_ACCOUNT", "CARD_TO_CARD", @@ -445,6 +446,7 @@ async def create( "INTEREST", "LATE_PAYMENT", "BILL_PAYMENT", + "PAYMENT_FEE", "CASH_BACK", "ACCOUNT_TO_ACCOUNT", "CARD_TO_CARD", diff --git a/src/lithic/types/book_transfer_create_params.py b/src/lithic/types/book_transfer_create_params.py index b5cab3b2..e69db2d3 100644 --- a/src/lithic/types/book_transfer_create_params.py +++ b/src/lithic/types/book_transfer_create_params.py @@ -65,6 +65,7 @@ class BookTransferCreateParams(TypedDict, total=False): "INTEREST", "LATE_PAYMENT", "BILL_PAYMENT", + "PAYMENT_FEE", "CASH_BACK", "ACCOUNT_TO_ACCOUNT", "CARD_TO_CARD", diff --git a/src/lithic/types/book_transfer_response.py b/src/lithic/types/book_transfer_response.py index a9648905..ecc4016e 100644 --- a/src/lithic/types/book_transfer_response.py +++ b/src/lithic/types/book_transfer_response.py @@ -60,6 +60,7 @@ class Event(BaseModel): "INTEREST", "LATE_PAYMENT", "BILL_PAYMENT", + "PAYMENT_FEE", "CASH_BACK", "ACCOUNT_TO_ACCOUNT", "CARD_TO_CARD", From 84ae5737ab2f64c05b512dc8cc0ac6de0579de70 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 20:52:16 +0000 Subject: [PATCH 6/7] feat(api): add embed.session_generated and embed.viewed webhook events --- .stats.yml | 4 +- api.md | 2 + src/lithic/resources/cards/cards.py | 33 ++++++-- src/lithic/resources/events/events.py | 4 + src/lithic/resources/events/subscriptions.py | 12 +++ src/lithic/types/__init__.py | 4 + .../embed_session_generated_webhook_event.py | 34 +++++++++ .../types/embed_viewed_webhook_event.py | 34 +++++++++ src/lithic/types/event.py | 6 ++ src/lithic/types/event_list_params.py | 2 + src/lithic/types/event_subscription.py | 2 + .../events/subscription_create_params.py | 2 + ...scription_send_simulated_example_params.py | 2 + .../events/subscription_update_params.py | 2 + src/lithic/types/parsed_webhook_event.py | 4 + tests/api_resources/test_cards.py | 76 +++++++++++-------- 16 files changed, 180 insertions(+), 43 deletions(-) create mode 100644 src/lithic/types/embed_session_generated_webhook_event.py create mode 100644 src/lithic/types/embed_viewed_webhook_event.py diff --git a/.stats.yml b/.stats.yml index ae55d298..cc05f8be 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 213 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-09b6d1b85c657173562e9a372adc74551f07d476122003078e9168467329f792.yml -openapi_spec_hash: a2b3a526310ceccd4ccb59ec428d246f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-2d2600072500797474f0d7798c1a8b668bfbc4e0c6a8f076ca7b4cc7ad82058b.yml +openapi_spec_hash: 7605eb6be77a3d150078916f0eb0e9ac config_hash: 5bb913c05ebeb301ec925b16e75bb251 diff --git a/api.md b/api.md index 21d83b17..eb6a70ad 100644 --- a/api.md +++ b/api.md @@ -1015,6 +1015,8 @@ from lithic.types import ( DigitalWalletTokenizationUpdatedWebhookEvent, DisputeUpdatedWebhookEvent, DisputeEvidenceUploadFailedWebhookEvent, + EmbedSessionGeneratedWebhookEvent, + EmbedViewedWebhookEvent, ExternalBankAccountCreatedWebhookEvent, ExternalBankAccountUpdatedWebhookEvent, ExternalPaymentCreatedWebhookEvent, diff --git a/src/lithic/resources/cards/cards.py b/src/lithic/resources/cards/cards.py index 41d0e592..e9943503 100644 --- a/src/lithic/resources/cards/cards.py +++ b/src/lithic/resources/cards/cards.py @@ -6,6 +6,7 @@ import json import base64 import hashlib +import typing_extensions from typing import Any, Union, cast from datetime import datetime, timezone, timedelta from typing_extensions import Literal @@ -675,6 +676,7 @@ def convert_physical( cast_to=Card, ) + @typing_extensions.deprecated("deprecated") def embed( self, *, @@ -688,6 +690,9 @@ def embed( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> str: """ + **Deprecated.** Use the modern embedded card flow instead: create a session with + `POST /v1/cards/{card_token}/embed` and render it via `GET /v1/embed`. + Handling full card PANs and CVV codes requires that you comply with the Payment Card Industry Data Security Standards (PCI DSS). Some clients choose to reduce their compliance obligations by leveraging our embedded card UI solution @@ -1903,6 +1908,7 @@ async def convert_physical( cast_to=Card, ) + @typing_extensions.deprecated("deprecated") async def embed( self, *, @@ -1916,6 +1922,9 @@ async def embed( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> str: """ + **Deprecated.** Use the modern embedded card flow instead: create a session with + `POST /v1/cards/{card_token}/embed` and render it via `GET /v1/embed`. + Handling full card PANs and CVV codes requires that you comply with the Payment Card Industry Data Security Standards (PCI DSS). Some clients choose to reduce their compliance obligations by leveraging our embedded card UI solution @@ -2539,8 +2548,10 @@ def __init__(self, cards: Cards) -> None: self.convert_physical = _legacy_response.to_raw_response_wrapper( cards.convert_physical, ) - self.embed = _legacy_response.to_raw_response_wrapper( - cards.embed, + self.embed = ( # pyright: ignore[reportDeprecated] + _legacy_response.to_raw_response_wrapper( + cards.embed, # pyright: ignore[reportDeprecated], + ) ) self.provision = _legacy_response.to_raw_response_wrapper( cards.provision, @@ -2592,8 +2603,10 @@ def __init__(self, cards: AsyncCards) -> None: self.convert_physical = _legacy_response.async_to_raw_response_wrapper( cards.convert_physical, ) - self.embed = _legacy_response.async_to_raw_response_wrapper( - cards.embed, + self.embed = ( # pyright: ignore[reportDeprecated] + _legacy_response.async_to_raw_response_wrapper( + cards.embed, # pyright: ignore[reportDeprecated], + ) ) self.provision = _legacy_response.async_to_raw_response_wrapper( cards.provision, @@ -2645,8 +2658,10 @@ def __init__(self, cards: Cards) -> None: self.convert_physical = to_streamed_response_wrapper( cards.convert_physical, ) - self.embed = to_streamed_response_wrapper( - cards.embed, + self.embed = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + cards.embed, # pyright: ignore[reportDeprecated], + ) ) self.provision = to_streamed_response_wrapper( cards.provision, @@ -2698,8 +2713,10 @@ def __init__(self, cards: AsyncCards) -> None: self.convert_physical = async_to_streamed_response_wrapper( cards.convert_physical, ) - self.embed = async_to_streamed_response_wrapper( - cards.embed, + self.embed = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + cards.embed, # pyright: ignore[reportDeprecated], + ) ) self.provision = async_to_streamed_response_wrapper( cards.provision, diff --git a/src/lithic/resources/events/events.py b/src/lithic/resources/events/events.py index e81e5c2f..36fd0dbc 100644 --- a/src/lithic/resources/events/events.py +++ b/src/lithic/resources/events/events.py @@ -140,6 +140,8 @@ def list( "dispute_transaction.created", "dispute_transaction.updated", "dispute.updated", + "embed.session_generated", + "embed.viewed", "external_bank_account.created", "external_bank_account.updated", "external_payment.created", @@ -421,6 +423,8 @@ def list( "dispute_transaction.created", "dispute_transaction.updated", "dispute.updated", + "embed.session_generated", + "embed.viewed", "external_bank_account.created", "external_bank_account.updated", "external_payment.created", diff --git a/src/lithic/resources/events/subscriptions.py b/src/lithic/resources/events/subscriptions.py index 1a622e2a..bb5390ad 100644 --- a/src/lithic/resources/events/subscriptions.py +++ b/src/lithic/resources/events/subscriptions.py @@ -92,6 +92,8 @@ def create( "dispute_transaction.created", "dispute_transaction.updated", "dispute.updated", + "embed.session_generated", + "embed.viewed", "external_bank_account.created", "external_bank_account.updated", "external_payment.created", @@ -245,6 +247,8 @@ def update( "dispute_transaction.created", "dispute_transaction.updated", "dispute.updated", + "embed.session_generated", + "embed.viewed", "external_bank_account.created", "external_bank_account.updated", "external_payment.created", @@ -721,6 +725,8 @@ def send_simulated_example( "dispute_transaction.created", "dispute_transaction.updated", "dispute.updated", + "embed.session_generated", + "embed.viewed", "external_bank_account.created", "external_bank_account.updated", "external_payment.created", @@ -851,6 +857,8 @@ async def create( "dispute_transaction.created", "dispute_transaction.updated", "dispute.updated", + "embed.session_generated", + "embed.viewed", "external_bank_account.created", "external_bank_account.updated", "external_payment.created", @@ -1004,6 +1012,8 @@ async def update( "dispute_transaction.created", "dispute_transaction.updated", "dispute.updated", + "embed.session_generated", + "embed.viewed", "external_bank_account.created", "external_bank_account.updated", "external_payment.created", @@ -1480,6 +1490,8 @@ async def send_simulated_example( "dispute_transaction.created", "dispute_transaction.updated", "dispute.updated", + "embed.session_generated", + "embed.viewed", "external_bank_account.created", "external_bank_account.updated", "external_payment.created", diff --git a/src/lithic/types/__init__.py b/src/lithic/types/__init__.py index 3ea5203b..a1dac934 100644 --- a/src/lithic/types/__init__.py +++ b/src/lithic/types/__init__.py @@ -119,6 +119,7 @@ from .card_renewed_webhook_event import CardRenewedWebhookEvent as CardRenewedWebhookEvent from .card_shipped_webhook_event import CardShippedWebhookEvent as CardShippedWebhookEvent from .card_updated_webhook_event import CardUpdatedWebhookEvent as CardUpdatedWebhookEvent +from .embed_viewed_webhook_event import EmbedViewedWebhookEvent as EmbedViewedWebhookEvent from .event_list_attempts_params import EventListAttemptsParams as EventListAttemptsParams from .settlement_summary_details import SettlementSummaryDetails as SettlementSummaryDetails from .transfer_limit_list_params import TransferLimitListParams as TransferLimitListParams @@ -203,6 +204,9 @@ from .claim_document_uploaded_webhook_event import ( ClaimDocumentUploadedWebhookEvent as ClaimDocumentUploadedWebhookEvent, ) +from .embed_session_generated_webhook_event import ( + EmbedSessionGeneratedWebhookEvent as EmbedSessionGeneratedWebhookEvent, +) from .external_bank_account_create_response import ( ExternalBankAccountCreateResponse as ExternalBankAccountCreateResponse, ) diff --git a/src/lithic/types/embed_session_generated_webhook_event.py b/src/lithic/types/embed_session_generated_webhook_event.py new file mode 100644 index 00000000..253aa461 --- /dev/null +++ b/src/lithic/types/embed_session_generated_webhook_event.py @@ -0,0 +1,34 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["EmbedSessionGeneratedWebhookEvent", "DeviceDetails"] + + +class DeviceDetails(BaseModel): + """Details about the request that generated the embed session""" + + ip_address: str + """The IP address recorded for the request that generated the event""" + + +class EmbedSessionGeneratedWebhookEvent(BaseModel): + account_token: str + """The token of the account associated with the card""" + + card_token: str + """The token of the card associated with the embed session""" + + device_details: DeviceDetails + """Details about the request that generated the embed session""" + + event_type: Literal["embed.session_generated"] + """The type of event""" + + session_id: str + """The identifier shared by webhook events for the same embed session.""" + + session_type: Literal["CARD_EMBED", "PIN_SETTING_EMBED"] + """The type of embed session that was generated""" diff --git a/src/lithic/types/embed_viewed_webhook_event.py b/src/lithic/types/embed_viewed_webhook_event.py new file mode 100644 index 00000000..8b574d33 --- /dev/null +++ b/src/lithic/types/embed_viewed_webhook_event.py @@ -0,0 +1,34 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["EmbedViewedWebhookEvent", "DeviceDetails"] + + +class DeviceDetails(BaseModel): + """Details about the request that revealed the card detail""" + + ip_address: str + """The IP address recorded for the request that generated the event""" + + +class EmbedViewedWebhookEvent(BaseModel): + account_token: str + """The token of the account associated with the card""" + + card_token: str + """The token of the card whose details were revealed""" + + device_details: DeviceDetails + """Details about the request that revealed the card detail""" + + embed_type: Literal["PAN", "CVV", "EXP_MONTH", "EXP_YEAR"] + """The type of card detail that was revealed""" + + event_type: Literal["embed.viewed"] + """The type of event""" + + session_id: str + """The identifier shared by webhook events for the same embed session.""" diff --git a/src/lithic/types/event.py b/src/lithic/types/event.py index 4c8b4e08..2f7e870a 100644 --- a/src/lithic/types/event.py +++ b/src/lithic/types/event.py @@ -54,6 +54,8 @@ class Event(BaseModel): "dispute_transaction.created", "dispute_transaction.updated", "dispute.updated", + "embed.session_generated", + "embed.viewed", "external_bank_account.created", "external_bank_account.updated", "external_payment.created", @@ -164,6 +166,10 @@ class Event(BaseModel): This event is not emitted for Managed Disputes. Use `dispute_transaction.created` and `dispute_transaction.updated` instead. + - embed.session_generated: Occurs when a card embed session is successfully + generated. + - embed.viewed: Occurs when a card detail is successfully revealed through an + embed. - external_bank_account.created: Occurs when an external bank account is created. - external_bank_account.updated: Occurs when an external bank account is diff --git a/src/lithic/types/event_list_params.py b/src/lithic/types/event_list_params.py index 942d5943..8f4b11ef 100644 --- a/src/lithic/types/event_list_params.py +++ b/src/lithic/types/event_list_params.py @@ -64,6 +64,8 @@ class EventListParams(TypedDict, total=False): "dispute_transaction.created", "dispute_transaction.updated", "dispute.updated", + "embed.session_generated", + "embed.viewed", "external_bank_account.created", "external_bank_account.updated", "external_payment.created", diff --git a/src/lithic/types/event_subscription.py b/src/lithic/types/event_subscription.py index 76556966..a8349d20 100644 --- a/src/lithic/types/event_subscription.py +++ b/src/lithic/types/event_subscription.py @@ -57,6 +57,8 @@ class EventSubscription(BaseModel): "dispute_transaction.created", "dispute_transaction.updated", "dispute.updated", + "embed.session_generated", + "embed.viewed", "external_bank_account.created", "external_bank_account.updated", "external_payment.created", diff --git a/src/lithic/types/events/subscription_create_params.py b/src/lithic/types/events/subscription_create_params.py index 965d26f1..00f5ccbf 100644 --- a/src/lithic/types/events/subscription_create_params.py +++ b/src/lithic/types/events/subscription_create_params.py @@ -52,6 +52,8 @@ class SubscriptionCreateParams(TypedDict, total=False): "dispute_transaction.created", "dispute_transaction.updated", "dispute.updated", + "embed.session_generated", + "embed.viewed", "external_bank_account.created", "external_bank_account.updated", "external_payment.created", diff --git a/src/lithic/types/events/subscription_send_simulated_example_params.py b/src/lithic/types/events/subscription_send_simulated_example_params.py index f86b8eb7..5fdb92c0 100644 --- a/src/lithic/types/events/subscription_send_simulated_example_params.py +++ b/src/lithic/types/events/subscription_send_simulated_example_params.py @@ -41,6 +41,8 @@ class SubscriptionSendSimulatedExampleParams(TypedDict, total=False): "dispute_transaction.created", "dispute_transaction.updated", "dispute.updated", + "embed.session_generated", + "embed.viewed", "external_bank_account.created", "external_bank_account.updated", "external_payment.created", diff --git a/src/lithic/types/events/subscription_update_params.py b/src/lithic/types/events/subscription_update_params.py index 701e60a9..6571ac66 100644 --- a/src/lithic/types/events/subscription_update_params.py +++ b/src/lithic/types/events/subscription_update_params.py @@ -52,6 +52,8 @@ class SubscriptionUpdateParams(TypedDict, total=False): "dispute_transaction.created", "dispute_transaction.updated", "dispute.updated", + "embed.session_generated", + "embed.viewed", "external_bank_account.created", "external_bank_account.updated", "external_payment.created", diff --git a/src/lithic/types/parsed_webhook_event.py b/src/lithic/types/parsed_webhook_event.py index c5684335..3959e4a3 100644 --- a/src/lithic/types/parsed_webhook_event.py +++ b/src/lithic/types/parsed_webhook_event.py @@ -10,6 +10,7 @@ from .card_renewed_webhook_event import CardRenewedWebhookEvent from .card_shipped_webhook_event import CardShippedWebhookEvent from .card_updated_webhook_event import CardUpdatedWebhookEvent +from .embed_viewed_webhook_event import EmbedViewedWebhookEvent from .card_reissued_webhook_event import CardReissuedWebhookEvent from .claim_created_webhook_event import ClaimCreatedWebhookEvent from .claim_updated_webhook_event import ClaimUpdatedWebhookEvent @@ -28,6 +29,7 @@ from .claim_document_accepted_webhook_event import ClaimDocumentAcceptedWebhookEvent from .claim_document_rejected_webhook_event import ClaimDocumentRejectedWebhookEvent from .claim_document_uploaded_webhook_event import ClaimDocumentUploadedWebhookEvent +from .embed_session_generated_webhook_event import EmbedSessionGeneratedWebhookEvent from .card_transaction_updated_webhook_event import CardTransactionUpdatedWebhookEvent from .external_payment_created_webhook_event import ExternalPaymentCreatedWebhookEvent from .external_payment_updated_webhook_event import ExternalPaymentUpdatedWebhookEvent @@ -465,6 +467,8 @@ class LegacyPayload(BaseModel): DigitalWalletTokenizationUpdatedWebhookEvent, DisputeUpdatedWebhookEvent, DisputeEvidenceUploadFailedWebhookEvent, + EmbedSessionGeneratedWebhookEvent, + EmbedViewedWebhookEvent, ExternalBankAccountCreatedWebhookEvent, ExternalBankAccountUpdatedWebhookEvent, ExternalPaymentCreatedWebhookEvent, diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index 1e289d72..e654f1ca 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -20,6 +20,8 @@ from lithic._utils import parse_datetime from lithic.pagination import SyncCursorPage, AsyncCursorPage +# pyright: reportDeprecated=false + base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -326,18 +328,21 @@ def test_path_params_convert_physical(self, client: Lithic) -> None: @parametrize def test_method_embed(self, client: Lithic) -> None: - card = client.cards.embed( - embed_request="embed_request", - hmac="hmac", - ) + with pytest.warns(DeprecationWarning): + card = client.cards.embed( + embed_request="embed_request", + hmac="hmac", + ) + assert_matches_type(str, card, path=["response"]) @parametrize def test_raw_response_embed(self, client: Lithic) -> None: - response = client.cards.with_raw_response.embed( - embed_request="embed_request", - hmac="hmac", - ) + with pytest.warns(DeprecationWarning): + response = client.cards.with_raw_response.embed( + embed_request="embed_request", + hmac="hmac", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -346,15 +351,16 @@ def test_raw_response_embed(self, client: Lithic) -> None: @parametrize def test_streaming_response_embed(self, client: Lithic) -> None: - with client.cards.with_streaming_response.embed( - embed_request="embed_request", - hmac="hmac", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + with client.cards.with_streaming_response.embed( + embed_request="embed_request", + hmac="hmac", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() - assert_matches_type(str, card, path=["response"]) + card = response.parse() + assert_matches_type(str, card, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1043,18 +1049,21 @@ async def test_path_params_convert_physical(self, async_client: AsyncLithic) -> @parametrize async def test_method_embed(self, async_client: AsyncLithic) -> None: - card = await async_client.cards.embed( - embed_request="embed_request", - hmac="hmac", - ) + with pytest.warns(DeprecationWarning): + card = await async_client.cards.embed( + embed_request="embed_request", + hmac="hmac", + ) + assert_matches_type(str, card, path=["response"]) @parametrize async def test_raw_response_embed(self, async_client: AsyncLithic) -> None: - response = await async_client.cards.with_raw_response.embed( - embed_request="embed_request", - hmac="hmac", - ) + with pytest.warns(DeprecationWarning): + response = await async_client.cards.with_raw_response.embed( + embed_request="embed_request", + hmac="hmac", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1063,15 +1072,16 @@ async def test_raw_response_embed(self, async_client: AsyncLithic) -> None: @parametrize async def test_streaming_response_embed(self, async_client: AsyncLithic) -> None: - async with async_client.cards.with_streaming_response.embed( - embed_request="embed_request", - hmac="hmac", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card = await response.parse() - assert_matches_type(str, card, path=["response"]) + with pytest.warns(DeprecationWarning): + async with async_client.cards.with_streaming_response.embed( + embed_request="embed_request", + hmac="hmac", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card = await response.parse() + assert_matches_type(str, card, path=["response"]) assert cast(Any, response.is_closed) is True From a037438b7c47bda9db7d30c88a751238099bb8ce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 20:52:49 +0000 Subject: [PATCH 7/7] release: 0.130.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 17 +++++++++++++++++ pyproject.toml | 2 +- src/lithic/_version.py | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 65b6e7b4..37e99723 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.129.0" + ".": "0.130.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index fe1b518e..e9ea0f4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## 0.130.0 (2026-07-17) + +Full Changelog: [v0.129.0...v0.130.0](https://github.com/lithic-com/lithic-python/compare/v0.129.0...v0.130.0) + +### Features + +* **api:** add embed.session_generated and embed.viewed webhook events ([84ae573](https://github.com/lithic-com/lithic-python/commit/84ae5737ab2f64c05b512dc8cc0ac6de0579de70)) +* **api:** add PAYMENT enum value to book_transfers ([64b5358](https://github.com/lithic-com/lithic-python/commit/64b535810856b0344875a50a10bfed3212a1bb8a)) +* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([d2bf66d](https://github.com/lithic-com/lithic-python/commit/d2bf66d3cb39aaeb20363b620223a1c010aaf846)) + + +### Documentation + +* **api:** clarify dispute event descriptions in Event model ([92638f2](https://github.com/lithic-com/lithic-python/commit/92638f2617ed8c2114082008a5d30171bbdd17ae)) +* **api:** clarify simulate_clearing behavior in transactions ([85d2d96](https://github.com/lithic-com/lithic-python/commit/85d2d9657022d3e7848477b329ba7f347efa7007)) +* **api:** update category parameter description in external_payments ([7c331aa](https://github.com/lithic-com/lithic-python/commit/7c331aae7db42d9e5663d71d26ec2f8a7ee91153)) + ## 0.129.0 (2026-06-29) Full Changelog: [v0.128.0...v0.129.0](https://github.com/lithic-com/lithic-python/compare/v0.128.0...v0.129.0) diff --git a/pyproject.toml b/pyproject.toml index 7b0df418..beb88420 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "lithic" -version = "0.129.0" +version = "0.130.0" description = "The official Python library for the lithic API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/lithic/_version.py b/src/lithic/_version.py index 25fca04f..a8fc2b35 100644 --- a/src/lithic/_version.py +++ b/src/lithic/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "lithic" -__version__ = "0.129.0" # x-release-please-version +__version__ = "0.130.0" # x-release-please-version