Skip to content

Commit 1af31f0

Browse files
feat(api): add card_authorization.challenge_response webhook event
1 parent 223a337 commit 1af31f0

13 files changed

Lines changed: 62 additions & 2 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 189
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-fd53f07a8b1f148011972d7eba834d5995778d707ff8ef1ead92580b44142a15.yml
3-
openapi_spec_hash: 45892e6361542824364d82181d4eb80d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-28c9b43d3182bf0e1c9635f6100e4995a744724db1edd635cfd3fc7702ced68c.yml
3+
openapi_spec_hash: aba00a65f877c5095499d9d1a66b5e5f
44
config_hash: 5eca052bb23d273fa970eac3127dd919

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,7 @@ from lithic.types import (
888888
AccountHolderVerificationWebhookEvent,
889889
AccountHolderDocumentUpdatedWebhookEvent,
890890
CardAuthorizationApprovalRequestWebhookEvent,
891+
CardAuthorizationChallengeResponseWebhookEvent,
891892
AuthRulesBacktestReportCreatedWebhookEvent,
892893
BalanceUpdatedWebhookEvent,
893894
BookTransferTransactionCreatedWebhookEvent,

src/lithic/resources/events/events.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def list(
116116
"balance.updated",
117117
"book_transfer_transaction.created",
118118
"book_transfer_transaction.updated",
119+
"card_authorization.challenge_response",
119120
"card_transaction.enhanced_data.created",
120121
"card_transaction.enhanced_data.updated",
121122
"card_transaction.updated",
@@ -390,6 +391,7 @@ def list(
390391
"balance.updated",
391392
"book_transfer_transaction.created",
392393
"book_transfer_transaction.updated",
394+
"card_authorization.challenge_response",
393395
"card_transaction.enhanced_data.created",
394396
"card_transaction.enhanced_data.updated",
395397
"card_transaction.updated",

src/lithic/resources/events/subscriptions.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def create(
6868
"balance.updated",
6969
"book_transfer_transaction.created",
7070
"book_transfer_transaction.updated",
71+
"card_authorization.challenge_response",
7172
"card_transaction.enhanced_data.created",
7273
"card_transaction.enhanced_data.updated",
7374
"card_transaction.updated",
@@ -214,6 +215,7 @@ def update(
214215
"balance.updated",
215216
"book_transfer_transaction.created",
216217
"book_transfer_transaction.updated",
218+
"card_authorization.challenge_response",
217219
"card_transaction.enhanced_data.created",
218220
"card_transaction.enhanced_data.updated",
219221
"card_transaction.updated",
@@ -683,6 +685,7 @@ def send_simulated_example(
683685
"balance.updated",
684686
"book_transfer_transaction.created",
685687
"book_transfer_transaction.updated",
688+
"card_authorization.challenge_response",
686689
"card_transaction.enhanced_data.created",
687690
"card_transaction.enhanced_data.updated",
688691
"card_transaction.updated",
@@ -806,6 +809,7 @@ async def create(
806809
"balance.updated",
807810
"book_transfer_transaction.created",
808811
"book_transfer_transaction.updated",
812+
"card_authorization.challenge_response",
809813
"card_transaction.enhanced_data.created",
810814
"card_transaction.enhanced_data.updated",
811815
"card_transaction.updated",
@@ -952,6 +956,7 @@ async def update(
952956
"balance.updated",
953957
"book_transfer_transaction.created",
954958
"book_transfer_transaction.updated",
959+
"card_authorization.challenge_response",
955960
"card_transaction.enhanced_data.created",
956961
"card_transaction.enhanced_data.updated",
957962
"card_transaction.updated",
@@ -1421,6 +1426,7 @@ async def send_simulated_example(
14211426
"balance.updated",
14221427
"book_transfer_transaction.created",
14231428
"book_transfer_transaction.updated",
1429+
"card_authorization.challenge_response",
14241430
"card_transaction.enhanced_data.created",
14251431
"card_transaction.enhanced_data.updated",
14261432
"card_transaction.updated",

src/lithic/types/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,9 @@
354354
from .transaction_simulate_credit_authorization_response import (
355355
TransactionSimulateCreditAuthorizationResponse as TransactionSimulateCreditAuthorizationResponse,
356356
)
357+
from .card_authorization_challenge_response_webhook_event import (
358+
CardAuthorizationChallengeResponseWebhookEvent as CardAuthorizationChallengeResponseWebhookEvent,
359+
)
357360
from .external_bank_account_retry_micro_deposits_response import (
358361
ExternalBankAccountRetryMicroDepositsResponse as ExternalBankAccountRetryMicroDepositsResponse,
359362
)
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing import Optional
4+
from datetime import datetime
5+
from typing_extensions import Literal
6+
7+
from .._models import BaseModel
8+
9+
__all__ = ["CardAuthorizationChallengeResponseWebhookEvent"]
10+
11+
12+
class CardAuthorizationChallengeResponseWebhookEvent(BaseModel):
13+
card_token: Optional[str] = None
14+
"""The token of the card associated with the challenge"""
15+
16+
challenge_method: Literal["SMS"]
17+
"""The method used to deliver the challenge to the cardholder"""
18+
19+
completed: Optional[datetime] = None
20+
"""The timestamp of when the challenge was completed"""
21+
22+
created: datetime
23+
"""The timestamp of when the challenge was created"""
24+
25+
event_token: str
26+
"""Globally unique identifier for the event"""
27+
28+
event_type: Literal["card_authorization.challenge_response"]
29+
"""Event type"""
30+
31+
response: Literal["APPROVE", "DECLINE"]
32+
"""The cardholder's response to the challenge"""
33+
34+
transaction_token: Optional[str] = None
35+
"""
36+
The token of the transaction associated with the authorization event being
37+
challenged
38+
"""

src/lithic/types/event.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class Event(BaseModel):
3030
"balance.updated",
3131
"book_transfer_transaction.created",
3232
"book_transfer_transaction.updated",
33+
"card_authorization.challenge_response",
3334
"card_transaction.enhanced_data.created",
3435
"card_transaction.enhanced_data.updated",
3536
"card_transaction.updated",
@@ -89,6 +90,8 @@ class Event(BaseModel):
8990
created.
9091
- book_transfer_transaction.updated: Occurs when a book transfer transaction is
9192
updated.
93+
- card_authorization.challenge_response: Occurs when a cardholder responds to an
94+
SMS challenge during card authorization.
9295
- card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial
9396
data is processed for a transaction event.
9497
- card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial

src/lithic/types/event_list_params.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class EventListParams(TypedDict, total=False):
4040
"balance.updated",
4141
"book_transfer_transaction.created",
4242
"book_transfer_transaction.updated",
43+
"card_authorization.challenge_response",
4344
"card_transaction.enhanced_data.created",
4445
"card_transaction.enhanced_data.updated",
4546
"card_transaction.updated",

src/lithic/types/event_subscription.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class EventSubscription(BaseModel):
3333
"balance.updated",
3434
"book_transfer_transaction.created",
3535
"book_transfer_transaction.updated",
36+
"card_authorization.challenge_response",
3637
"card_transaction.enhanced_data.created",
3738
"card_transaction.enhanced_data.updated",
3839
"card_transaction.updated",

src/lithic/types/events/subscription_create_params.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class SubscriptionCreateParams(TypedDict, total=False):
2828
"balance.updated",
2929
"book_transfer_transaction.created",
3030
"book_transfer_transaction.updated",
31+
"card_authorization.challenge_response",
3132
"card_transaction.enhanced_data.created",
3233
"card_transaction.enhanced_data.updated",
3334
"card_transaction.updated",

0 commit comments

Comments
 (0)