Skip to content

Commit 0a56f6a

Browse files
feat(api): Add card state attribute to tokenization rules
feat(api): Add event_type to ASA request and 3DS decisioning request feat(api): Add user defined status to ledger accounts feat(api): Expose Payment Allocation Details chore: update code formatting docs: Update language for Google Web Push Provisioning docs
1 parent 5e9608e commit 0a56f6a

File tree

11 files changed

+84
-34
lines changed

11 files changed

+84
-34
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 176
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-854de7cc8f79e150ffe98f038ce9f39367010b2bdfffc9992be2738697dc4880.yml
3-
openapi_spec_hash: fd471b20f3eda1e00cdebf028cbfe867
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-4ecc06edca2cfad4eaf11573611e89823fda5f56370bac5cd02a498a6b277d09.yml
3+
openapi_spec_hash: 8f4a30bec4348cbde85b1e65bef9189a
44
config_hash: 9dddee5f7af579864599849cb28a0770

api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ Types:
736736
- <code><a href="./src/resources/webhooks.ts">AccountHolderUpdatedWebhookEvent</a></code>
737737
- <code><a href="./src/resources/webhooks.ts">AccountHolderVerificationWebhookEvent</a></code>
738738
- <code><a href="./src/resources/webhooks.ts">AccountHolderDocumentUpdatedWebhookEvent</a></code>
739-
- <code><a href="./src/resources/webhooks.ts">AsaRequestWebhookEvent</a></code>
739+
- <code><a href="./src/resources/webhooks.ts">CardAuthorizationApprovalRequestWebhookEvent</a></code>
740740
- <code><a href="./src/resources/webhooks.ts">TokenizationDecisioningRequestWebhookEvent</a></code>
741741
- <code><a href="./src/resources/webhooks.ts">AuthRulesBacktestReportCreatedWebhookEvent</a></code>
742742
- <code><a href="./src/resources/webhooks.ts">BalanceUpdatedWebhookEvent</a></code>
@@ -784,6 +784,7 @@ Types:
784784
- <code><a href="./src/resources/webhooks.ts">TokenizationTwoFactorAuthenticationCodeWebhookEvent</a></code>
785785
- <code><a href="./src/resources/webhooks.ts">TokenizationTwoFactorAuthenticationCodeSentWebhookEvent</a></code>
786786
- <code><a href="./src/resources/webhooks.ts">TokenizationUpdatedWebhookEvent</a></code>
787+
- <code><a href="./src/resources/webhooks.ts">ThreeDSAuthenticationApprovalRequestWebhookEvent</a></code>
787788
- <code><a href="./src/resources/webhooks.ts">DisputeTransactionCreatedWebhookEvent</a></code>
788789
- <code><a href="./src/resources/webhooks.ts">DisputeTransactionUpdatedWebhookEvent</a></code>
789790
- <code><a href="./src/resources/webhooks.ts">ParsedWebhookEvent</a></code>

src/client.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,11 @@ import {
203203
AccountHolderDocumentUpdatedWebhookEvent,
204204
AccountHolderUpdatedWebhookEvent,
205205
AccountHolderVerificationWebhookEvent,
206-
AsaRequestWebhookEvent,
207206
AuthRulesBacktestReportCreatedWebhookEvent,
208207
BalanceUpdatedWebhookEvent,
209208
BookTransferTransactionCreatedWebhookEvent,
210209
BookTransferTransactionUpdatedWebhookEvent,
210+
CardAuthorizationApprovalRequestWebhookEvent,
211211
CardConvertedWebhookEvent,
212212
CardCreatedWebhookEvent,
213213
CardReissuedWebhookEvent,
@@ -245,6 +245,7 @@ import {
245245
PaymentTransactionUpdatedWebhookEvent,
246246
SettlementReportUpdatedWebhookEvent,
247247
StatementsCreatedWebhookEvent,
248+
ThreeDSAuthenticationApprovalRequestWebhookEvent,
248249
ThreeDSAuthenticationChallengeWebhookEvent,
249250
ThreeDSAuthenticationCreatedWebhookEvent,
250251
ThreeDSAuthenticationUpdatedWebhookEvent,
@@ -1503,7 +1504,7 @@ export declare namespace Lithic {
15031504
type AccountHolderUpdatedWebhookEvent as AccountHolderUpdatedWebhookEvent,
15041505
type AccountHolderVerificationWebhookEvent as AccountHolderVerificationWebhookEvent,
15051506
type AccountHolderDocumentUpdatedWebhookEvent as AccountHolderDocumentUpdatedWebhookEvent,
1506-
type AsaRequestWebhookEvent as AsaRequestWebhookEvent,
1507+
type CardAuthorizationApprovalRequestWebhookEvent as CardAuthorizationApprovalRequestWebhookEvent,
15071508
type TokenizationDecisioningRequestWebhookEvent as TokenizationDecisioningRequestWebhookEvent,
15081509
type AuthRulesBacktestReportCreatedWebhookEvent as AuthRulesBacktestReportCreatedWebhookEvent,
15091510
type BalanceUpdatedWebhookEvent as BalanceUpdatedWebhookEvent,
@@ -1551,6 +1552,7 @@ export declare namespace Lithic {
15511552
type TokenizationTwoFactorAuthenticationCodeWebhookEvent as TokenizationTwoFactorAuthenticationCodeWebhookEvent,
15521553
type TokenizationTwoFactorAuthenticationCodeSentWebhookEvent as TokenizationTwoFactorAuthenticationCodeSentWebhookEvent,
15531554
type TokenizationUpdatedWebhookEvent as TokenizationUpdatedWebhookEvent,
1555+
type ThreeDSAuthenticationApprovalRequestWebhookEvent as ThreeDSAuthenticationApprovalRequestWebhookEvent,
15541556
type DisputeTransactionCreatedWebhookEvent as DisputeTransactionCreatedWebhookEvent,
15551557
type DisputeTransactionUpdatedWebhookEvent as DisputeTransactionUpdatedWebhookEvent,
15561558
type ParsedWebhookEvent as ParsedWebhookEvent,

src/resources/auth-rules/v2/v2.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,8 @@ export namespace ConditionalTokenizationActionParameters {
788788
* `TOO_MANY_RECENT_TOKENS`, `UNABLE_TO_ASSESS`.
789789
* - `TOKEN_REQUESTOR_ID`: Unique identifier for the entity requesting the token.
790790
* - `WALLET_TOKEN_STATUS`: The current status of the wallet token.
791+
* - `CARD_STATE`: The state of the card being tokenized. Valid values are
792+
* `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, `PENDING_FULFILLMENT`.
791793
*/
792794
attribute:
793795
| 'TIMESTAMP'
@@ -799,7 +801,8 @@ export namespace ConditionalTokenizationActionParameters {
799801
| 'WALLET_RECOMMENDED_DECISION'
800802
| 'WALLET_RECOMMENDATION_REASONS'
801803
| 'TOKEN_REQUESTOR_ID'
802-
| 'WALLET_TOKEN_STATUS';
804+
| 'WALLET_TOKEN_STATUS'
805+
| 'CARD_STATE';
803806

804807
/**
805808
* The operation to apply to the attribute

src/resources/cards/cards.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ export class Cards extends APIResource {
382382

383383
/**
384384
* Allow your cardholders to directly add payment cards to the device's digital
385-
* wallet from a browser on the web. Currently only suported for Apple Pay.
385+
* wallet from a browser on the web.
386386
*
387387
* This requires some additional setup and configuration. Please
388388
* [Contact Us](https://lithic.com/contact) or your Customer Success representative

src/resources/financial-accounts/financial-accounts.ts

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,17 @@ export interface FinancialAccount {
212212
*/
213213
status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING';
214214

215+
/**
216+
* Substatus for the financial account
217+
*/
218+
substatus:
219+
| 'CHARGED_OFF_DELINQUENT'
220+
| 'CHARGED_OFF_FRAUD'
221+
| 'END_USER_REQUEST'
222+
| 'BANK_REQUEST'
223+
| 'DELINQUENT'
224+
| null;
225+
215226
type:
216227
| 'ISSUING'
217228
| 'RESERVE'
@@ -226,20 +237,14 @@ export interface FinancialAccount {
226237

227238
updated: string;
228239

240+
/**
241+
* User-defined status for the financial account
242+
*/
243+
user_defined_status: string | null;
244+
229245
account_number?: string | null;
230246

231247
routing_number?: string | null;
232-
233-
/**
234-
* Substatus for the financial account
235-
*/
236-
substatus?:
237-
| 'CHARGED_OFF_DELINQUENT'
238-
| 'CHARGED_OFF_FRAUD'
239-
| 'END_USER_REQUEST'
240-
| 'BANK_REQUEST'
241-
| 'DELINQUENT'
242-
| null;
243248
}
244249

245250
export namespace FinancialAccount {
@@ -527,6 +532,11 @@ export interface FinancialAccountUpdateStatusParams {
527532
* Substatus for the financial account
528533
*/
529534
substatus: 'CHARGED_OFF_FRAUD' | 'END_USER_REQUEST' | 'BANK_REQUEST' | 'CHARGED_OFF_DELINQUENT' | null;
535+
536+
/**
537+
* User-defined status for the financial account
538+
*/
539+
user_defined_status?: string;
530540
}
531541

532542
FinancialAccounts.Balances = Balances;

src/resources/financial-accounts/loan-tapes.ts

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export interface LoanTape {
132132

133133
minimum_payment_balance: LoanTape.MinimumPaymentBalance;
134134

135-
payment_allocation: CategoryBalances;
135+
payment_allocation: LoanTape.PaymentAllocation;
136136

137137
period_totals: FinancialAccountsAPI.StatementTotals;
138138

@@ -271,6 +271,29 @@ export namespace LoanTape {
271271
remaining: number;
272272
}
273273

274+
export interface PaymentAllocation {
275+
fee_details: FinancialAccountsAPI.CategoryDetails | null;
276+
277+
/**
278+
* Amount allocated to fees in cents
279+
*/
280+
fees: number;
281+
282+
/**
283+
* Amount allocated to interest in cents
284+
*/
285+
interest: number;
286+
287+
interest_details: FinancialAccountsAPI.CategoryDetails | null;
288+
289+
/**
290+
* Amount allocated to principal in cents
291+
*/
292+
principal: number;
293+
294+
principal_details: FinancialAccountsAPI.CategoryDetails | null;
295+
}
296+
274297
export interface PreviousStatementBalance {
275298
amount: number;
276299

src/resources/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ export {
288288
type AccountHolderUpdatedWebhookEvent,
289289
type AccountHolderVerificationWebhookEvent,
290290
type AccountHolderDocumentUpdatedWebhookEvent,
291-
type AsaRequestWebhookEvent,
291+
type CardAuthorizationApprovalRequestWebhookEvent,
292292
type TokenizationDecisioningRequestWebhookEvent,
293293
type AuthRulesBacktestReportCreatedWebhookEvent,
294294
type BalanceUpdatedWebhookEvent,
@@ -336,6 +336,7 @@ export {
336336
type TokenizationTwoFactorAuthenticationCodeWebhookEvent,
337337
type TokenizationTwoFactorAuthenticationCodeSentWebhookEvent,
338338
type TokenizationUpdatedWebhookEvent,
339+
type ThreeDSAuthenticationApprovalRequestWebhookEvent,
339340
type DisputeTransactionCreatedWebhookEvent,
340341
type DisputeTransactionUpdatedWebhookEvent,
341342
type ParsedWebhookEvent,

src/resources/transactions/transactions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,7 @@ export namespace Transaction {
677677
| 'AUTH_RULE_ALLOWED_MCC'
678678
| 'AUTH_RULE_BLOCKED_COUNTRY'
679679
| 'AUTH_RULE_BLOCKED_MCC'
680+
| 'AUTH_RULE'
680681
| 'CARD_CLOSED'
681682
| 'CARD_CRYPTOGRAM_VALIDATION_FAILURE'
682683
| 'CARD_EXPIRED'
@@ -997,6 +998,7 @@ export namespace Transaction {
997998
| 'AUTH_RULE_ALLOWED_MCC'
998999
| 'AUTH_RULE_BLOCKED_COUNTRY'
9991000
| 'AUTH_RULE_BLOCKED_MCC'
1001+
| 'AUTH_RULE'
10001002
| 'CARD_CLOSED'
10011003
| 'CARD_CRYPTOGRAM_VALIDATION_FAILURE'
10021004
| 'CARD_EXPIRED'

src/resources/webhooks.ts

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -665,10 +665,7 @@ export namespace AccountHolderDocumentUpdatedWebhookEvent {
665665
}
666666
}
667667

668-
/**
669-
* The Auth Stream Access request payload that was sent to the ASA responder.
670-
*/
671-
export interface AsaRequestWebhookEvent {
668+
export interface CardAuthorizationApprovalRequestWebhookEvent {
672669
/**
673670
* The provisional transaction group uuid associated with the authorization
674671
*/
@@ -694,12 +691,12 @@ export interface AsaRequestWebhookEvent {
694691
*/
695692
authorization_amount: number;
696693

697-
avs: AsaRequestWebhookEvent.Avs;
694+
avs: CardAuthorizationApprovalRequestWebhookEvent.Avs;
698695

699696
/**
700697
* Card object in ASA
701698
*/
702-
card: AsaRequestWebhookEvent.Card;
699+
card: CardAuthorizationApprovalRequestWebhookEvent.Card;
703700

704701
/**
705702
* 3-character alphabetic ISO 4217 code for cardholder's billing currency.
@@ -721,6 +718,8 @@ export interface AsaRequestWebhookEvent {
721718
*/
722719
created: string;
723720

721+
event_type: 'card_authorization.approval_request';
722+
724723
merchant: Shared.Merchant;
725724

726725
/**
@@ -788,13 +787,13 @@ export interface AsaRequestWebhookEvent {
788787
* Optional Object containing information if the Card is a part of a Fleet managed
789788
* program
790789
*/
791-
fleet_info?: AsaRequestWebhookEvent.FleetInfo | null;
790+
fleet_info?: CardAuthorizationApprovalRequestWebhookEvent.FleetInfo | null;
792791

793792
/**
794793
* The latest Authorization Challenge that was issued to the cardholder for this
795794
* merchant.
796795
*/
797-
latest_challenge?: AsaRequestWebhookEvent.LatestChallenge;
796+
latest_challenge?: CardAuthorizationApprovalRequestWebhookEvent.LatestChallenge;
798797

799798
/**
800799
* Card network of the authorization.
@@ -818,9 +817,9 @@ export interface AsaRequestWebhookEvent {
818817
* values and how to use them. This object is only available to certain programs-
819818
* contact your Customer Success Manager to discuss enabling access.
820819
*/
821-
network_specific_data?: AsaRequestWebhookEvent.NetworkSpecificData | null;
820+
network_specific_data?: CardAuthorizationApprovalRequestWebhookEvent.NetworkSpecificData | null;
822821

823-
pos?: AsaRequestWebhookEvent.Pos;
822+
pos?: CardAuthorizationApprovalRequestWebhookEvent.Pos;
824823

825824
token_info?: TransactionsAPI.TokenInfo | null;
826825

@@ -830,7 +829,7 @@ export interface AsaRequestWebhookEvent {
830829
ttl?: string;
831830
}
832831

833-
export namespace AsaRequestWebhookEvent {
832+
export namespace CardAuthorizationApprovalRequestWebhookEvent {
834833
export interface Avs {
835834
/**
836835
* Cardholder address
@@ -2249,6 +2248,13 @@ export interface TokenizationUpdatedWebhookEvent {
22492248
tokenization: TokenizationsAPI.Tokenization;
22502249
}
22512250

2251+
/**
2252+
* Represents a 3DS authentication
2253+
*/
2254+
export interface ThreeDSAuthenticationApprovalRequestWebhookEvent extends ThreeDSAPI.ThreeDSAuthentication {
2255+
event_type: 'three_ds_authentication.approval_request';
2256+
}
2257+
22522258
/**
22532259
* The Dispute object tracks the progression of a dispute throughout its lifecycle.
22542260
*/
@@ -2279,7 +2285,7 @@ export type ParsedWebhookEvent =
22792285
| ParsedWebhookEvent.LegacyPayload
22802286
| AccountHolderVerificationWebhookEvent
22812287
| AccountHolderDocumentUpdatedWebhookEvent
2282-
| AsaRequestWebhookEvent
2288+
| CardAuthorizationApprovalRequestWebhookEvent
22832289
| TokenizationDecisioningRequestWebhookEvent
22842290
| AuthRulesBacktestReportCreatedWebhookEvent
22852291
| BalanceUpdatedWebhookEvent
@@ -2327,7 +2333,7 @@ export type ParsedWebhookEvent =
23272333
| TokenizationTwoFactorAuthenticationCodeWebhookEvent
23282334
| TokenizationTwoFactorAuthenticationCodeSentWebhookEvent
23292335
| TokenizationUpdatedWebhookEvent
2330-
| ThreeDSAPI.ThreeDSAuthentication
2336+
| ThreeDSAuthenticationApprovalRequestWebhookEvent
23312337
| DisputeTransactionCreatedWebhookEvent
23322338
| DisputeTransactionUpdatedWebhookEvent;
23332339

@@ -2756,7 +2762,7 @@ export declare namespace Webhooks {
27562762
type AccountHolderUpdatedWebhookEvent as AccountHolderUpdatedWebhookEvent,
27572763
type AccountHolderVerificationWebhookEvent as AccountHolderVerificationWebhookEvent,
27582764
type AccountHolderDocumentUpdatedWebhookEvent as AccountHolderDocumentUpdatedWebhookEvent,
2759-
type AsaRequestWebhookEvent as AsaRequestWebhookEvent,
2765+
type CardAuthorizationApprovalRequestWebhookEvent as CardAuthorizationApprovalRequestWebhookEvent,
27602766
type TokenizationDecisioningRequestWebhookEvent as TokenizationDecisioningRequestWebhookEvent,
27612767
type AuthRulesBacktestReportCreatedWebhookEvent as AuthRulesBacktestReportCreatedWebhookEvent,
27622768
type BalanceUpdatedWebhookEvent as BalanceUpdatedWebhookEvent,
@@ -2804,6 +2810,7 @@ export declare namespace Webhooks {
28042810
type TokenizationTwoFactorAuthenticationCodeWebhookEvent as TokenizationTwoFactorAuthenticationCodeWebhookEvent,
28052811
type TokenizationTwoFactorAuthenticationCodeSentWebhookEvent as TokenizationTwoFactorAuthenticationCodeSentWebhookEvent,
28062812
type TokenizationUpdatedWebhookEvent as TokenizationUpdatedWebhookEvent,
2813+
type ThreeDSAuthenticationApprovalRequestWebhookEvent as ThreeDSAuthenticationApprovalRequestWebhookEvent,
28072814
type DisputeTransactionCreatedWebhookEvent as DisputeTransactionCreatedWebhookEvent,
28082815
type DisputeTransactionUpdatedWebhookEvent as DisputeTransactionUpdatedWebhookEvent,
28092816
type ParsedWebhookEvent as ParsedWebhookEvent,

0 commit comments

Comments
 (0)