diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index a24ae611..b4da64f2 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.131.0"
+ ".": "0.132.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 50060d6a..f1fd09ef 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 215
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-38a020a15ab14f79c7fea3290822406cf80a9d43d46ab3295632a9723f5e42cd.yml
-openapi_spec_hash: 5a7357a17c5119bc91d8f5e42297fac3
-config_hash: 27fa50e251754c8982e3dc615ef6da41
+configured_endpoints: 220
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-61a059277e4c1eb58cc145be1639732d3d0d79d969742baff98690faf96dc164.yml
+openapi_spec_hash: cc69f6bb4c6d98be95100774de6aff3e
+config_hash: f21cef3cf163623883f344efe9032e4f
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8563b697..cfefeb54 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,26 @@
# Changelog
+## 0.132.0 (2026-09-18)
+
+Full Changelog: [v0.131.0...v0.132.0](https://github.com/lithic-com/lithic-python/compare/v0.131.0...v0.132.0)
+
+### Features
+
+* [CARDS-5174] Add reiusse/renew 409 error ([60c6b8e](https://github.com/lithic-com/lithic-python/commit/60c6b8eefa05208966212c0cc205ef0019f115ac))
+* [TRE-14464] Update /retry payments endpoint to accept method ([9ac7441](https://github.com/lithic-com/lithic-python/commit/9ac74418812660394107e068a012a373a9f81460))
+* [TRE-14524] Add Open to buy API spec ([001bd06](https://github.com/lithic-com/lithic-python/commit/001bd06bbd7c7274e6a1c59f4adcb9e86959b74e))
+* Add missing blockchain/stablecoin endpoints to the spec ([8f1b51c](https://github.com/lithic-com/lithic-python/commit/8f1b51c992cf317ee4353a3244e347f02a666b0f))
+* **api:** add card.pin_updated webhook event ([14889db](https://github.com/lithic-com/lithic-python/commit/14889dbf638b7d1b85e4b3145d8b3914cc87619a))
+* **api:** add EXTERNAL_STABLECOIN category and events to external_payments/account_activity ([945f5ae](https://github.com/lithic-com/lithic-python/commit/945f5aed2a5ddf72dac4319d65cc0c87c86ca172))
+* **api:** add FEE/FEE_REVERSAL enum values to management_operations and financial events ([615daa4](https://github.com/lithic-com/lithic-python/commit/615daa4be69ee4aab3fb1bc992635b335077ad92))
+* **api:** add installment_plans endpoints to financial_accounts ([065f732](https://github.com/lithic-com/lithic-python/commit/065f7323f26a10269c58eced8866f9f5fb4267e3))
+* **api:** add OTHER enum value to auth_rules v2 type field ([3f0a148](https://github.com/lithic-com/lithic-python/commit/3f0a148adc95e092aa25c9e569bbda518bbe3f54))
+* **api:** add psd2_context field and types to three_ds_authentication ([7da6f44](https://github.com/lithic-com/lithic-python/commit/7da6f4449fc8a5e018e8cc6483400a3383f3df4e))
+* **api:** add STABLECOIN_REVIEWED event type to payments simulate_action ([dc065e4](https://github.com/lithic-com/lithic-python/commit/dc065e43f9c025156c5ca142a9a222b5e0305354))
+* AUTH-3759: Add DECLINE_SCA_REQUIRED and SCA_REQUIRED enum entries ([445299d](https://github.com/lithic-com/lithic-python/commit/445299db5e0bbce6d2a5611a4cb752ac141dd77e))
+* TRE-14349: add installment plan management operation event types ([3cdcf9f](https://github.com/lithic-com/lithic-python/commit/3cdcf9fec6517da95ac06beaf373bc9070a8704f))
+* TRE-14429: Document the stablecoin payments endpoint ([c7b557e](https://github.com/lithic-com/lithic-python/commit/c7b557e0873ef183937d5c432f2a026e8fdd37c3))
+
## 0.131.0 (2026-08-31)
Full Changelog: [v0.130.0...v0.131.0](https://github.com/lithic-com/lithic-python/compare/v0.130.0...v0.131.0)
diff --git a/api.md b/api.md
index de19390a..0eac3531 100644
--- a/api.md
+++ b/api.md
@@ -479,6 +479,18 @@ Methods:
- client.financial_accounts.balances.list(financial_account_token, \*\*params) -> SyncSinglePage[FinancialAccountBalance]
+## OpenToBuy
+
+Types:
+
+```python
+from lithic.types.financial_accounts import OpenToBuy, OpenToBuySummary
+```
+
+Methods:
+
+- client.financial_accounts.open_to_buy.retrieve(financial_account_token) -> OpenToBuy
+
## FinancialTransactions
Methods:
@@ -537,6 +549,19 @@ Methods:
- client.financial_accounts.loan_tapes.retrieve(loan_tape_token, \*, financial_account_token) -> LoanTape
- client.financial_accounts.loan_tapes.list(financial_account_token, \*\*params) -> SyncCursorPage[LoanTape]
+## InstallmentPlans
+
+Types:
+
+```python
+from lithic.types.financial_accounts import InstallmentPlan, TransactionCategoryBalances
+```
+
+Methods:
+
+- client.financial_accounts.installment_plans.retrieve(installment_plan_token, \*, financial_account_token) -> InstallmentPlan
+- client.financial_accounts.installment_plans.list(financial_account_token, \*\*params) -> SyncCursorPage[InstallmentPlan]
+
## LoanTapeConfiguration
Types:
@@ -702,6 +727,7 @@ from lithic.types import BlockchainRecipient
Methods:
- client.blockchain_recipients.create(\*\*params) -> BlockchainRecipient
+- client.blockchain_recipients.retrieve(blockchain_recipient_token) -> BlockchainRecipient
# Payments
@@ -711,6 +737,7 @@ Types:
from lithic.types import (
Payment,
PaymentCreateResponse,
+ PaymentCreateStablecoinResponse,
PaymentRetryResponse,
PaymentSimulateActionResponse,
PaymentSimulateReceiptResponse,
@@ -724,7 +751,8 @@ Methods:
- client.payments.create(\*\*params) -> PaymentCreateResponse
- client.payments.retrieve(payment_token) -> Payment
- client.payments.list(\*\*params) -> SyncCursorPage[Payment]
-- client.payments.retry(payment_token) -> PaymentRetryResponse
+- client.payments.create_stablecoin(\*\*params) -> PaymentCreateStablecoinResponse
+- client.payments.retry(payment_token, \*\*params) -> PaymentRetryResponse
- client.payments.return\_(payment_token, \*\*params) -> Payment
- client.payments.simulate_action(payment_token, \*\*params) -> PaymentSimulateActionResponse
- client.payments.simulate_receipt(\*\*params) -> PaymentSimulateReceiptResponse
@@ -1008,6 +1036,7 @@ from lithic.types import (
BookTransferTransactionUpdatedWebhookEvent,
CardCreatedWebhookEvent,
CardConvertedWebhookEvent,
+ CardPinUpdatedWebhookEvent,
CardRenewedWebhookEvent,
CardReissuedWebhookEvent,
CardShippedWebhookEvent,
diff --git a/pyproject.toml b/pyproject.toml
index 0df4f166..5b20f1f2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "lithic"
-version = "0.131.0"
+version = "0.132.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 5e23cbfb..6a10b27d 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.131.0" # x-release-please-version
+__version__ = "0.132.0" # x-release-please-version
diff --git a/src/lithic/resources/account_activity.py b/src/lithic/resources/account_activity.py
index 87fd95b3..ded43c2a 100644
--- a/src/lithic/resources/account_activity.py
+++ b/src/lithic/resources/account_activity.py
@@ -64,6 +64,7 @@ def list(
"EXTERNAL_CHECK",
"EXTERNAL_FEDNOW",
"EXTERNAL_RTP",
+ "EXTERNAL_STABLECOIN",
"EXTERNAL_TRANSFER",
"EXTERNAL_WIRE",
"MANAGEMENT_ADJUSTMENT",
@@ -238,6 +239,7 @@ def list(
"EXTERNAL_CHECK",
"EXTERNAL_FEDNOW",
"EXTERNAL_RTP",
+ "EXTERNAL_STABLECOIN",
"EXTERNAL_TRANSFER",
"EXTERNAL_WIRE",
"MANAGEMENT_ADJUSTMENT",
diff --git a/src/lithic/resources/auth_rules/v2/v2.py b/src/lithic/resources/auth_rules/v2/v2.py
index 427f1c86..7365c837 100644
--- a/src/lithic/resources/auth_rules/v2/v2.py
+++ b/src/lithic/resources/auth_rules/v2/v2.py
@@ -73,7 +73,9 @@ def create(
self,
*,
parameters: v2_create_params.AccountLevelRuleParameters,
- type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE"],
+ type: Literal[
+ "CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE", "OTHER"
+ ],
account_tokens: SequenceNotStr[str] | Omit = omit,
business_account_tokens: SequenceNotStr[str] | Omit = omit,
event_stream: EventStream | Omit = omit,
@@ -106,6 +108,8 @@ def create(
- `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
ACH_PAYMENT_UPDATE event stream.
+ - `OTHER`: A rule whose type is not exposed through this API. Rules of this type
+ are read-only; `OTHER` cannot be used when creating a rule.
account_tokens: Account tokens to which the Auth Rule applies.
@@ -131,7 +135,9 @@ def create(
*,
card_tokens: SequenceNotStr[str],
parameters: v2_create_params.CardLevelRuleParameters,
- type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE"],
+ type: Literal[
+ "CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE", "OTHER"
+ ],
event_stream: EventStream | Omit = omit,
name: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -164,6 +170,8 @@ def create(
- `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
ACH_PAYMENT_UPDATE event stream.
+ - `OTHER`: A rule whose type is not exposed through this API. Rules of this type
+ are read-only; `OTHER` cannot be used when creating a rule.
event_stream: The event stream during which the rule will be evaluated.
@@ -185,7 +193,9 @@ def create(
*,
parameters: v2_create_params.ProgramLevelRuleParameters,
program_level: bool,
- type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE"],
+ type: Literal[
+ "CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE", "OTHER"
+ ],
event_stream: EventStream | Omit = omit,
excluded_account_tokens: SequenceNotStr[str] | Omit = omit,
excluded_business_account_tokens: SequenceNotStr[str] | Omit = omit,
@@ -221,6 +231,8 @@ def create(
- `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
ACH_PAYMENT_UPDATE event stream.
+ - `OTHER`: A rule whose type is not exposed through this API. Rules of this type
+ are read-only; `OTHER` cannot be used when creating a rule.
event_stream: The event stream during which the rule will be evaluated.
@@ -251,7 +263,9 @@ def create(
parameters: v2_create_params.AccountLevelRuleParameters
| v2_create_params.CardLevelRuleParameters
| v2_create_params.ProgramLevelRuleParameters,
- type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE"],
+ type: Literal[
+ "CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE", "OTHER"
+ ],
account_tokens: SequenceNotStr[str] | Omit = omit,
business_account_tokens: SequenceNotStr[str] | Omit = omit,
event_stream: EventStream | Omit = omit,
@@ -957,7 +971,9 @@ async def create(
self,
*,
parameters: v2_create_params.AccountLevelRuleParameters,
- type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE"],
+ type: Literal[
+ "CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE", "OTHER"
+ ],
account_tokens: SequenceNotStr[str] | Omit = omit,
business_account_tokens: SequenceNotStr[str] | Omit = omit,
event_stream: EventStream | Omit = omit,
@@ -990,6 +1006,8 @@ async def create(
- `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
ACH_PAYMENT_UPDATE event stream.
+ - `OTHER`: A rule whose type is not exposed through this API. Rules of this type
+ are read-only; `OTHER` cannot be used when creating a rule.
account_tokens: Account tokens to which the Auth Rule applies.
@@ -1015,7 +1033,9 @@ async def create(
*,
card_tokens: SequenceNotStr[str],
parameters: v2_create_params.CardLevelRuleParameters,
- type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE"],
+ type: Literal[
+ "CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE", "OTHER"
+ ],
event_stream: EventStream | Omit = omit,
name: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -1048,6 +1068,8 @@ async def create(
- `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
ACH_PAYMENT_UPDATE event stream.
+ - `OTHER`: A rule whose type is not exposed through this API. Rules of this type
+ are read-only; `OTHER` cannot be used when creating a rule.
event_stream: The event stream during which the rule will be evaluated.
@@ -1069,7 +1091,9 @@ async def create(
*,
parameters: v2_create_params.ProgramLevelRuleParameters,
program_level: bool,
- type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE"],
+ type: Literal[
+ "CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE", "OTHER"
+ ],
event_stream: EventStream | Omit = omit,
excluded_account_tokens: SequenceNotStr[str] | Omit = omit,
excluded_business_account_tokens: SequenceNotStr[str] | Omit = omit,
@@ -1105,6 +1129,8 @@ async def create(
- `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
ACH_PAYMENT_UPDATE event stream.
+ - `OTHER`: A rule whose type is not exposed through this API. Rules of this type
+ are read-only; `OTHER` cannot be used when creating a rule.
event_stream: The event stream during which the rule will be evaluated.
@@ -1135,7 +1161,9 @@ async def create(
parameters: v2_create_params.AccountLevelRuleParameters
| v2_create_params.CardLevelRuleParameters
| v2_create_params.ProgramLevelRuleParameters,
- type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE"],
+ type: Literal[
+ "CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE", "OTHER"
+ ],
account_tokens: SequenceNotStr[str] | Omit = omit,
business_account_tokens: SequenceNotStr[str] | Omit = omit,
event_stream: EventStream | Omit = omit,
diff --git a/src/lithic/resources/blockchain_recipients.py b/src/lithic/resources/blockchain_recipients.py
index 0a6b8e27..5be3cca5 100644
--- a/src/lithic/resources/blockchain_recipients.py
+++ b/src/lithic/resources/blockchain_recipients.py
@@ -7,7 +7,7 @@
from .. import _legacy_response
from ..types import OwnerType, blockchain_recipient_create_params
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
-from .._utils import maybe_transform, async_maybe_transform
+from .._utils import path_template, maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
@@ -108,6 +108,48 @@ def create(
cast_to=BlockchainRecipient,
)
+ def retrieve(
+ self,
+ blockchain_recipient_token: str,
+ *,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BlockchainRecipient:
+ """
+ Get a blockchain recipient by token
+
+ Use this to poll the `verification_state` after registering an address: a
+ recipient cannot receive a payout until screening completes and moves it out of
+ `PENDING`
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not blockchain_recipient_token:
+ raise ValueError(
+ f"Expected a non-empty value for `blockchain_recipient_token` but received {blockchain_recipient_token!r}"
+ )
+ return self._get(
+ path_template(
+ "/v1/blockchain_recipients/{blockchain_recipient_token}",
+ blockchain_recipient_token=blockchain_recipient_token,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=BlockchainRecipient,
+ )
+
class AsyncBlockchainRecipients(AsyncAPIResource):
@cached_property
@@ -199,6 +241,48 @@ async def create(
cast_to=BlockchainRecipient,
)
+ async def retrieve(
+ self,
+ blockchain_recipient_token: str,
+ *,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BlockchainRecipient:
+ """
+ Get a blockchain recipient by token
+
+ Use this to poll the `verification_state` after registering an address: a
+ recipient cannot receive a payout until screening completes and moves it out of
+ `PENDING`
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not blockchain_recipient_token:
+ raise ValueError(
+ f"Expected a non-empty value for `blockchain_recipient_token` but received {blockchain_recipient_token!r}"
+ )
+ return await self._get(
+ path_template(
+ "/v1/blockchain_recipients/{blockchain_recipient_token}",
+ blockchain_recipient_token=blockchain_recipient_token,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=BlockchainRecipient,
+ )
+
class BlockchainRecipientsWithRawResponse:
def __init__(self, blockchain_recipients: BlockchainRecipients) -> None:
@@ -207,6 +291,9 @@ def __init__(self, blockchain_recipients: BlockchainRecipients) -> None:
self.create = _legacy_response.to_raw_response_wrapper(
blockchain_recipients.create,
)
+ self.retrieve = _legacy_response.to_raw_response_wrapper(
+ blockchain_recipients.retrieve,
+ )
class AsyncBlockchainRecipientsWithRawResponse:
@@ -216,6 +303,9 @@ def __init__(self, blockchain_recipients: AsyncBlockchainRecipients) -> None:
self.create = _legacy_response.async_to_raw_response_wrapper(
blockchain_recipients.create,
)
+ self.retrieve = _legacy_response.async_to_raw_response_wrapper(
+ blockchain_recipients.retrieve,
+ )
class BlockchainRecipientsWithStreamingResponse:
@@ -225,6 +315,9 @@ def __init__(self, blockchain_recipients: BlockchainRecipients) -> None:
self.create = to_streamed_response_wrapper(
blockchain_recipients.create,
)
+ self.retrieve = to_streamed_response_wrapper(
+ blockchain_recipients.retrieve,
+ )
class AsyncBlockchainRecipientsWithStreamingResponse:
@@ -234,3 +327,6 @@ def __init__(self, blockchain_recipients: AsyncBlockchainRecipients) -> None:
self.create = async_to_streamed_response_wrapper(
blockchain_recipients.create,
)
+ self.retrieve = async_to_streamed_response_wrapper(
+ blockchain_recipients.retrieve,
+ )
diff --git a/src/lithic/resources/cards/cards.py b/src/lithic/resources/cards/cards.py
index 05bfae1e..b60d3852 100644
--- a/src/lithic/resources/cards/cards.py
+++ b/src/lithic/resources/cards/cards.py
@@ -1012,7 +1012,8 @@ def reissue(
physically damaged). The PAN, expiry, and CVC2 will remain the same and the
original card can continue to be used until the new card is activated. Only
applies to cards of type `PHYSICAL`. A card can be reissued or renewed a total
- of 8 times.
+ of 8 times. Returns `409` if the card is still ongoing manufacturing when using
+ Thales as a manufacturer.
Args:
carrier: If omitted, the previous carrier will be used.
@@ -1097,7 +1098,8 @@ def renew(
`PHYSICAL` card can be reissued or renewed a total of 8 times. For `VIRTUAL`,
the card will retain the same card token and PAN and receive an updated expiry
and CVC2 code. `product_id`, `shipping_method`, `shipping_address`, `carrier`
- are only relevant for renewing `PHYSICAL` cards.
+ are only relevant for renewing `PHYSICAL` cards. Returns `409` if the card is
+ still ongoing manufacturing when using Thales as a manufacturer.
Args:
shipping_address: The shipping address this card will be sent to.
@@ -2289,7 +2291,8 @@ async def reissue(
physically damaged). The PAN, expiry, and CVC2 will remain the same and the
original card can continue to be used until the new card is activated. Only
applies to cards of type `PHYSICAL`. A card can be reissued or renewed a total
- of 8 times.
+ of 8 times. Returns `409` if the card is still ongoing manufacturing when using
+ Thales as a manufacturer.
Args:
carrier: If omitted, the previous carrier will be used.
@@ -2374,7 +2377,8 @@ async def renew(
`PHYSICAL` card can be reissued or renewed a total of 8 times. For `VIRTUAL`,
the card will retain the same card token and PAN and receive an updated expiry
and CVC2 code. `product_id`, `shipping_method`, `shipping_address`, `carrier`
- are only relevant for renewing `PHYSICAL` cards.
+ are only relevant for renewing `PHYSICAL` cards. Returns `409` if the card is
+ still ongoing manufacturing when using Thales as a manufacturer.
Args:
shipping_address: The shipping address this card will be sent to.
diff --git a/src/lithic/resources/events/events.py b/src/lithic/resources/events/events.py
index 36fd0dbc..ae1d55c8 100644
--- a/src/lithic/resources/events/events.py
+++ b/src/lithic/resources/events/events.py
@@ -123,6 +123,7 @@ def list(
"card_transaction.updated",
"card.converted",
"card.created",
+ "card.pin_updated",
"card.reissued",
"card.renewed",
"card.shipped",
@@ -406,6 +407,7 @@ def list(
"card_transaction.updated",
"card.converted",
"card.created",
+ "card.pin_updated",
"card.reissued",
"card.renewed",
"card.shipped",
diff --git a/src/lithic/resources/events/subscriptions.py b/src/lithic/resources/events/subscriptions.py
index bb5390ad..5c128852 100644
--- a/src/lithic/resources/events/subscriptions.py
+++ b/src/lithic/resources/events/subscriptions.py
@@ -75,6 +75,7 @@ def create(
"card_transaction.updated",
"card.converted",
"card.created",
+ "card.pin_updated",
"card.reissued",
"card.renewed",
"card.shipped",
@@ -230,6 +231,7 @@ def update(
"card_transaction.updated",
"card.converted",
"card.created",
+ "card.pin_updated",
"card.reissued",
"card.renewed",
"card.shipped",
@@ -708,6 +710,7 @@ def send_simulated_example(
"card_transaction.updated",
"card.converted",
"card.created",
+ "card.pin_updated",
"card.reissued",
"card.renewed",
"card.shipped",
@@ -840,6 +843,7 @@ async def create(
"card_transaction.updated",
"card.converted",
"card.created",
+ "card.pin_updated",
"card.reissued",
"card.renewed",
"card.shipped",
@@ -995,6 +999,7 @@ async def update(
"card_transaction.updated",
"card.converted",
"card.created",
+ "card.pin_updated",
"card.reissued",
"card.renewed",
"card.shipped",
@@ -1473,6 +1478,7 @@ async def send_simulated_example(
"card_transaction.updated",
"card.converted",
"card.created",
+ "card.pin_updated",
"card.reissued",
"card.renewed",
"card.shipped",
diff --git a/src/lithic/resources/external_payments.py b/src/lithic/resources/external_payments.py
index 19116fd9..5c7bb388 100644
--- a/src/lithic/resources/external_payments.py
+++ b/src/lithic/resources/external_payments.py
@@ -54,7 +54,13 @@ def create(
*,
amount: int,
category: Literal[
- "EXTERNAL_WIRE", "EXTERNAL_ACH", "EXTERNAL_CHECK", "EXTERNAL_FEDNOW", "EXTERNAL_RTP", "EXTERNAL_TRANSFER"
+ "EXTERNAL_WIRE",
+ "EXTERNAL_ACH",
+ "EXTERNAL_CHECK",
+ "EXTERNAL_FEDNOW",
+ "EXTERNAL_RTP",
+ "EXTERNAL_STABLECOIN",
+ "EXTERNAL_TRANSFER",
],
effective_date: Union[str, date],
financial_account_token: str,
@@ -150,7 +156,13 @@ def list(
begin: Union[str, datetime] | Omit = omit,
business_account_token: str | Omit = omit,
category: Literal[
- "EXTERNAL_WIRE", "EXTERNAL_ACH", "EXTERNAL_CHECK", "EXTERNAL_FEDNOW", "EXTERNAL_RTP", "EXTERNAL_TRANSFER"
+ "EXTERNAL_WIRE",
+ "EXTERNAL_ACH",
+ "EXTERNAL_CHECK",
+ "EXTERNAL_FEDNOW",
+ "EXTERNAL_RTP",
+ "EXTERNAL_STABLECOIN",
+ "EXTERNAL_TRANSFER",
]
| Omit = omit,
end: Union[str, datetime] | Omit = omit,
@@ -442,7 +454,13 @@ async def create(
*,
amount: int,
category: Literal[
- "EXTERNAL_WIRE", "EXTERNAL_ACH", "EXTERNAL_CHECK", "EXTERNAL_FEDNOW", "EXTERNAL_RTP", "EXTERNAL_TRANSFER"
+ "EXTERNAL_WIRE",
+ "EXTERNAL_ACH",
+ "EXTERNAL_CHECK",
+ "EXTERNAL_FEDNOW",
+ "EXTERNAL_RTP",
+ "EXTERNAL_STABLECOIN",
+ "EXTERNAL_TRANSFER",
],
effective_date: Union[str, date],
financial_account_token: str,
@@ -538,7 +556,13 @@ def list(
begin: Union[str, datetime] | Omit = omit,
business_account_token: str | Omit = omit,
category: Literal[
- "EXTERNAL_WIRE", "EXTERNAL_ACH", "EXTERNAL_CHECK", "EXTERNAL_FEDNOW", "EXTERNAL_RTP", "EXTERNAL_TRANSFER"
+ "EXTERNAL_WIRE",
+ "EXTERNAL_ACH",
+ "EXTERNAL_CHECK",
+ "EXTERNAL_FEDNOW",
+ "EXTERNAL_RTP",
+ "EXTERNAL_STABLECOIN",
+ "EXTERNAL_TRANSFER",
]
| Omit = omit,
end: Union[str, datetime] | Omit = omit,
diff --git a/src/lithic/resources/financial_accounts/__init__.py b/src/lithic/resources/financial_accounts/__init__.py
index 74f0a994..6729993e 100644
--- a/src/lithic/resources/financial_accounts/__init__.py
+++ b/src/lithic/resources/financial_accounts/__init__.py
@@ -24,6 +24,22 @@
StatementsWithStreamingResponse,
AsyncStatementsWithStreamingResponse,
)
+from .open_to_buy import (
+ OpenToBuyResource,
+ AsyncOpenToBuyResource,
+ OpenToBuyResourceWithRawResponse,
+ AsyncOpenToBuyResourceWithRawResponse,
+ OpenToBuyResourceWithStreamingResponse,
+ AsyncOpenToBuyResourceWithStreamingResponse,
+)
+from .installment_plans import (
+ InstallmentPlans,
+ AsyncInstallmentPlans,
+ InstallmentPlansWithRawResponse,
+ AsyncInstallmentPlansWithRawResponse,
+ InstallmentPlansWithStreamingResponse,
+ AsyncInstallmentPlansWithStreamingResponse,
+)
from .financial_accounts import (
FinancialAccounts,
AsyncFinancialAccounts,
@@ -72,6 +88,12 @@
"AsyncBalancesWithRawResponse",
"BalancesWithStreamingResponse",
"AsyncBalancesWithStreamingResponse",
+ "OpenToBuyResource",
+ "AsyncOpenToBuyResource",
+ "OpenToBuyResourceWithRawResponse",
+ "AsyncOpenToBuyResourceWithRawResponse",
+ "OpenToBuyResourceWithStreamingResponse",
+ "AsyncOpenToBuyResourceWithStreamingResponse",
"FinancialTransactions",
"AsyncFinancialTransactions",
"FinancialTransactionsWithRawResponse",
@@ -96,6 +118,12 @@
"AsyncLoanTapesWithRawResponse",
"LoanTapesWithStreamingResponse",
"AsyncLoanTapesWithStreamingResponse",
+ "InstallmentPlans",
+ "AsyncInstallmentPlans",
+ "InstallmentPlansWithRawResponse",
+ "AsyncInstallmentPlansWithRawResponse",
+ "InstallmentPlansWithStreamingResponse",
+ "AsyncInstallmentPlansWithStreamingResponse",
"LoanTapeConfigurationResource",
"AsyncLoanTapeConfigurationResource",
"LoanTapeConfigurationResourceWithRawResponse",
diff --git a/src/lithic/resources/financial_accounts/financial_accounts.py b/src/lithic/resources/financial_accounts/financial_accounts.py
index fd5998be..7613f265 100644
--- a/src/lithic/resources/financial_accounts/financial_accounts.py
+++ b/src/lithic/resources/financial_accounts/financial_accounts.py
@@ -36,8 +36,24 @@
)
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
+from .open_to_buy import (
+ OpenToBuyResource,
+ AsyncOpenToBuyResource,
+ OpenToBuyResourceWithRawResponse,
+ AsyncOpenToBuyResourceWithRawResponse,
+ OpenToBuyResourceWithStreamingResponse,
+ AsyncOpenToBuyResourceWithStreamingResponse,
+)
from ...pagination import SyncSinglePage, AsyncSinglePage
from ..._base_client import AsyncPaginator, make_request_options
+from .installment_plans import (
+ InstallmentPlans,
+ AsyncInstallmentPlans,
+ InstallmentPlansWithRawResponse,
+ AsyncInstallmentPlansWithRawResponse,
+ InstallmentPlansWithStreamingResponse,
+ AsyncInstallmentPlansWithStreamingResponse,
+)
from .credit_configuration import (
CreditConfiguration,
AsyncCreditConfiguration,
@@ -88,6 +104,10 @@ class FinancialAccounts(SyncAPIResource):
def balances(self) -> Balances:
return Balances(self._client)
+ @cached_property
+ def open_to_buy(self) -> OpenToBuyResource:
+ return OpenToBuyResource(self._client)
+
@cached_property
def financial_transactions(self) -> FinancialTransactions:
return FinancialTransactions(self._client)
@@ -104,6 +124,10 @@ def statements(self) -> Statements:
def loan_tapes(self) -> LoanTapes:
return LoanTapes(self._client)
+ @cached_property
+ def installment_plans(self) -> InstallmentPlans:
+ return InstallmentPlans(self._client)
+
@cached_property
def loan_tape_configuration(self) -> LoanTapeConfigurationResource:
return LoanTapeConfigurationResource(self._client)
@@ -415,6 +439,10 @@ class AsyncFinancialAccounts(AsyncAPIResource):
def balances(self) -> AsyncBalances:
return AsyncBalances(self._client)
+ @cached_property
+ def open_to_buy(self) -> AsyncOpenToBuyResource:
+ return AsyncOpenToBuyResource(self._client)
+
@cached_property
def financial_transactions(self) -> AsyncFinancialTransactions:
return AsyncFinancialTransactions(self._client)
@@ -431,6 +459,10 @@ def statements(self) -> AsyncStatements:
def loan_tapes(self) -> AsyncLoanTapes:
return AsyncLoanTapes(self._client)
+ @cached_property
+ def installment_plans(self) -> AsyncInstallmentPlans:
+ return AsyncInstallmentPlans(self._client)
+
@cached_property
def loan_tape_configuration(self) -> AsyncLoanTapeConfigurationResource:
return AsyncLoanTapeConfigurationResource(self._client)
@@ -766,6 +798,10 @@ def __init__(self, financial_accounts: FinancialAccounts) -> None:
def balances(self) -> BalancesWithRawResponse:
return BalancesWithRawResponse(self._financial_accounts.balances)
+ @cached_property
+ def open_to_buy(self) -> OpenToBuyResourceWithRawResponse:
+ return OpenToBuyResourceWithRawResponse(self._financial_accounts.open_to_buy)
+
@cached_property
def financial_transactions(self) -> FinancialTransactionsWithRawResponse:
return FinancialTransactionsWithRawResponse(self._financial_accounts.financial_transactions)
@@ -782,6 +818,10 @@ def statements(self) -> StatementsWithRawResponse:
def loan_tapes(self) -> LoanTapesWithRawResponse:
return LoanTapesWithRawResponse(self._financial_accounts.loan_tapes)
+ @cached_property
+ def installment_plans(self) -> InstallmentPlansWithRawResponse:
+ return InstallmentPlansWithRawResponse(self._financial_accounts.installment_plans)
+
@cached_property
def loan_tape_configuration(self) -> LoanTapeConfigurationResourceWithRawResponse:
return LoanTapeConfigurationResourceWithRawResponse(self._financial_accounts.loan_tape_configuration)
@@ -818,6 +858,10 @@ def __init__(self, financial_accounts: AsyncFinancialAccounts) -> None:
def balances(self) -> AsyncBalancesWithRawResponse:
return AsyncBalancesWithRawResponse(self._financial_accounts.balances)
+ @cached_property
+ def open_to_buy(self) -> AsyncOpenToBuyResourceWithRawResponse:
+ return AsyncOpenToBuyResourceWithRawResponse(self._financial_accounts.open_to_buy)
+
@cached_property
def financial_transactions(self) -> AsyncFinancialTransactionsWithRawResponse:
return AsyncFinancialTransactionsWithRawResponse(self._financial_accounts.financial_transactions)
@@ -834,6 +878,10 @@ def statements(self) -> AsyncStatementsWithRawResponse:
def loan_tapes(self) -> AsyncLoanTapesWithRawResponse:
return AsyncLoanTapesWithRawResponse(self._financial_accounts.loan_tapes)
+ @cached_property
+ def installment_plans(self) -> AsyncInstallmentPlansWithRawResponse:
+ return AsyncInstallmentPlansWithRawResponse(self._financial_accounts.installment_plans)
+
@cached_property
def loan_tape_configuration(self) -> AsyncLoanTapeConfigurationResourceWithRawResponse:
return AsyncLoanTapeConfigurationResourceWithRawResponse(self._financial_accounts.loan_tape_configuration)
@@ -870,6 +918,10 @@ def __init__(self, financial_accounts: FinancialAccounts) -> None:
def balances(self) -> BalancesWithStreamingResponse:
return BalancesWithStreamingResponse(self._financial_accounts.balances)
+ @cached_property
+ def open_to_buy(self) -> OpenToBuyResourceWithStreamingResponse:
+ return OpenToBuyResourceWithStreamingResponse(self._financial_accounts.open_to_buy)
+
@cached_property
def financial_transactions(self) -> FinancialTransactionsWithStreamingResponse:
return FinancialTransactionsWithStreamingResponse(self._financial_accounts.financial_transactions)
@@ -886,6 +938,10 @@ def statements(self) -> StatementsWithStreamingResponse:
def loan_tapes(self) -> LoanTapesWithStreamingResponse:
return LoanTapesWithStreamingResponse(self._financial_accounts.loan_tapes)
+ @cached_property
+ def installment_plans(self) -> InstallmentPlansWithStreamingResponse:
+ return InstallmentPlansWithStreamingResponse(self._financial_accounts.installment_plans)
+
@cached_property
def loan_tape_configuration(self) -> LoanTapeConfigurationResourceWithStreamingResponse:
return LoanTapeConfigurationResourceWithStreamingResponse(self._financial_accounts.loan_tape_configuration)
@@ -922,6 +978,10 @@ def __init__(self, financial_accounts: AsyncFinancialAccounts) -> None:
def balances(self) -> AsyncBalancesWithStreamingResponse:
return AsyncBalancesWithStreamingResponse(self._financial_accounts.balances)
+ @cached_property
+ def open_to_buy(self) -> AsyncOpenToBuyResourceWithStreamingResponse:
+ return AsyncOpenToBuyResourceWithStreamingResponse(self._financial_accounts.open_to_buy)
+
@cached_property
def financial_transactions(self) -> AsyncFinancialTransactionsWithStreamingResponse:
return AsyncFinancialTransactionsWithStreamingResponse(self._financial_accounts.financial_transactions)
@@ -938,6 +998,10 @@ def statements(self) -> AsyncStatementsWithStreamingResponse:
def loan_tapes(self) -> AsyncLoanTapesWithStreamingResponse:
return AsyncLoanTapesWithStreamingResponse(self._financial_accounts.loan_tapes)
+ @cached_property
+ def installment_plans(self) -> AsyncInstallmentPlansWithStreamingResponse:
+ return AsyncInstallmentPlansWithStreamingResponse(self._financial_accounts.installment_plans)
+
@cached_property
def loan_tape_configuration(self) -> AsyncLoanTapeConfigurationResourceWithStreamingResponse:
return AsyncLoanTapeConfigurationResourceWithStreamingResponse(self._financial_accounts.loan_tape_configuration)
diff --git a/src/lithic/resources/financial_accounts/installment_plans.py b/src/lithic/resources/financial_accounts/installment_plans.py
new file mode 100644
index 00000000..37a5b306
--- /dev/null
+++ b/src/lithic/resources/financial_accounts/installment_plans.py
@@ -0,0 +1,341 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+from typing_extensions import Literal
+
+import httpx
+
+from ... import _legacy_response
+from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ..._utils import path_template, maybe_transform
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
+from ...pagination import SyncCursorPage, AsyncCursorPage
+from ..._base_client import AsyncPaginator, make_request_options
+from ...types.financial_accounts import installment_plan_list_params
+from ...types.financial_accounts.installment_plan import InstallmentPlan
+
+__all__ = ["InstallmentPlans", "AsyncInstallmentPlans"]
+
+
+class InstallmentPlans(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> InstallmentPlansWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/lithic-com/lithic-python#accessing-raw-response-data-eg-headers
+ """
+ return InstallmentPlansWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> InstallmentPlansWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/lithic-com/lithic-python#with_streaming_response
+ """
+ return InstallmentPlansWithStreamingResponse(self)
+
+ def retrieve(
+ self,
+ installment_plan_token: str,
+ *,
+ financial_account_token: str,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> InstallmentPlan:
+ """
+ Get a specific installment plan for a given financial account.
+
+ Args:
+ financial_account_token: Globally unique identifier for financial account.
+
+ installment_plan_token: Globally unique identifier for installment plan.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not financial_account_token:
+ raise ValueError(
+ f"Expected a non-empty value for `financial_account_token` but received {financial_account_token!r}"
+ )
+ if not installment_plan_token:
+ raise ValueError(
+ f"Expected a non-empty value for `installment_plan_token` but received {installment_plan_token!r}"
+ )
+ return self._get(
+ path_template(
+ "/v1/financial_accounts/{financial_account_token}/installment_plans/{installment_plan_token}",
+ financial_account_token=financial_account_token,
+ installment_plan_token=installment_plan_token,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=InstallmentPlan,
+ )
+
+ def list(
+ self,
+ financial_account_token: str,
+ *,
+ ending_before: str | Omit = omit,
+ page_size: int | Omit = omit,
+ starting_after: str | Omit = omit,
+ state: Optional[Literal["PENDING", "ACTIVE", "REBUILD_IN_PROGRESS", "FULLY_PAID", "CANCELLED"]] | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SyncCursorPage[InstallmentPlan]:
+ """
+ List the installment plans for a given financial account.
+
+ Args:
+ financial_account_token: Globally unique identifier for financial account.
+
+ ending_before: A cursor representing an item's token before which a page of results should end.
+ Used to retrieve the previous page of results before this item.
+
+ page_size: Page size (for pagination).
+
+ starting_after: A cursor representing an item's token after which a page of results should
+ begin. Used to retrieve the next page of results after this item.
+
+ state: Only installment plans in this state will be included.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not financial_account_token:
+ raise ValueError(
+ f"Expected a non-empty value for `financial_account_token` but received {financial_account_token!r}"
+ )
+ return self._get_api_list(
+ path_template(
+ "/v1/financial_accounts/{financial_account_token}/installment_plans",
+ financial_account_token=financial_account_token,
+ ),
+ page=SyncCursorPage[InstallmentPlan],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "ending_before": ending_before,
+ "page_size": page_size,
+ "starting_after": starting_after,
+ "state": state,
+ },
+ installment_plan_list_params.InstallmentPlanListParams,
+ ),
+ ),
+ model=InstallmentPlan,
+ )
+
+
+class AsyncInstallmentPlans(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncInstallmentPlansWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/lithic-com/lithic-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncInstallmentPlansWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncInstallmentPlansWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/lithic-com/lithic-python#with_streaming_response
+ """
+ return AsyncInstallmentPlansWithStreamingResponse(self)
+
+ async def retrieve(
+ self,
+ installment_plan_token: str,
+ *,
+ financial_account_token: str,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> InstallmentPlan:
+ """
+ Get a specific installment plan for a given financial account.
+
+ Args:
+ financial_account_token: Globally unique identifier for financial account.
+
+ installment_plan_token: Globally unique identifier for installment plan.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not financial_account_token:
+ raise ValueError(
+ f"Expected a non-empty value for `financial_account_token` but received {financial_account_token!r}"
+ )
+ if not installment_plan_token:
+ raise ValueError(
+ f"Expected a non-empty value for `installment_plan_token` but received {installment_plan_token!r}"
+ )
+ return await self._get(
+ path_template(
+ "/v1/financial_accounts/{financial_account_token}/installment_plans/{installment_plan_token}",
+ financial_account_token=financial_account_token,
+ installment_plan_token=installment_plan_token,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=InstallmentPlan,
+ )
+
+ def list(
+ self,
+ financial_account_token: str,
+ *,
+ ending_before: str | Omit = omit,
+ page_size: int | Omit = omit,
+ starting_after: str | Omit = omit,
+ state: Optional[Literal["PENDING", "ACTIVE", "REBUILD_IN_PROGRESS", "FULLY_PAID", "CANCELLED"]] | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> AsyncPaginator[InstallmentPlan, AsyncCursorPage[InstallmentPlan]]:
+ """
+ List the installment plans for a given financial account.
+
+ Args:
+ financial_account_token: Globally unique identifier for financial account.
+
+ ending_before: A cursor representing an item's token before which a page of results should end.
+ Used to retrieve the previous page of results before this item.
+
+ page_size: Page size (for pagination).
+
+ starting_after: A cursor representing an item's token after which a page of results should
+ begin. Used to retrieve the next page of results after this item.
+
+ state: Only installment plans in this state will be included.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not financial_account_token:
+ raise ValueError(
+ f"Expected a non-empty value for `financial_account_token` but received {financial_account_token!r}"
+ )
+ return self._get_api_list(
+ path_template(
+ "/v1/financial_accounts/{financial_account_token}/installment_plans",
+ financial_account_token=financial_account_token,
+ ),
+ page=AsyncCursorPage[InstallmentPlan],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "ending_before": ending_before,
+ "page_size": page_size,
+ "starting_after": starting_after,
+ "state": state,
+ },
+ installment_plan_list_params.InstallmentPlanListParams,
+ ),
+ ),
+ model=InstallmentPlan,
+ )
+
+
+class InstallmentPlansWithRawResponse:
+ def __init__(self, installment_plans: InstallmentPlans) -> None:
+ self._installment_plans = installment_plans
+
+ self.retrieve = _legacy_response.to_raw_response_wrapper(
+ installment_plans.retrieve,
+ )
+ self.list = _legacy_response.to_raw_response_wrapper(
+ installment_plans.list,
+ )
+
+
+class AsyncInstallmentPlansWithRawResponse:
+ def __init__(self, installment_plans: AsyncInstallmentPlans) -> None:
+ self._installment_plans = installment_plans
+
+ self.retrieve = _legacy_response.async_to_raw_response_wrapper(
+ installment_plans.retrieve,
+ )
+ self.list = _legacy_response.async_to_raw_response_wrapper(
+ installment_plans.list,
+ )
+
+
+class InstallmentPlansWithStreamingResponse:
+ def __init__(self, installment_plans: InstallmentPlans) -> None:
+ self._installment_plans = installment_plans
+
+ self.retrieve = to_streamed_response_wrapper(
+ installment_plans.retrieve,
+ )
+ self.list = to_streamed_response_wrapper(
+ installment_plans.list,
+ )
+
+
+class AsyncInstallmentPlansWithStreamingResponse:
+ def __init__(self, installment_plans: AsyncInstallmentPlans) -> None:
+ self._installment_plans = installment_plans
+
+ self.retrieve = async_to_streamed_response_wrapper(
+ installment_plans.retrieve,
+ )
+ self.list = async_to_streamed_response_wrapper(
+ installment_plans.list,
+ )
diff --git a/src/lithic/resources/financial_accounts/open_to_buy.py b/src/lithic/resources/financial_accounts/open_to_buy.py
new file mode 100644
index 00000000..d57227cb
--- /dev/null
+++ b/src/lithic/resources/financial_accounts/open_to_buy.py
@@ -0,0 +1,194 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import httpx
+
+from ... import _legacy_response
+from ..._types import Body, Query, Headers, NotGiven, not_given
+from ..._utils import path_template
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
+from ..._base_client import make_request_options
+from ...types.financial_accounts.open_to_buy import OpenToBuy
+
+__all__ = ["OpenToBuyResource", "AsyncOpenToBuyResource"]
+
+
+class OpenToBuyResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> OpenToBuyResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/lithic-com/lithic-python#accessing-raw-response-data-eg-headers
+ """
+ return OpenToBuyResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> OpenToBuyResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/lithic-com/lithic-python#with_streaming_response
+ """
+ return OpenToBuyResourceWithStreamingResponse(self)
+
+ def retrieve(
+ self,
+ financial_account_token: str,
+ *,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> OpenToBuy:
+ """
+ Get the funds available for card spend backed by a given Security Account, along
+ with the balances that amount is derived from.
+
+ Open to buy is the amount Lithic authorizes card spend against. It is not a
+ stored balance, so it is recalculated on every request from the Security
+ Account, the funds held against spend Lithic has already paid out to the
+ networks on your behalf, and the spend that has not yet been collected. The
+ accounts that feed the calculation depend on your program setup, so
+ `summary.settled_funds` is `null` outside Commercial Charge.
+
+ Supported for Commercial Charge, Dynamic Reserve, and Secured Charge programs.
+ Returns `404` if `financial_account_token` is not a Security Account you own, or
+ if your program setup does not use an open to buy calculation.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not financial_account_token:
+ raise ValueError(
+ f"Expected a non-empty value for `financial_account_token` but received {financial_account_token!r}"
+ )
+ return self._get(
+ path_template(
+ "/v1/financial_accounts/{financial_account_token}/open_to_buy",
+ financial_account_token=financial_account_token,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=OpenToBuy,
+ )
+
+
+class AsyncOpenToBuyResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncOpenToBuyResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/lithic-com/lithic-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncOpenToBuyResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncOpenToBuyResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/lithic-com/lithic-python#with_streaming_response
+ """
+ return AsyncOpenToBuyResourceWithStreamingResponse(self)
+
+ async def retrieve(
+ self,
+ financial_account_token: str,
+ *,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> OpenToBuy:
+ """
+ Get the funds available for card spend backed by a given Security Account, along
+ with the balances that amount is derived from.
+
+ Open to buy is the amount Lithic authorizes card spend against. It is not a
+ stored balance, so it is recalculated on every request from the Security
+ Account, the funds held against spend Lithic has already paid out to the
+ networks on your behalf, and the spend that has not yet been collected. The
+ accounts that feed the calculation depend on your program setup, so
+ `summary.settled_funds` is `null` outside Commercial Charge.
+
+ Supported for Commercial Charge, Dynamic Reserve, and Secured Charge programs.
+ Returns `404` if `financial_account_token` is not a Security Account you own, or
+ if your program setup does not use an open to buy calculation.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not financial_account_token:
+ raise ValueError(
+ f"Expected a non-empty value for `financial_account_token` but received {financial_account_token!r}"
+ )
+ return await self._get(
+ path_template(
+ "/v1/financial_accounts/{financial_account_token}/open_to_buy",
+ financial_account_token=financial_account_token,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=OpenToBuy,
+ )
+
+
+class OpenToBuyResourceWithRawResponse:
+ def __init__(self, open_to_buy: OpenToBuyResource) -> None:
+ self._open_to_buy = open_to_buy
+
+ self.retrieve = _legacy_response.to_raw_response_wrapper(
+ open_to_buy.retrieve,
+ )
+
+
+class AsyncOpenToBuyResourceWithRawResponse:
+ def __init__(self, open_to_buy: AsyncOpenToBuyResource) -> None:
+ self._open_to_buy = open_to_buy
+
+ self.retrieve = _legacy_response.async_to_raw_response_wrapper(
+ open_to_buy.retrieve,
+ )
+
+
+class OpenToBuyResourceWithStreamingResponse:
+ def __init__(self, open_to_buy: OpenToBuyResource) -> None:
+ self._open_to_buy = open_to_buy
+
+ self.retrieve = to_streamed_response_wrapper(
+ open_to_buy.retrieve,
+ )
+
+
+class AsyncOpenToBuyResourceWithStreamingResponse:
+ def __init__(self, open_to_buy: AsyncOpenToBuyResource) -> None:
+ self._open_to_buy = open_to_buy
+
+ self.retrieve = async_to_streamed_response_wrapper(
+ open_to_buy.retrieve,
+ )
diff --git a/src/lithic/resources/management_operations.py b/src/lithic/resources/management_operations.py
index c5f7ee5f..c518b745 100644
--- a/src/lithic/resources/management_operations.py
+++ b/src/lithic/resources/management_operations.py
@@ -67,6 +67,8 @@ def create(
"CURRENCY_CONVERSION_REVERSAL",
"INTEREST",
"INTEREST_REVERSAL",
+ "INSTALLMENT_FEE",
+ "INSTALLMENT_FEE_REVERSAL",
"LATE_PAYMENT",
"LATE_PAYMENT_REVERSAL",
"BILLING_ERROR",
@@ -85,6 +87,8 @@ def create(
"QUARTERLY_REVERSAL",
"MONTHLY",
"MONTHLY_REVERSAL",
+ "FEE",
+ "FEE_REVERSAL",
],
financial_account_token: str,
token: str | Omit = omit,
@@ -353,6 +357,8 @@ async def create(
"CURRENCY_CONVERSION_REVERSAL",
"INTEREST",
"INTEREST_REVERSAL",
+ "INSTALLMENT_FEE",
+ "INSTALLMENT_FEE_REVERSAL",
"LATE_PAYMENT",
"LATE_PAYMENT_REVERSAL",
"BILLING_ERROR",
@@ -371,6 +377,8 @@ async def create(
"QUARTERLY_REVERSAL",
"MONTHLY",
"MONTHLY_REVERSAL",
+ "FEE",
+ "FEE_REVERSAL",
],
financial_account_token: str,
token: str | Omit = omit,
diff --git a/src/lithic/resources/payments.py b/src/lithic/resources/payments.py
index bfe781ed..e8a6a72a 100644
--- a/src/lithic/resources/payments.py
+++ b/src/lithic/resources/payments.py
@@ -11,12 +11,14 @@
from .. import _legacy_response
from ..types import (
payment_list_params,
+ payment_retry_params,
payment_create_params,
payment_return_params,
payment_simulate_action_params,
payment_simulate_return_params,
payment_simulate_receipt_params,
payment_simulate_release_params,
+ payment_create_stablecoin_params,
)
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import path_template, maybe_transform, async_maybe_transform
@@ -32,6 +34,7 @@
from ..types.payment_simulate_return_response import PaymentSimulateReturnResponse
from ..types.payment_simulate_receipt_response import PaymentSimulateReceiptResponse
from ..types.payment_simulate_release_response import PaymentSimulateReleaseResponse
+from ..types.payment_create_stablecoin_response import PaymentCreateStablecoinResponse
__all__ = ["Payments", "AsyncPayments"]
@@ -77,7 +80,14 @@ def create(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PaymentCreateResponse:
"""
- Initiates a payment between a financial account and an external bank account.
+ Initiates an ACH payment between a financial account and an external bank
+ account.
+
+ This endpoint originates on the ACH rail only. To send a stablecoin payout, use
+ the
+ [Create stablecoin payment](https://docs.lithic.com/reference/createstablecoinpayment)
+ endpoint. Payments on every rail are read back through
+ [List payments](https://docs.lithic.com/reference/searchpayments).
Args:
token: Customer-provided token that will serve as an idempotency token. This token will
@@ -155,7 +165,7 @@ def list(
account_token: str | Omit = omit,
begin: Union[str, datetime] | Omit = omit,
business_account_token: str | Omit = omit,
- category: Literal["ACH"] | Omit = omit,
+ category: Literal["ACH", "STABLECOIN"] | Omit = omit,
end: Union[str, datetime] | Omit = omit,
ending_before: str | Omit = omit,
financial_account_token: str | Omit = omit,
@@ -224,10 +234,93 @@ def list(
model=Payment,
)
+ def create_stablecoin(
+ self,
+ *,
+ amount: int,
+ blockchain_recipient_token: str,
+ financial_account_token: str,
+ type: Literal["PAYMENT"],
+ token: str | Omit = omit,
+ hold: payment_create_stablecoin_params.Hold | Omit = omit,
+ memo: str | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> PaymentCreateStablecoinResponse:
+ """
+ Initiates a stablecoin payout from a financial account to a registered
+ blockchain recipient.
+
+ The recipient must have been registered with
+ [Create blockchain recipient](https://docs.lithic.com/reference/createblockchainrecipient)
+ and have completed address screening — only a recipient in the `ENABLED`
+ verification state can receive a payout. The destination address and chain come
+ from the recipient, so they are not supplied here.
+
+ Only payouts are initiated through this endpoint. Stablecoin pay-ins are
+ credited from on-chain deposits to a financial account's deposit address and are
+ not created through the API. Funds are placed on hold when the payout is
+ initiated, and a payout that fails on chain reverses that hold. A payout cannot
+ be cancelled once it has been submitted on chain.
+
+ This endpoint is only available to stablecoin-enabled programs. Contact your
+ customer success manager to learn more.
+
+ Args:
+ amount: Payout amount in cents
+
+ blockchain_recipient_token: Token of the blockchain recipient to send the payout to. The recipient must be
+ in the `ENABLED` verification state
+
+ financial_account_token: Token of the financial account the payout is funded from
+
+ type: Direction of the payment. Stablecoin supports payouts only
+
+ token: Customer-provided token that will serve as an idempotency token. This token will
+ become the transaction token
+
+ hold: Optional hold to settle when this payout is initiated
+
+ memo: Memo recorded on the payout. Defaults to `Stablecoin payout on ` when
+ omitted
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._post(
+ "/v1/payments/stablecoin",
+ body=maybe_transform(
+ {
+ "amount": amount,
+ "blockchain_recipient_token": blockchain_recipient_token,
+ "financial_account_token": financial_account_token,
+ "type": type,
+ "token": token,
+ "hold": hold,
+ "memo": memo,
+ },
+ payment_create_stablecoin_params.PaymentCreateStablecoinParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=PaymentCreateStablecoinResponse,
+ )
+
def retry(
self,
payment_token: str,
*,
+ method: Literal["ACH_NEXT_DAY", "ACH_SAME_DAY"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -239,6 +332,10 @@ def retry(
Retry an origination which has been returned.
Args:
+ method: Settlement speed to retry the payment at. Defaults to the original payment's
+ method. An `ACH_SAME_DAY` retry is rejected if the payment is for $1,000,000.00
+ or more, or if it is submitted after the same day ACH cutoff
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -251,6 +348,7 @@ def retry(
raise ValueError(f"Expected a non-empty value for `payment_token` but received {payment_token!r}")
return self._post(
path_template("/v1/payments/{payment_token}/retry", payment_token=payment_token),
+ body=maybe_transform({"method": method}, payment_retry_params.PaymentRetryParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
@@ -349,6 +447,7 @@ def simulate_action(
"ACH_RETURN_INITIATED",
"ACH_RETURN_PROCESSED",
"ACH_RETURN_SETTLED",
+ "STABLECOIN_REVIEWED",
],
date_of_death: Union[str, date] | Omit = omit,
decline_reason: Literal[
@@ -582,7 +681,14 @@ async def create(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PaymentCreateResponse:
"""
- Initiates a payment between a financial account and an external bank account.
+ Initiates an ACH payment between a financial account and an external bank
+ account.
+
+ This endpoint originates on the ACH rail only. To send a stablecoin payout, use
+ the
+ [Create stablecoin payment](https://docs.lithic.com/reference/createstablecoinpayment)
+ endpoint. Payments on every rail are read back through
+ [List payments](https://docs.lithic.com/reference/searchpayments).
Args:
token: Customer-provided token that will serve as an idempotency token. This token will
@@ -660,7 +766,7 @@ def list(
account_token: str | Omit = omit,
begin: Union[str, datetime] | Omit = omit,
business_account_token: str | Omit = omit,
- category: Literal["ACH"] | Omit = omit,
+ category: Literal["ACH", "STABLECOIN"] | Omit = omit,
end: Union[str, datetime] | Omit = omit,
ending_before: str | Omit = omit,
financial_account_token: str | Omit = omit,
@@ -729,10 +835,93 @@ def list(
model=Payment,
)
+ async def create_stablecoin(
+ self,
+ *,
+ amount: int,
+ blockchain_recipient_token: str,
+ financial_account_token: str,
+ type: Literal["PAYMENT"],
+ token: str | Omit = omit,
+ hold: payment_create_stablecoin_params.Hold | Omit = omit,
+ memo: str | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> PaymentCreateStablecoinResponse:
+ """
+ Initiates a stablecoin payout from a financial account to a registered
+ blockchain recipient.
+
+ The recipient must have been registered with
+ [Create blockchain recipient](https://docs.lithic.com/reference/createblockchainrecipient)
+ and have completed address screening — only a recipient in the `ENABLED`
+ verification state can receive a payout. The destination address and chain come
+ from the recipient, so they are not supplied here.
+
+ Only payouts are initiated through this endpoint. Stablecoin pay-ins are
+ credited from on-chain deposits to a financial account's deposit address and are
+ not created through the API. Funds are placed on hold when the payout is
+ initiated, and a payout that fails on chain reverses that hold. A payout cannot
+ be cancelled once it has been submitted on chain.
+
+ This endpoint is only available to stablecoin-enabled programs. Contact your
+ customer success manager to learn more.
+
+ Args:
+ amount: Payout amount in cents
+
+ blockchain_recipient_token: Token of the blockchain recipient to send the payout to. The recipient must be
+ in the `ENABLED` verification state
+
+ financial_account_token: Token of the financial account the payout is funded from
+
+ type: Direction of the payment. Stablecoin supports payouts only
+
+ token: Customer-provided token that will serve as an idempotency token. This token will
+ become the transaction token
+
+ hold: Optional hold to settle when this payout is initiated
+
+ memo: Memo recorded on the payout. Defaults to `Stablecoin payout on ` when
+ omitted
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return await self._post(
+ "/v1/payments/stablecoin",
+ body=await async_maybe_transform(
+ {
+ "amount": amount,
+ "blockchain_recipient_token": blockchain_recipient_token,
+ "financial_account_token": financial_account_token,
+ "type": type,
+ "token": token,
+ "hold": hold,
+ "memo": memo,
+ },
+ payment_create_stablecoin_params.PaymentCreateStablecoinParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=PaymentCreateStablecoinResponse,
+ )
+
async def retry(
self,
payment_token: str,
*,
+ method: Literal["ACH_NEXT_DAY", "ACH_SAME_DAY"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -744,6 +933,10 @@ async def retry(
Retry an origination which has been returned.
Args:
+ method: Settlement speed to retry the payment at. Defaults to the original payment's
+ method. An `ACH_SAME_DAY` retry is rejected if the payment is for $1,000,000.00
+ or more, or if it is submitted after the same day ACH cutoff
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -756,6 +949,7 @@ async def retry(
raise ValueError(f"Expected a non-empty value for `payment_token` but received {payment_token!r}")
return await self._post(
path_template("/v1/payments/{payment_token}/retry", payment_token=payment_token),
+ body=await async_maybe_transform({"method": method}, payment_retry_params.PaymentRetryParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
@@ -854,6 +1048,7 @@ async def simulate_action(
"ACH_RETURN_INITIATED",
"ACH_RETURN_PROCESSED",
"ACH_RETURN_SETTLED",
+ "STABLECOIN_REVIEWED",
],
date_of_death: Union[str, date] | Omit = omit,
decline_reason: Literal[
@@ -1059,6 +1254,9 @@ def __init__(self, payments: Payments) -> None:
self.list = _legacy_response.to_raw_response_wrapper(
payments.list,
)
+ self.create_stablecoin = _legacy_response.to_raw_response_wrapper(
+ payments.create_stablecoin,
+ )
self.retry = _legacy_response.to_raw_response_wrapper(
payments.retry,
)
@@ -1092,6 +1290,9 @@ def __init__(self, payments: AsyncPayments) -> None:
self.list = _legacy_response.async_to_raw_response_wrapper(
payments.list,
)
+ self.create_stablecoin = _legacy_response.async_to_raw_response_wrapper(
+ payments.create_stablecoin,
+ )
self.retry = _legacy_response.async_to_raw_response_wrapper(
payments.retry,
)
@@ -1125,6 +1326,9 @@ def __init__(self, payments: Payments) -> None:
self.list = to_streamed_response_wrapper(
payments.list,
)
+ self.create_stablecoin = to_streamed_response_wrapper(
+ payments.create_stablecoin,
+ )
self.retry = to_streamed_response_wrapper(
payments.retry,
)
@@ -1158,6 +1362,9 @@ def __init__(self, payments: AsyncPayments) -> None:
self.list = async_to_streamed_response_wrapper(
payments.list,
)
+ self.create_stablecoin = async_to_streamed_response_wrapper(
+ payments.create_stablecoin,
+ )
self.retry = async_to_streamed_response_wrapper(
payments.retry,
)
diff --git a/src/lithic/types/__init__.py b/src/lithic/types/__init__.py
index 2c670e3c..1c8fbe72 100644
--- a/src/lithic/types/__init__.py
+++ b/src/lithic/types/__init__.py
@@ -81,6 +81,7 @@
from .blockchain_recipient import BlockchainRecipient as BlockchainRecipient
from .internal_transaction import InternalTransaction as InternalTransaction
from .parsed_webhook_event import ParsedWebhookEvent as ParsedWebhookEvent
+from .payment_retry_params import PaymentRetryParams as PaymentRetryParams
from .spend_limit_duration import SpendLimitDuration as SpendLimitDuration
from .account_update_params import AccountUpdateParams as AccountUpdateParams
from .card_provision_params import CardProvisionParams as CardProvisionParams
@@ -152,6 +153,7 @@
from .account_activity_list_response import AccountActivityListResponse as AccountActivityListResponse
from .account_holder_create_response import AccountHolderCreateResponse as AccountHolderCreateResponse
from .account_holder_update_response import AccountHolderUpdateResponse as AccountHolderUpdateResponse
+from .card_pin_updated_webhook_event import CardPinUpdatedWebhookEvent as CardPinUpdatedWebhookEvent
from .external_payment_cancel_params import ExternalPaymentCancelParams as ExternalPaymentCancelParams
from .external_payment_create_params import ExternalPaymentCreateParams as ExternalPaymentCreateParams
from .external_payment_settle_params import ExternalPaymentSettleParams as ExternalPaymentSettleParams
@@ -167,6 +169,7 @@
from .payment_simulate_release_params import PaymentSimulateReleaseParams as PaymentSimulateReleaseParams
from .management_operation_list_params import ManagementOperationListParams as ManagementOperationListParams
from .management_operation_transaction import ManagementOperationTransaction as ManagementOperationTransaction
+from .payment_create_stablecoin_params import PaymentCreateStablecoinParams as PaymentCreateStablecoinParams
from .payment_simulate_action_response import PaymentSimulateActionResponse as PaymentSimulateActionResponse
from .payment_simulate_return_response import PaymentSimulateReturnResponse as PaymentSimulateReturnResponse
from .responder_endpoint_create_params import ResponderEndpointCreateParams as ResponderEndpointCreateParams
@@ -179,6 +182,7 @@
from .tokenization_result_webhook_event import TokenizationResultWebhookEvent as TokenizationResultWebhookEvent
from .blockchain_recipient_create_params import BlockchainRecipientCreateParams as BlockchainRecipientCreateParams
from .management_operation_create_params import ManagementOperationCreateParams as ManagementOperationCreateParams
+from .payment_create_stablecoin_response import PaymentCreateStablecoinResponse as PaymentCreateStablecoinResponse
from .responder_endpoint_create_response import ResponderEndpointCreateResponse as ResponderEndpointCreateResponse
from .tokenization_updated_webhook_event import TokenizationUpdatedWebhookEvent as TokenizationUpdatedWebhookEvent
from .transaction_simulate_return_params import TransactionSimulateReturnParams as TransactionSimulateReturnParams
diff --git a/src/lithic/types/account_activity_list_params.py b/src/lithic/types/account_activity_list_params.py
index 06ec7459..410e44d9 100644
--- a/src/lithic/types/account_activity_list_params.py
+++ b/src/lithic/types/account_activity_list_params.py
@@ -39,6 +39,7 @@ class AccountActivityListParams(TypedDict, total=False):
"EXTERNAL_CHECK",
"EXTERNAL_FEDNOW",
"EXTERNAL_RTP",
+ "EXTERNAL_STABLECOIN",
"EXTERNAL_TRANSFER",
"EXTERNAL_WIRE",
"MANAGEMENT_ADJUSTMENT",
diff --git a/src/lithic/types/account_activity_list_response.py b/src/lithic/types/account_activity_list_response.py
index 7f5ead1f..e2884279 100644
--- a/src/lithic/types/account_activity_list_response.py
+++ b/src/lithic/types/account_activity_list_response.py
@@ -38,6 +38,7 @@ class FinancialTransaction(BaseModel):
"EXTERNAL_CHECK",
"EXTERNAL_FEDNOW",
"EXTERNAL_RTP",
+ "EXTERNAL_STABLECOIN",
"EXTERNAL_TRANSFER",
"EXTERNAL_WIRE",
"MANAGEMENT_ADJUSTMENT",
diff --git a/src/lithic/types/account_activity_retrieve_transaction_response.py b/src/lithic/types/account_activity_retrieve_transaction_response.py
index ca0b5314..b347e17f 100644
--- a/src/lithic/types/account_activity_retrieve_transaction_response.py
+++ b/src/lithic/types/account_activity_retrieve_transaction_response.py
@@ -38,6 +38,7 @@ class FinancialTransaction(BaseModel):
"EXTERNAL_CHECK",
"EXTERNAL_FEDNOW",
"EXTERNAL_RTP",
+ "EXTERNAL_STABLECOIN",
"EXTERNAL_TRANSFER",
"EXTERNAL_WIRE",
"MANAGEMENT_ADJUSTMENT",
diff --git a/src/lithic/types/auth_rules/auth_rule.py b/src/lithic/types/auth_rules/auth_rule.py
index c3ab6ff8..961f14b2 100644
--- a/src/lithic/types/auth_rules/auth_rule.py
+++ b/src/lithic/types/auth_rules/auth_rule.py
@@ -126,7 +126,9 @@ class AuthRule(BaseModel):
state: Literal["ACTIVE", "INACTIVE"]
"""The state of the Auth Rule"""
- type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE"]
+ type: Literal[
+ "CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE", "OTHER"
+ ]
"""The type of Auth Rule.
For certain rule types, this determines the event stream during which it will be
@@ -143,6 +145,8 @@ class AuthRule(BaseModel):
- `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
ACH_PAYMENT_UPDATE event stream.
+ - `OTHER`: A rule whose type is not exposed through this API. Rules of this type
+ are read-only; `OTHER` cannot be used when creating a rule.
"""
excluded_account_tokens: Optional[List[str]] = None
diff --git a/src/lithic/types/auth_rules/report_stats.py b/src/lithic/types/auth_rules/report_stats.py
index d8a1bdb7..46cfb36a 100644
--- a/src/lithic/types/auth_rules/report_stats.py
+++ b/src/lithic/types/auth_rules/report_stats.py
@@ -68,6 +68,7 @@ class ExampleActionDeclineActionAuthorization(BaseModel):
"PROGRAM_SUSPENDED",
"PROGRAM_USAGE_RESTRICTION",
"REVERSAL_UNMATCHED",
+ "SCA_REQUIRED",
"SECURITY_VIOLATION",
"SINGLE_USE_CARD_REATTEMPTED",
"SUSPECTED_FRAUD",
diff --git a/src/lithic/types/auth_rules/v2_create_params.py b/src/lithic/types/auth_rules/v2_create_params.py
index bb4cfaee..924f3eb8 100644
--- a/src/lithic/types/auth_rules/v2_create_params.py
+++ b/src/lithic/types/auth_rules/v2_create_params.py
@@ -37,7 +37,9 @@ class AccountLevelRule(TypedDict, total=False):
"""Parameters for the Auth Rule"""
type: Required[
- Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE"]
+ Literal[
+ "CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE", "OTHER"
+ ]
]
"""The type of Auth Rule.
@@ -55,6 +57,8 @@ class AccountLevelRule(TypedDict, total=False):
- `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
ACH_PAYMENT_UPDATE event stream.
+ - `OTHER`: A rule whose type is not exposed through this API. Rules of this type
+ are read-only; `OTHER` cannot be used when creating a rule.
"""
account_tokens: SequenceNotStr[str]
@@ -93,7 +97,9 @@ class CardLevelRule(TypedDict, total=False):
"""Parameters for the Auth Rule"""
type: Required[
- Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE"]
+ Literal[
+ "CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE", "OTHER"
+ ]
]
"""The type of Auth Rule.
@@ -111,6 +117,8 @@ class CardLevelRule(TypedDict, total=False):
- `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
ACH_PAYMENT_UPDATE event stream.
+ - `OTHER`: A rule whose type is not exposed through this API. Rules of this type
+ are read-only; `OTHER` cannot be used when creating a rule.
"""
event_stream: EventStream
@@ -143,7 +151,9 @@ class ProgramLevelRule(TypedDict, total=False):
"""Whether the Auth Rule applies to all authorizations on the card program."""
type: Required[
- Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE"]
+ Literal[
+ "CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION", "TYPESCRIPT_CODE", "OTHER"
+ ]
]
"""The type of Auth Rule.
@@ -161,6 +171,8 @@ class ProgramLevelRule(TypedDict, total=False):
- `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
ACH_PAYMENT_UPDATE event stream.
+ - `OTHER`: A rule whose type is not exposed through this API. Rules of this type
+ are read-only; `OTHER` cannot be used when creating a rule.
"""
event_stream: EventStream
diff --git a/src/lithic/types/auth_rules/v2_list_results_response.py b/src/lithic/types/auth_rules/v2_list_results_response.py
index c42048e1..a5704f39 100644
--- a/src/lithic/types/auth_rules/v2_list_results_response.py
+++ b/src/lithic/types/auth_rules/v2_list_results_response.py
@@ -81,6 +81,7 @@ class AuthorizationResultActionDeclineActionAuthorization(BaseModel):
"PROGRAM_SUSPENDED",
"PROGRAM_USAGE_RESTRICTION",
"REVERSAL_UNMATCHED",
+ "SCA_REQUIRED",
"SECURITY_VIOLATION",
"SINGLE_USE_CARD_REATTEMPTED",
"SUSPECTED_FRAUD",
diff --git a/src/lithic/types/card_pin_updated_webhook_event.py b/src/lithic/types/card_pin_updated_webhook_event.py
new file mode 100644
index 00000000..33be0ff4
--- /dev/null
+++ b/src/lithic/types/card_pin_updated_webhook_event.py
@@ -0,0 +1,30 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["CardPinUpdatedWebhookEvent"]
+
+
+class CardPinUpdatedWebhookEvent(BaseModel):
+ card_token: str
+ """The token of the card whose PIN or PIN status was updated"""
+
+ event_type: Literal["card.pin_updated"]
+ """The type of event that occurred."""
+
+ pin_status: Literal["OK", "BLOCKED"]
+ """The card's PIN status after the update"""
+
+ status_reason: Literal["PIN_SET", "PIN_CHANGED", "PIN_UNBLOCKED", "EXCESSIVE_PIN_ATTEMPTS"]
+ """The reason for the PIN update:
+
+ - `PIN_SET` - The PIN was set for the first time; `pin_status` is `OK`
+ - `PIN_CHANGED` - The PIN was changed, including when changing a blocked PIN;
+ `pin_status` is `OK`
+ - `PIN_UNBLOCKED` - The PIN was unblocked without changing it; `pin_status` is
+ `OK`
+ - `EXCESSIVE_PIN_ATTEMPTS` - The PIN was blocked due to excessive incorrect PIN
+ attempts; `pin_status` is `BLOCKED`
+ """
diff --git a/src/lithic/types/event.py b/src/lithic/types/event.py
index dcbd1046..9ae25185 100644
--- a/src/lithic/types/event.py
+++ b/src/lithic/types/event.py
@@ -37,6 +37,7 @@ class Event(BaseModel):
"card_transaction.updated",
"card.converted",
"card.created",
+ "card.pin_updated",
"card.reissued",
"card.renewed",
"card.shipped",
@@ -112,6 +113,8 @@ class Event(BaseModel):
- card.converted: Occurs when a card is converted from virtual to physical
cards.
- card.created: Occurs when a new card is created.
+ - card.pin_updated: Occurs when a card's PIN is set, changed, unblocked, or
+ blocked due to excessive incorrect PIN attempts.
- card.reissued: Occurs when a card is reissued.
- card.renewed: Occurs when a card is renewed.
- card.shipped: Occurs when a card is shipped.
diff --git a/src/lithic/types/event_list_params.py b/src/lithic/types/event_list_params.py
index 8f4b11ef..a162c6b2 100644
--- a/src/lithic/types/event_list_params.py
+++ b/src/lithic/types/event_list_params.py
@@ -47,6 +47,7 @@ class EventListParams(TypedDict, total=False):
"card_transaction.updated",
"card.converted",
"card.created",
+ "card.pin_updated",
"card.reissued",
"card.renewed",
"card.shipped",
diff --git a/src/lithic/types/event_subscription.py b/src/lithic/types/event_subscription.py
index a8349d20..39384f23 100644
--- a/src/lithic/types/event_subscription.py
+++ b/src/lithic/types/event_subscription.py
@@ -40,6 +40,7 @@ class EventSubscription(BaseModel):
"card_transaction.updated",
"card.converted",
"card.created",
+ "card.pin_updated",
"card.reissued",
"card.renewed",
"card.shipped",
diff --git a/src/lithic/types/events/subscription_create_params.py b/src/lithic/types/events/subscription_create_params.py
index 00f5ccbf..6ae0e7d7 100644
--- a/src/lithic/types/events/subscription_create_params.py
+++ b/src/lithic/types/events/subscription_create_params.py
@@ -35,6 +35,7 @@ class SubscriptionCreateParams(TypedDict, total=False):
"card_transaction.updated",
"card.converted",
"card.created",
+ "card.pin_updated",
"card.reissued",
"card.renewed",
"card.shipped",
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 5fdb92c0..8013dee6 100644
--- a/src/lithic/types/events/subscription_send_simulated_example_params.py
+++ b/src/lithic/types/events/subscription_send_simulated_example_params.py
@@ -24,6 +24,7 @@ class SubscriptionSendSimulatedExampleParams(TypedDict, total=False):
"card_transaction.updated",
"card.converted",
"card.created",
+ "card.pin_updated",
"card.reissued",
"card.renewed",
"card.shipped",
diff --git a/src/lithic/types/events/subscription_update_params.py b/src/lithic/types/events/subscription_update_params.py
index 6571ac66..53fa683d 100644
--- a/src/lithic/types/events/subscription_update_params.py
+++ b/src/lithic/types/events/subscription_update_params.py
@@ -35,6 +35,7 @@ class SubscriptionUpdateParams(TypedDict, total=False):
"card_transaction.updated",
"card.converted",
"card.created",
+ "card.pin_updated",
"card.reissued",
"card.renewed",
"card.shipped",
diff --git a/src/lithic/types/external_payment.py b/src/lithic/types/external_payment.py
index 47264c7d..367a184d 100644
--- a/src/lithic/types/external_payment.py
+++ b/src/lithic/types/external_payment.py
@@ -55,6 +55,11 @@ class Event(BaseModel):
"EXTERNAL_RTP_SETTLED",
"EXTERNAL_RTP_REVERSED",
"EXTERNAL_RTP_RELEASED",
+ "EXTERNAL_STABLECOIN_INITIATED",
+ "EXTERNAL_STABLECOIN_CANCELED",
+ "EXTERNAL_STABLECOIN_SETTLED",
+ "EXTERNAL_STABLECOIN_REVERSED",
+ "EXTERNAL_STABLECOIN_RELEASED",
]
@@ -73,7 +78,13 @@ class ExternalPayment(BaseModel):
category: Optional[
Literal[
- "EXTERNAL_WIRE", "EXTERNAL_ACH", "EXTERNAL_CHECK", "EXTERNAL_FEDNOW", "EXTERNAL_RTP", "EXTERNAL_TRANSFER"
+ "EXTERNAL_WIRE",
+ "EXTERNAL_ACH",
+ "EXTERNAL_CHECK",
+ "EXTERNAL_FEDNOW",
+ "EXTERNAL_RTP",
+ "EXTERNAL_STABLECOIN",
+ "EXTERNAL_TRANSFER",
]
] = None
diff --git a/src/lithic/types/external_payment_create_params.py b/src/lithic/types/external_payment_create_params.py
index 294244e9..9ed6d55f 100644
--- a/src/lithic/types/external_payment_create_params.py
+++ b/src/lithic/types/external_payment_create_params.py
@@ -16,7 +16,13 @@ class ExternalPaymentCreateParams(TypedDict, total=False):
category: Required[
Literal[
- "EXTERNAL_WIRE", "EXTERNAL_ACH", "EXTERNAL_CHECK", "EXTERNAL_FEDNOW", "EXTERNAL_RTP", "EXTERNAL_TRANSFER"
+ "EXTERNAL_WIRE",
+ "EXTERNAL_ACH",
+ "EXTERNAL_CHECK",
+ "EXTERNAL_FEDNOW",
+ "EXTERNAL_RTP",
+ "EXTERNAL_STABLECOIN",
+ "EXTERNAL_TRANSFER",
]
]
diff --git a/src/lithic/types/external_payment_list_params.py b/src/lithic/types/external_payment_list_params.py
index 13c3710b..09c4ce48 100644
--- a/src/lithic/types/external_payment_list_params.py
+++ b/src/lithic/types/external_payment_list_params.py
@@ -21,7 +21,13 @@ class ExternalPaymentListParams(TypedDict, total=False):
business_account_token: str
category: Literal[
- "EXTERNAL_WIRE", "EXTERNAL_ACH", "EXTERNAL_CHECK", "EXTERNAL_FEDNOW", "EXTERNAL_RTP", "EXTERNAL_TRANSFER"
+ "EXTERNAL_WIRE",
+ "EXTERNAL_ACH",
+ "EXTERNAL_CHECK",
+ "EXTERNAL_FEDNOW",
+ "EXTERNAL_RTP",
+ "EXTERNAL_STABLECOIN",
+ "EXTERNAL_TRANSFER",
]
"""The external rail the funds moved on"""
diff --git a/src/lithic/types/financial_accounts/__init__.py b/src/lithic/types/financial_accounts/__init__.py
index 1938293c..cdbb7060 100644
--- a/src/lithic/types/financial_accounts/__init__.py
+++ b/src/lithic/types/financial_accounts/__init__.py
@@ -5,12 +5,17 @@
from .loan_tape import LoanTape as LoanTape
from .statement import Statement as Statement
from .statements import Statements as Statements
+from .open_to_buy import OpenToBuy as OpenToBuy
+from .installment_plan import InstallmentPlan as InstallmentPlan
from .category_balances import CategoryBalances as CategoryBalances
from .balance_list_params import BalanceListParams as BalanceListParams
+from .open_to_buy_summary import OpenToBuySummary as OpenToBuySummary
from .loan_tape_list_params import LoanTapeListParams as LoanTapeListParams
from .statement_list_params import StatementListParams as StatementListParams
from .interest_tier_schedule import InterestTierSchedule as InterestTierSchedule
from .loan_tape_configuration import LoanTapeConfiguration as LoanTapeConfiguration
+from .installment_plan_list_params import InstallmentPlanListParams as InstallmentPlanListParams
+from .transaction_category_balances import TransactionCategoryBalances as TransactionCategoryBalances
from .financial_account_credit_config import FinancialAccountCreditConfig as FinancialAccountCreditConfig
from .loan_tape_rebuild_configuration import LoanTapeRebuildConfiguration as LoanTapeRebuildConfiguration
from .financial_transaction_list_params import FinancialTransactionListParams as FinancialTransactionListParams
diff --git a/src/lithic/types/financial_accounts/installment_plan.py b/src/lithic/types/financial_accounts/installment_plan.py
new file mode 100644
index 00000000..aea7a29d
--- /dev/null
+++ b/src/lithic/types/financial_accounts/installment_plan.py
@@ -0,0 +1,120 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import datetime
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transaction_category_balances import TransactionCategoryBalances
+
+__all__ = ["InstallmentPlan", "Installment", "InstallmentPayment"]
+
+
+class InstallmentPayment(BaseModel):
+ amount: int
+ """Amount applied to the installment in cents"""
+
+ amount_details: TransactionCategoryBalances
+
+ date: datetime.date
+ """Date the payment was applied to the installment"""
+
+
+class Installment(BaseModel):
+ amount_due: int
+ """Amount the installment was opened for in cents"""
+
+ amount_due_details: TransactionCategoryBalances
+
+ amount_outstanding: int
+ """Amount still owed on the installment in cents"""
+
+ amount_outstanding_details: TransactionCategoryBalances
+
+ amount_paid: int
+ """Amount paid towards the installment in cents"""
+
+ amount_paid_details: TransactionCategoryBalances
+
+ date_assessed: Optional[datetime.date] = None
+ """
+ Date the installment was actually assessed onto the account, or null if it has
+ not been assessed yet
+ """
+
+ due_date: datetime.date
+ """Date the installment is scheduled to be assessed onto the account"""
+
+ installment_num: int
+ """Position of this installment within the plan, starting at 0"""
+
+ payment_due_date: datetime.date
+ """Date the installment must be paid by before it is considered past due"""
+
+ payments: List[InstallmentPayment]
+ """Payments applied to this installment, oldest first"""
+
+
+class InstallmentPlan(BaseModel):
+ token: str
+ """Globally unique identifier for an installment plan"""
+
+ closed_at: Optional[datetime.date] = None
+ """Date the plan was paid off or cancelled, or null while it is still open"""
+
+ created: datetime.datetime
+ """Timestamp of when the installment plan was created"""
+
+ fee_amount: int
+ """Enrollment fee charged when the plan was created in cents"""
+
+ financial_account_token: str
+ """Globally unique identifier for a financial account"""
+
+ installment_plan_total: int
+ """Total owed on the plan in cents, the principal amount plus the enrollment fee"""
+
+ installments: List[Installment]
+ """Installments that make up the plan, oldest first"""
+
+ installments_outstanding: int
+ """Number of installments that still carry a balance"""
+
+ installments_paid: int
+ """Number of installments that have been paid off"""
+
+ num_installments: int
+ """Number of installments the plan is broken into"""
+
+ principal_amount: int
+ """Balance the plan was opened on in cents, excluding the enrollment fee"""
+
+ source_amounts: Optional[TransactionCategoryBalances] = None
+ """
+ Balance the plan was opened on, broken out by category, or null if it was not
+ recorded
+ """
+
+ source_id: str
+ """
+ Identifier of the record the plan was opened from, such as the closing statement
+ for an unpaid balance
+ """
+
+ source_type: Literal["UNPAID_BALANCE", "TRANSACTION"]
+
+ start_date: datetime.date
+ """Date the plan was created"""
+
+ state: Literal["PENDING", "ACTIVE", "REBUILD_IN_PROGRESS", "FULLY_PAID", "CANCELLED"]
+ """State of the installment plan.
+
+ A plan is REBUILD_IN_PROGRESS while its loan tapes are being rebuilt, during
+ which its payment totals are being recomputed and should not be treated as final
+ """
+
+ total_paid: int
+ """Amount paid towards the plan to date in cents"""
+
+ updated: datetime.datetime
+ """Timestamp of when the installment plan was updated"""
diff --git a/src/lithic/types/financial_accounts/installment_plan_list_params.py b/src/lithic/types/financial_accounts/installment_plan_list_params.py
new file mode 100644
index 00000000..85890eff
--- /dev/null
+++ b/src/lithic/types/financial_accounts/installment_plan_list_params.py
@@ -0,0 +1,29 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+from typing_extensions import Literal, TypedDict
+
+__all__ = ["InstallmentPlanListParams"]
+
+
+class InstallmentPlanListParams(TypedDict, total=False):
+ ending_before: str
+ """A cursor representing an item's token before which a page of results should end.
+
+ Used to retrieve the previous page of results before this item.
+ """
+
+ page_size: int
+ """Page size (for pagination)."""
+
+ starting_after: str
+ """A cursor representing an item's token after which a page of results should
+ begin.
+
+ Used to retrieve the next page of results after this item.
+ """
+
+ state: Optional[Literal["PENDING", "ACTIVE", "REBUILD_IN_PROGRESS", "FULLY_PAID", "CANCELLED"]]
+ """Only installment plans in this state will be included."""
diff --git a/src/lithic/types/financial_accounts/open_to_buy.py b/src/lithic/types/financial_accounts/open_to_buy.py
new file mode 100644
index 00000000..26755e9e
--- /dev/null
+++ b/src/lithic/types/financial_accounts/open_to_buy.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ..._models import BaseModel
+from .open_to_buy_summary import OpenToBuySummary
+
+__all__ = ["OpenToBuy"]
+
+
+class OpenToBuy(BaseModel):
+ """Open to Buy"""
+
+ open_to_buy: int
+ """
+ Funds available for card spend backed by this Security Account, in the
+ currency's smallest unit (e.g., cents for USD). Equal to the sum of the amounts
+ in `summary`, and reaches zero once outstanding spend has consumed all available
+ funding
+ """
+
+ summary: OpenToBuySummary
+ """Balances that open to buy is derived from"""
diff --git a/src/lithic/types/financial_accounts/open_to_buy_summary.py b/src/lithic/types/financial_accounts/open_to_buy_summary.py
new file mode 100644
index 00000000..5b9d8eaf
--- /dev/null
+++ b/src/lithic/types/financial_accounts/open_to_buy_summary.py
@@ -0,0 +1,33 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+
+__all__ = ["OpenToBuySummary"]
+
+
+class OpenToBuySummary(BaseModel):
+ """Open to Buy Summary"""
+
+ security: int
+ """
+ Available balance of the Security Account backing card spend, in the currency's
+ smallest unit (e.g., cents for USD)
+ """
+
+ settled_funds: Optional[int] = None
+ """
+ Funding that has moved out of the Security Account to cover card spend Lithic
+ has already paid out to the networks, in the currency's smallest unit (e.g.,
+ cents for USD). Open to buy counts it alongside `security`, and it clears once
+ collected from your business clients. Only Commercial Charge tracks this
+ separately, so this is `null` for every other program setup
+ """
+
+ total_outstanding_spend: int
+ """
+ Customer card spend that has not yet been collected, in the currency's smallest
+ unit (e.g., cents for USD). Reported as a negative amount, because it reduces
+ open to buy
+ """
diff --git a/src/lithic/types/financial_accounts/statements/statement_line_items.py b/src/lithic/types/financial_accounts/statements/statement_line_items.py
index d62c53bf..7f10bab7 100644
--- a/src/lithic/types/financial_accounts/statements/statement_line_items.py
+++ b/src/lithic/types/financial_accounts/statements/statement_line_items.py
@@ -31,6 +31,7 @@ class Data(BaseModel):
"EXTERNAL_CHECK",
"EXTERNAL_FEDNOW",
"EXTERNAL_RTP",
+ "EXTERNAL_STABLECOIN",
"EXTERNAL_TRANSFER",
"EXTERNAL_WIRE",
"MANAGEMENT_ADJUSTMENT",
@@ -114,6 +115,11 @@ class Data(BaseModel):
"EXTERNAL_RTP_RELEASED",
"EXTERNAL_RTP_REVERSED",
"EXTERNAL_RTP_SETTLED",
+ "EXTERNAL_STABLECOIN_CANCELED",
+ "EXTERNAL_STABLECOIN_INITIATED",
+ "EXTERNAL_STABLECOIN_RELEASED",
+ "EXTERNAL_STABLECOIN_REVERSED",
+ "EXTERNAL_STABLECOIN_SETTLED",
"EXTERNAL_TRANSFER_CANCELED",
"EXTERNAL_TRANSFER_INITIATED",
"EXTERNAL_TRANSFER_RELEASED",
@@ -124,8 +130,12 @@ class Data(BaseModel):
"EXTERNAL_WIRE_RELEASED",
"EXTERNAL_WIRE_REVERSED",
"EXTERNAL_WIRE_SETTLED",
+ "FEE",
+ "FEE_REVERSAL",
"FINANCIAL_AUTHORIZATION",
"FINANCIAL_CREDIT_AUTHORIZATION",
+ "INSTALLMENT_FEE",
+ "INSTALLMENT_FEE_REVERSAL",
"INTEREST",
"INTEREST_REVERSAL",
"INTERNAL_ADJUSTMENT",
diff --git a/src/lithic/types/financial_accounts/transaction_category_balances.py b/src/lithic/types/financial_accounts/transaction_category_balances.py
new file mode 100644
index 00000000..0b352ab9
--- /dev/null
+++ b/src/lithic/types/financial_accounts/transaction_category_balances.py
@@ -0,0 +1,17 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ..._models import BaseModel
+from .category_balances import CategoryBalances
+
+__all__ = ["TransactionCategoryBalances"]
+
+
+class TransactionCategoryBalances(BaseModel):
+ balance_transfers: CategoryBalances
+ """Amounts attributable to balance transfers"""
+
+ cash_advances: CategoryBalances
+ """Amounts attributable to cash advances"""
+
+ purchases: CategoryBalances
+ """Amounts attributable to purchases"""
diff --git a/src/lithic/types/management_operation_create_params.py b/src/lithic/types/management_operation_create_params.py
index 2c1cdbc1..5595b308 100644
--- a/src/lithic/types/management_operation_create_params.py
+++ b/src/lithic/types/management_operation_create_params.py
@@ -37,6 +37,8 @@ class ManagementOperationCreateParams(TypedDict, total=False):
"CURRENCY_CONVERSION_REVERSAL",
"INTEREST",
"INTEREST_REVERSAL",
+ "INSTALLMENT_FEE",
+ "INSTALLMENT_FEE_REVERSAL",
"LATE_PAYMENT",
"LATE_PAYMENT_REVERSAL",
"BILLING_ERROR",
@@ -55,6 +57,8 @@ class ManagementOperationCreateParams(TypedDict, total=False):
"QUARTERLY_REVERSAL",
"MONTHLY",
"MONTHLY_REVERSAL",
+ "FEE",
+ "FEE_REVERSAL",
]
]
diff --git a/src/lithic/types/management_operation_transaction.py b/src/lithic/types/management_operation_transaction.py
index 16b8134a..68d4f01e 100644
--- a/src/lithic/types/management_operation_transaction.py
+++ b/src/lithic/types/management_operation_transaction.py
@@ -33,6 +33,8 @@ class Event(BaseModel):
"CURRENCY_CONVERSION_REVERSAL",
"INTEREST",
"INTEREST_REVERSAL",
+ "INSTALLMENT_FEE",
+ "INSTALLMENT_FEE_REVERSAL",
"LATE_PAYMENT",
"LATE_PAYMENT_REVERSAL",
"BILLING_ERROR",
@@ -51,6 +53,8 @@ class Event(BaseModel):
"QUARTERLY_REVERSAL",
"MONTHLY",
"MONTHLY_REVERSAL",
+ "FEE",
+ "FEE_REVERSAL",
]
subtype: Optional[str] = None
diff --git a/src/lithic/types/parsed_webhook_event.py b/src/lithic/types/parsed_webhook_event.py
index 3959e4a3..c0a535b2 100644
--- a/src/lithic/types/parsed_webhook_event.py
+++ b/src/lithic/types/parsed_webhook_event.py
@@ -17,6 +17,7 @@
from .card_converted_webhook_event import CardConvertedWebhookEvent
from .balance_updated_webhook_event import BalanceUpdatedWebhookEvent
from .dispute_updated_webhook_event import DisputeUpdatedWebhookEvent
+from .card_pin_updated_webhook_event import CardPinUpdatedWebhookEvent
from .loan_tape_created_webhook_event import LoanTapeCreatedWebhookEvent
from .loan_tape_updated_webhook_event import LoanTapeUpdatedWebhookEvent
from .statements_created_webhook_event import StatementsCreatedWebhookEvent
@@ -448,6 +449,7 @@ class LegacyPayload(BaseModel):
BookTransferTransactionUpdatedWebhookEvent,
CardCreatedWebhookEvent,
CardConvertedWebhookEvent,
+ CardPinUpdatedWebhookEvent,
CardRenewedWebhookEvent,
CardReissuedWebhookEvent,
CardShippedWebhookEvent,
diff --git a/src/lithic/types/payment.py b/src/lithic/types/payment.py
index 3b89c17c..63708ea5 100644
--- a/src/lithic/types/payment.py
+++ b/src/lithic/types/payment.py
@@ -273,6 +273,7 @@ class Payment(BaseModel):
"EXTERNAL_CHECK",
"EXTERNAL_FEDNOW",
"EXTERNAL_RTP",
+ "EXTERNAL_STABLECOIN",
"EXTERNAL_TRANSFER",
"EXTERNAL_WIRE",
"MANAGEMENT_ADJUSTMENT",
diff --git a/src/lithic/types/payment_create_stablecoin_params.py b/src/lithic/types/payment_create_stablecoin_params.py
new file mode 100644
index 00000000..aaba7e2f
--- /dev/null
+++ b/src/lithic/types/payment_create_stablecoin_params.py
@@ -0,0 +1,46 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["PaymentCreateStablecoinParams", "Hold"]
+
+
+class PaymentCreateStablecoinParams(TypedDict, total=False):
+ amount: Required[int]
+ """Payout amount in cents"""
+
+ blockchain_recipient_token: Required[str]
+ """Token of the blockchain recipient to send the payout to.
+
+ The recipient must be in the `ENABLED` verification state
+ """
+
+ financial_account_token: Required[str]
+ """Token of the financial account the payout is funded from"""
+
+ type: Required[Literal["PAYMENT"]]
+ """Direction of the payment. Stablecoin supports payouts only"""
+
+ token: str
+ """Customer-provided token that will serve as an idempotency token.
+
+ This token will become the transaction token
+ """
+
+ hold: Hold
+ """Optional hold to settle when this payout is initiated"""
+
+ memo: str
+ """Memo recorded on the payout.
+
+ Defaults to `Stablecoin payout on ` when omitted
+ """
+
+
+class Hold(TypedDict, total=False):
+ """Optional hold to settle when this payout is initiated"""
+
+ token: Required[str]
+ """Token of the hold to settle when this payout is initiated"""
diff --git a/src/lithic/types/payment_create_stablecoin_response.py b/src/lithic/types/payment_create_stablecoin_response.py
new file mode 100644
index 00000000..54d6938c
--- /dev/null
+++ b/src/lithic/types/payment_create_stablecoin_response.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from .balance import Balance
+from .payment import Payment
+
+__all__ = ["PaymentCreateStablecoinResponse"]
+
+
+class PaymentCreateStablecoinResponse(Payment):
+ """Payment transaction"""
+
+ balance: Optional[Balance] = None
+ """Balance"""
diff --git a/src/lithic/types/payment_list_params.py b/src/lithic/types/payment_list_params.py
index 6c4fe92e..0723ace5 100644
--- a/src/lithic/types/payment_list_params.py
+++ b/src/lithic/types/payment_list_params.py
@@ -22,7 +22,7 @@ class PaymentListParams(TypedDict, total=False):
business_account_token: str
- category: Literal["ACH"]
+ category: Literal["ACH", "STABLECOIN"]
end: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
"""Date string in RFC 3339 format.
diff --git a/src/lithic/types/payment_retry_params.py b/src/lithic/types/payment_retry_params.py
new file mode 100644
index 00000000..fc0400b5
--- /dev/null
+++ b/src/lithic/types/payment_retry_params.py
@@ -0,0 +1,17 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, TypedDict
+
+__all__ = ["PaymentRetryParams"]
+
+
+class PaymentRetryParams(TypedDict, total=False):
+ method: Literal["ACH_NEXT_DAY", "ACH_SAME_DAY"]
+ """Settlement speed to retry the payment at.
+
+ Defaults to the original payment's method. An `ACH_SAME_DAY` retry is rejected
+ if the payment is for $1,000,000.00 or more, or if it is submitted after the
+ same day ACH cutoff
+ """
diff --git a/src/lithic/types/payment_simulate_action_params.py b/src/lithic/types/payment_simulate_action_params.py
index b5500957..37581dc4 100644
--- a/src/lithic/types/payment_simulate_action_params.py
+++ b/src/lithic/types/payment_simulate_action_params.py
@@ -24,6 +24,7 @@ class PaymentSimulateActionParams(TypedDict, total=False):
"ACH_RETURN_INITIATED",
"ACH_RETURN_PROCESSED",
"ACH_RETURN_SETTLED",
+ "STABLECOIN_REVIEWED",
]
]
"""Event Type"""
diff --git a/src/lithic/types/shared/financial_event.py b/src/lithic/types/shared/financial_event.py
index 9d677eb0..ba5b9f7f 100644
--- a/src/lithic/types/shared/financial_event.py
+++ b/src/lithic/types/shared/financial_event.py
@@ -85,6 +85,11 @@ class FinancialEvent(BaseModel):
"EXTERNAL_RTP_RELEASED",
"EXTERNAL_RTP_REVERSED",
"EXTERNAL_RTP_SETTLED",
+ "EXTERNAL_STABLECOIN_CANCELED",
+ "EXTERNAL_STABLECOIN_INITIATED",
+ "EXTERNAL_STABLECOIN_RELEASED",
+ "EXTERNAL_STABLECOIN_REVERSED",
+ "EXTERNAL_STABLECOIN_SETTLED",
"EXTERNAL_TRANSFER_CANCELED",
"EXTERNAL_TRANSFER_INITIATED",
"EXTERNAL_TRANSFER_RELEASED",
@@ -95,8 +100,12 @@ class FinancialEvent(BaseModel):
"EXTERNAL_WIRE_RELEASED",
"EXTERNAL_WIRE_REVERSED",
"EXTERNAL_WIRE_SETTLED",
+ "FEE",
+ "FEE_REVERSAL",
"FINANCIAL_AUTHORIZATION",
"FINANCIAL_CREDIT_AUTHORIZATION",
+ "INSTALLMENT_FEE",
+ "INSTALLMENT_FEE_REVERSAL",
"INTEREST",
"INTEREST_REVERSAL",
"INTERNAL_ADJUSTMENT",
diff --git a/src/lithic/types/three_ds_authentication.py b/src/lithic/types/three_ds_authentication.py
index 3aebc6f8..81b37b74 100644
--- a/src/lithic/types/three_ds_authentication.py
+++ b/src/lithic/types/three_ds_authentication.py
@@ -17,6 +17,7 @@
"App",
"Browser",
"ChallengeMetadata",
+ "Psd2Context",
"Transaction",
]
@@ -401,6 +402,61 @@ class ChallengeMetadata(BaseModel):
"""The phone number used for delivering the OTP. Relevant only for SMS_OTP method."""
+class Psd2Context(BaseModel):
+ """PSD2/SCA context for EEA and UK transactions.
+
+ Present when Lithic determines the transaction is in scope for PSD2 Strong Customer Authentication. Absent for out-of-scope transactions.
+ """
+
+ acquirer_exemption: Optional[
+ Literal[
+ "NONE",
+ "TRANSACTION_RISK_ANALYSIS",
+ "LOW_VALUE",
+ "RECURRING_PAYMENT",
+ "MERCHANT_INITIATED_TRANSACTION",
+ "TRUSTED_BENEFICIARY",
+ "STRONG_CUSTOMER_AUTHENTICATION_DELEGATION",
+ "SECURE_CORPORATE_PAYMENT",
+ "AUTHENTICATION_OUTAGE_EXCEPTION",
+ "BUNDLED",
+ ]
+ ] = None
+ """SCA exemption declared by the acquirer in the 3DS authentication request.
+
+ - `NONE` - No exemption claimed
+ - `TRANSACTION_RISK_ANALYSIS` - Transaction Risk Analysis (TRA) exemption;
+ acquirer asserts low fraud risk
+ - `LOW_VALUE` - Low-value payment exemption; transaction is below the EUR 30
+ threshold
+ - `RECURRING_PAYMENT` - Recurring payment with a fixed amount to the same payee
+ - `MERCHANT_INITIATED_TRANSACTION` - Merchant-initiated transaction (MIT);
+ cardholder not present
+ - `TRUSTED_BENEFICIARY` - Trusted beneficiary; merchant is on cardholder's
+ whitelist
+ - `STRONG_CUSTOMER_AUTHENTICATION_DELEGATION` - SCA already performed by a
+ delegated third-party authenticator
+ - `SECURE_CORPORATE_PAYMENT` - Secure corporate payment using a dedicated
+ corporate card or process
+ - `AUTHENTICATION_OUTAGE_EXCEPTION` - Authentication outage exception;
+ scheme-level fallback during ACS downtime
+ - `BUNDLED` - Mastercard only; bundled exemption code where the exact exemption
+ type cannot be distinguished
+ """
+
+ lithic_exemption_validation: Optional[Literal["ACCEPTED", "REJECTED", "NOT_VALIDATED"]] = None
+ """Lithic's validation of the acquirer-declared exemption.
+
+ Absent when no acquirer exemption was declared.
+
+ - `ACCEPTED` - Lithic signals support the acquirer's claim
+ - `REJECTED` - Lithic signals contradict the claim, or a required signal is
+ missing
+ - `NOT_VALIDATED` - Exemption was declared but Lithic has no basis to evaluate
+ it; treated as `REJECTED` for challenge purposes
+ """
+
+
class Transaction(BaseModel):
"""
Object containing data about the e-commerce transaction for which the merchant is requesting authentication.
@@ -593,6 +649,13 @@ class ThreeDSAuthentication(BaseModel):
(e.g. in-flight customer decisioning request).
"""
+ psd2_context: Optional[Psd2Context] = None
+ """PSD2/SCA context for EEA and UK transactions.
+
+ Present when Lithic determines the transaction is in scope for PSD2 Strong
+ Customer Authentication. Absent for out-of-scope transactions.
+ """
+
three_ri_request_type: Optional[
Literal[
"ACCOUNT_VERIFICATION",
diff --git a/src/lithic/types/transaction.py b/src/lithic/types/transaction.py
index a12e94df..6cffa54c 100644
--- a/src/lithic/types/transaction.py
+++ b/src/lithic/types/transaction.py
@@ -450,6 +450,7 @@ class EventRuleResult(BaseModel):
"PROGRAM_SUSPENDED",
"PROGRAM_USAGE_RESTRICTION",
"REVERSAL_UNMATCHED",
+ "SCA_REQUIRED",
"SECURITY_VIOLATION",
"SINGLE_USE_CARD_REATTEMPTED",
"SUSPECTED_FRAUD",
@@ -565,6 +566,7 @@ class Event(BaseModel):
"PROGRAM_SUSPENDED",
"PROGRAM_USAGE_RESTRICTION",
"REVERSAL_UNMATCHED",
+ "SCA_REQUIRED",
"SECURITY_VIOLATION",
"SINGLE_USE_CARD_REATTEMPTED",
"SUSPECTED_FRAUD",
diff --git a/tests/api_resources/financial_accounts/test_installment_plans.py b/tests/api_resources/financial_accounts/test_installment_plans.py
new file mode 100644
index 00000000..807d5867
--- /dev/null
+++ b/tests/api_resources/financial_accounts/test_installment_plans.py
@@ -0,0 +1,231 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from lithic import Lithic, AsyncLithic
+from tests.utils import assert_matches_type
+from lithic.pagination import SyncCursorPage, AsyncCursorPage
+from lithic.types.financial_accounts import InstallmentPlan
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestInstallmentPlans:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_retrieve(self, client: Lithic) -> None:
+ installment_plan = client.financial_accounts.installment_plans.retrieve(
+ installment_plan_token="installment_plan_token",
+ financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(InstallmentPlan, installment_plan, path=["response"])
+
+ @parametrize
+ def test_raw_response_retrieve(self, client: Lithic) -> None:
+ response = client.financial_accounts.installment_plans.with_raw_response.retrieve(
+ installment_plan_token="installment_plan_token",
+ financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ installment_plan = response.parse()
+ assert_matches_type(InstallmentPlan, installment_plan, path=["response"])
+
+ @parametrize
+ def test_streaming_response_retrieve(self, client: Lithic) -> None:
+ with client.financial_accounts.installment_plans.with_streaming_response.retrieve(
+ installment_plan_token="installment_plan_token",
+ financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ installment_plan = response.parse()
+ assert_matches_type(InstallmentPlan, installment_plan, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_retrieve(self, client: Lithic) -> None:
+ with pytest.raises(
+ ValueError, match=r"Expected a non-empty value for `financial_account_token` but received ''"
+ ):
+ client.financial_accounts.installment_plans.with_raw_response.retrieve(
+ installment_plan_token="installment_plan_token",
+ financial_account_token="",
+ )
+
+ with pytest.raises(
+ ValueError, match=r"Expected a non-empty value for `installment_plan_token` but received ''"
+ ):
+ client.financial_accounts.installment_plans.with_raw_response.retrieve(
+ installment_plan_token="",
+ financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ @parametrize
+ def test_method_list(self, client: Lithic) -> None:
+ installment_plan = client.financial_accounts.installment_plans.list(
+ financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(SyncCursorPage[InstallmentPlan], installment_plan, path=["response"])
+
+ @parametrize
+ def test_method_list_with_all_params(self, client: Lithic) -> None:
+ installment_plan = client.financial_accounts.installment_plans.list(
+ financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ending_before="ending_before",
+ page_size=1,
+ starting_after="starting_after",
+ state="PENDING",
+ )
+ assert_matches_type(SyncCursorPage[InstallmentPlan], installment_plan, path=["response"])
+
+ @parametrize
+ def test_raw_response_list(self, client: Lithic) -> None:
+ response = client.financial_accounts.installment_plans.with_raw_response.list(
+ financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ installment_plan = response.parse()
+ assert_matches_type(SyncCursorPage[InstallmentPlan], installment_plan, path=["response"])
+
+ @parametrize
+ def test_streaming_response_list(self, client: Lithic) -> None:
+ with client.financial_accounts.installment_plans.with_streaming_response.list(
+ financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ installment_plan = response.parse()
+ assert_matches_type(SyncCursorPage[InstallmentPlan], installment_plan, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_list(self, client: Lithic) -> None:
+ with pytest.raises(
+ ValueError, match=r"Expected a non-empty value for `financial_account_token` but received ''"
+ ):
+ client.financial_accounts.installment_plans.with_raw_response.list(
+ financial_account_token="",
+ )
+
+
+class TestAsyncInstallmentPlans:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @parametrize
+ async def test_method_retrieve(self, async_client: AsyncLithic) -> None:
+ installment_plan = await async_client.financial_accounts.installment_plans.retrieve(
+ installment_plan_token="installment_plan_token",
+ financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(InstallmentPlan, installment_plan, path=["response"])
+
+ @parametrize
+ async def test_raw_response_retrieve(self, async_client: AsyncLithic) -> None:
+ response = await async_client.financial_accounts.installment_plans.with_raw_response.retrieve(
+ installment_plan_token="installment_plan_token",
+ financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ installment_plan = response.parse()
+ assert_matches_type(InstallmentPlan, installment_plan, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_retrieve(self, async_client: AsyncLithic) -> None:
+ async with async_client.financial_accounts.installment_plans.with_streaming_response.retrieve(
+ installment_plan_token="installment_plan_token",
+ financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ installment_plan = await response.parse()
+ assert_matches_type(InstallmentPlan, installment_plan, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_retrieve(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(
+ ValueError, match=r"Expected a non-empty value for `financial_account_token` but received ''"
+ ):
+ await async_client.financial_accounts.installment_plans.with_raw_response.retrieve(
+ installment_plan_token="installment_plan_token",
+ financial_account_token="",
+ )
+
+ with pytest.raises(
+ ValueError, match=r"Expected a non-empty value for `installment_plan_token` but received ''"
+ ):
+ await async_client.financial_accounts.installment_plans.with_raw_response.retrieve(
+ installment_plan_token="",
+ financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ @parametrize
+ async def test_method_list(self, async_client: AsyncLithic) -> None:
+ installment_plan = await async_client.financial_accounts.installment_plans.list(
+ financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(AsyncCursorPage[InstallmentPlan], installment_plan, path=["response"])
+
+ @parametrize
+ async def test_method_list_with_all_params(self, async_client: AsyncLithic) -> None:
+ installment_plan = await async_client.financial_accounts.installment_plans.list(
+ financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ending_before="ending_before",
+ page_size=1,
+ starting_after="starting_after",
+ state="PENDING",
+ )
+ assert_matches_type(AsyncCursorPage[InstallmentPlan], installment_plan, path=["response"])
+
+ @parametrize
+ async def test_raw_response_list(self, async_client: AsyncLithic) -> None:
+ response = await async_client.financial_accounts.installment_plans.with_raw_response.list(
+ financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ installment_plan = response.parse()
+ assert_matches_type(AsyncCursorPage[InstallmentPlan], installment_plan, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_list(self, async_client: AsyncLithic) -> None:
+ async with async_client.financial_accounts.installment_plans.with_streaming_response.list(
+ financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ installment_plan = await response.parse()
+ assert_matches_type(AsyncCursorPage[InstallmentPlan], installment_plan, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_list(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(
+ ValueError, match=r"Expected a non-empty value for `financial_account_token` but received ''"
+ ):
+ await async_client.financial_accounts.installment_plans.with_raw_response.list(
+ financial_account_token="",
+ )
diff --git a/tests/api_resources/financial_accounts/test_open_to_buy.py b/tests/api_resources/financial_accounts/test_open_to_buy.py
new file mode 100644
index 00000000..0dc20f6e
--- /dev/null
+++ b/tests/api_resources/financial_accounts/test_open_to_buy.py
@@ -0,0 +1,104 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from lithic import Lithic, AsyncLithic
+from tests.utils import assert_matches_type
+from lithic.types.financial_accounts import OpenToBuy
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestOpenToBuy:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_retrieve(self, client: Lithic) -> None:
+ open_to_buy = client.financial_accounts.open_to_buy.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(OpenToBuy, open_to_buy, path=["response"])
+
+ @parametrize
+ def test_raw_response_retrieve(self, client: Lithic) -> None:
+ response = client.financial_accounts.open_to_buy.with_raw_response.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ open_to_buy = response.parse()
+ assert_matches_type(OpenToBuy, open_to_buy, path=["response"])
+
+ @parametrize
+ def test_streaming_response_retrieve(self, client: Lithic) -> None:
+ with client.financial_accounts.open_to_buy.with_streaming_response.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ open_to_buy = response.parse()
+ assert_matches_type(OpenToBuy, open_to_buy, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_retrieve(self, client: Lithic) -> None:
+ with pytest.raises(
+ ValueError, match=r"Expected a non-empty value for `financial_account_token` but received ''"
+ ):
+ client.financial_accounts.open_to_buy.with_raw_response.retrieve(
+ "",
+ )
+
+
+class TestAsyncOpenToBuy:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @parametrize
+ async def test_method_retrieve(self, async_client: AsyncLithic) -> None:
+ open_to_buy = await async_client.financial_accounts.open_to_buy.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(OpenToBuy, open_to_buy, path=["response"])
+
+ @parametrize
+ async def test_raw_response_retrieve(self, async_client: AsyncLithic) -> None:
+ response = await async_client.financial_accounts.open_to_buy.with_raw_response.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ open_to_buy = response.parse()
+ assert_matches_type(OpenToBuy, open_to_buy, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_retrieve(self, async_client: AsyncLithic) -> None:
+ async with async_client.financial_accounts.open_to_buy.with_streaming_response.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ open_to_buy = await response.parse()
+ assert_matches_type(OpenToBuy, open_to_buy, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_retrieve(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(
+ ValueError, match=r"Expected a non-empty value for `financial_account_token` but received ''"
+ ):
+ await async_client.financial_accounts.open_to_buy.with_raw_response.retrieve(
+ "",
+ )
diff --git a/tests/api_resources/test_blockchain_recipients.py b/tests/api_resources/test_blockchain_recipients.py
index 97b65d38..1f7efa7c 100644
--- a/tests/api_resources/test_blockchain_recipients.py
+++ b/tests/api_resources/test_blockchain_recipients.py
@@ -73,6 +73,46 @@ def test_streaming_response_create(self, client: Lithic) -> None:
assert cast(Any, response.is_closed) is True
+ @parametrize
+ def test_method_retrieve(self, client: Lithic) -> None:
+ blockchain_recipient = client.blockchain_recipients.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(BlockchainRecipient, blockchain_recipient, path=["response"])
+
+ @parametrize
+ def test_raw_response_retrieve(self, client: Lithic) -> None:
+ response = client.blockchain_recipients.with_raw_response.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ blockchain_recipient = response.parse()
+ assert_matches_type(BlockchainRecipient, blockchain_recipient, path=["response"])
+
+ @parametrize
+ def test_streaming_response_retrieve(self, client: Lithic) -> None:
+ with client.blockchain_recipients.with_streaming_response.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ blockchain_recipient = response.parse()
+ assert_matches_type(BlockchainRecipient, blockchain_recipient, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_retrieve(self, client: Lithic) -> None:
+ with pytest.raises(
+ ValueError, match=r"Expected a non-empty value for `blockchain_recipient_token` but received ''"
+ ):
+ client.blockchain_recipients.with_raw_response.retrieve(
+ "",
+ )
+
class TestAsyncBlockchainRecipients:
parametrize = pytest.mark.parametrize(
@@ -134,3 +174,43 @@ async def test_streaming_response_create(self, async_client: AsyncLithic) -> Non
assert_matches_type(BlockchainRecipient, blockchain_recipient, path=["response"])
assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_method_retrieve(self, async_client: AsyncLithic) -> None:
+ blockchain_recipient = await async_client.blockchain_recipients.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(BlockchainRecipient, blockchain_recipient, path=["response"])
+
+ @parametrize
+ async def test_raw_response_retrieve(self, async_client: AsyncLithic) -> None:
+ response = await async_client.blockchain_recipients.with_raw_response.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ blockchain_recipient = response.parse()
+ assert_matches_type(BlockchainRecipient, blockchain_recipient, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_retrieve(self, async_client: AsyncLithic) -> None:
+ async with async_client.blockchain_recipients.with_streaming_response.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ blockchain_recipient = await response.parse()
+ assert_matches_type(BlockchainRecipient, blockchain_recipient, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_retrieve(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(
+ ValueError, match=r"Expected a non-empty value for `blockchain_recipient_token` but received ''"
+ ):
+ await async_client.blockchain_recipients.with_raw_response.retrieve(
+ "",
+ )
diff --git a/tests/api_resources/test_payments.py b/tests/api_resources/test_payments.py
index 40083d6f..c24aebab 100644
--- a/tests/api_resources/test_payments.py
+++ b/tests/api_resources/test_payments.py
@@ -17,6 +17,7 @@
PaymentSimulateReturnResponse,
PaymentSimulateReceiptResponse,
PaymentSimulateReleaseResponse,
+ PaymentCreateStablecoinResponse,
)
from lithic._utils import parse_date, parse_datetime
from lithic.pagination import SyncCursorPage, AsyncCursorPage
@@ -174,17 +175,78 @@ def test_streaming_response_list(self, client: Lithic) -> None:
assert cast(Any, response.is_closed) is True
+ @parametrize
+ def test_method_create_stablecoin(self, client: Lithic) -> None:
+ payment = client.payments.create_stablecoin(
+ amount=1588,
+ blockchain_recipient_token="1e3fdb71-4b52-4a30-a7a9-52c85e26a1d9",
+ financial_account_token="35b0c466-a3e3-519a-9549-ead6a6a2277d",
+ type="PAYMENT",
+ )
+ assert_matches_type(PaymentCreateStablecoinResponse, payment, path=["response"])
+
+ @parametrize
+ def test_method_create_stablecoin_with_all_params(self, client: Lithic) -> None:
+ payment = client.payments.create_stablecoin(
+ amount=1588,
+ blockchain_recipient_token="1e3fdb71-4b52-4a30-a7a9-52c85e26a1d9",
+ financial_account_token="35b0c466-a3e3-519a-9549-ead6a6a2277d",
+ type="PAYMENT",
+ token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ hold={"token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"},
+ memo="Vendor payout",
+ )
+ assert_matches_type(PaymentCreateStablecoinResponse, payment, path=["response"])
+
+ @parametrize
+ def test_raw_response_create_stablecoin(self, client: Lithic) -> None:
+ response = client.payments.with_raw_response.create_stablecoin(
+ amount=1588,
+ blockchain_recipient_token="1e3fdb71-4b52-4a30-a7a9-52c85e26a1d9",
+ financial_account_token="35b0c466-a3e3-519a-9549-ead6a6a2277d",
+ type="PAYMENT",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ payment = response.parse()
+ assert_matches_type(PaymentCreateStablecoinResponse, payment, path=["response"])
+
+ @parametrize
+ def test_streaming_response_create_stablecoin(self, client: Lithic) -> None:
+ with client.payments.with_streaming_response.create_stablecoin(
+ amount=1588,
+ blockchain_recipient_token="1e3fdb71-4b52-4a30-a7a9-52c85e26a1d9",
+ financial_account_token="35b0c466-a3e3-519a-9549-ead6a6a2277d",
+ type="PAYMENT",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ payment = response.parse()
+ assert_matches_type(PaymentCreateStablecoinResponse, payment, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
@parametrize
def test_method_retry(self, client: Lithic) -> None:
payment = client.payments.retry(
- "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ payment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(PaymentRetryResponse, payment, path=["response"])
+
+ @parametrize
+ def test_method_retry_with_all_params(self, client: Lithic) -> None:
+ payment = client.payments.retry(
+ payment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ method="ACH_SAME_DAY",
)
assert_matches_type(PaymentRetryResponse, payment, path=["response"])
@parametrize
def test_raw_response_retry(self, client: Lithic) -> None:
response = client.payments.with_raw_response.retry(
- "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ payment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
assert response.is_closed is True
@@ -195,7 +257,7 @@ def test_raw_response_retry(self, client: Lithic) -> None:
@parametrize
def test_streaming_response_retry(self, client: Lithic) -> None:
with client.payments.with_streaming_response.retry(
- "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ payment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -209,7 +271,7 @@ def test_streaming_response_retry(self, client: Lithic) -> None:
def test_path_params_retry(self, client: Lithic) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `payment_token` but received ''"):
client.payments.with_raw_response.retry(
- "",
+ payment_token="",
)
@parametrize
@@ -598,17 +660,78 @@ async def test_streaming_response_list(self, async_client: AsyncLithic) -> None:
assert cast(Any, response.is_closed) is True
+ @parametrize
+ async def test_method_create_stablecoin(self, async_client: AsyncLithic) -> None:
+ payment = await async_client.payments.create_stablecoin(
+ amount=1588,
+ blockchain_recipient_token="1e3fdb71-4b52-4a30-a7a9-52c85e26a1d9",
+ financial_account_token="35b0c466-a3e3-519a-9549-ead6a6a2277d",
+ type="PAYMENT",
+ )
+ assert_matches_type(PaymentCreateStablecoinResponse, payment, path=["response"])
+
+ @parametrize
+ async def test_method_create_stablecoin_with_all_params(self, async_client: AsyncLithic) -> None:
+ payment = await async_client.payments.create_stablecoin(
+ amount=1588,
+ blockchain_recipient_token="1e3fdb71-4b52-4a30-a7a9-52c85e26a1d9",
+ financial_account_token="35b0c466-a3e3-519a-9549-ead6a6a2277d",
+ type="PAYMENT",
+ token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ hold={"token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"},
+ memo="Vendor payout",
+ )
+ assert_matches_type(PaymentCreateStablecoinResponse, payment, path=["response"])
+
+ @parametrize
+ async def test_raw_response_create_stablecoin(self, async_client: AsyncLithic) -> None:
+ response = await async_client.payments.with_raw_response.create_stablecoin(
+ amount=1588,
+ blockchain_recipient_token="1e3fdb71-4b52-4a30-a7a9-52c85e26a1d9",
+ financial_account_token="35b0c466-a3e3-519a-9549-ead6a6a2277d",
+ type="PAYMENT",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ payment = response.parse()
+ assert_matches_type(PaymentCreateStablecoinResponse, payment, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_create_stablecoin(self, async_client: AsyncLithic) -> None:
+ async with async_client.payments.with_streaming_response.create_stablecoin(
+ amount=1588,
+ blockchain_recipient_token="1e3fdb71-4b52-4a30-a7a9-52c85e26a1d9",
+ financial_account_token="35b0c466-a3e3-519a-9549-ead6a6a2277d",
+ type="PAYMENT",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ payment = await response.parse()
+ assert_matches_type(PaymentCreateStablecoinResponse, payment, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
@parametrize
async def test_method_retry(self, async_client: AsyncLithic) -> None:
payment = await async_client.payments.retry(
- "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ payment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(PaymentRetryResponse, payment, path=["response"])
+
+ @parametrize
+ async def test_method_retry_with_all_params(self, async_client: AsyncLithic) -> None:
+ payment = await async_client.payments.retry(
+ payment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ method="ACH_SAME_DAY",
)
assert_matches_type(PaymentRetryResponse, payment, path=["response"])
@parametrize
async def test_raw_response_retry(self, async_client: AsyncLithic) -> None:
response = await async_client.payments.with_raw_response.retry(
- "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ payment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
assert response.is_closed is True
@@ -619,7 +742,7 @@ async def test_raw_response_retry(self, async_client: AsyncLithic) -> None:
@parametrize
async def test_streaming_response_retry(self, async_client: AsyncLithic) -> None:
async with async_client.payments.with_streaming_response.retry(
- "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ payment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -633,7 +756,7 @@ async def test_streaming_response_retry(self, async_client: AsyncLithic) -> None
async def test_path_params_retry(self, async_client: AsyncLithic) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `payment_token` but received ''"):
await async_client.payments.with_raw_response.retry(
- "",
+ payment_token="",
)
@parametrize