Skip to content

Commit d8076eb

Browse files
feat(api): add out-of-band challenge method, declined status to card authorization types
1 parent 7f1ffed commit d8076eb

4 files changed

Lines changed: 19 additions & 8 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 193
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-711671459efe47bdb250c7ac893569af9b9e1b7c60ded53a77627be76e300a02.yml
3-
openapi_spec_hash: 193dc8a880e100bb74b493de7d4703e1
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-9350b3c0a9a4fc31e1cac88e705f1ac6895108360ba8f7845a8da20db825f82e.yml
3+
openapi_spec_hash: c99714470f6321912e8022434a861897
44
config_hash: 1c5c139a2aa0d1d45c063f953a9bc803

src/lithic/types/card_authorization.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,24 @@ class LatestChallenge(BaseModel):
201201
The latest Authorization Challenge that was issued to the cardholder for this merchant.
202202
"""
203203

204-
phone_number: str
205-
"""The phone number used for sending Authorization Challenge SMS."""
204+
method: Literal["SMS", "OUT_OF_BAND"]
205+
"""The method used to deliver the challenge to the cardholder
206206
207-
status: Literal["COMPLETED", "PENDING", "EXPIRED", "ERROR"]
207+
- `SMS` - Challenge was delivered via SMS
208+
- `OUT_OF_BAND` - Challenge was delivered via an out-of-band method
209+
"""
210+
211+
phone_number: Optional[str] = None
212+
"""The phone number used for sending the Authorization Challenge.
213+
214+
Present only when the challenge method is `SMS`.
215+
"""
216+
217+
status: Literal["COMPLETED", "DECLINED", "PENDING", "EXPIRED", "ERROR"]
208218
"""The status of the Authorization Challenge
209219
210220
- `COMPLETED` - Challenge was successfully completed by the cardholder
221+
- `DECLINED` - Challenge was declined by the cardholder
211222
- `PENDING` - Challenge is still open
212223
- `EXPIRED` - Challenge has expired without being completed
213224
- `ERROR` - There was an error processing the challenge

src/lithic/types/card_authorization_challenge_response_webhook_event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class CardAuthorizationChallengeResponseWebhookEvent(BaseModel):
1313
card_token: Optional[str] = None
1414
"""The token of the card associated with the challenge"""
1515

16-
challenge_method: Literal["SMS"]
16+
challenge_method: Literal["SMS", "OUT_OF_BAND"]
1717
"""The method used to deliver the challenge to the cardholder"""
1818

1919
completed: Optional[datetime] = None

src/lithic/types/event.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ class Event(BaseModel):
9595
during card authorization. The card program should issue its own challenge to
9696
the cardholder and then respond via
9797
[/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge).
98-
- card_authorization.challenge_response: Occurs when a cardholder responds to an
99-
SMS challenge during card authorization.
98+
- card_authorization.challenge_response: Occurs when a cardholder responds to a
99+
challenge during card authorization.
100100
- card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial
101101
data is processed for a transaction event.
102102
- card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial

0 commit comments

Comments
 (0)