88
99from ..._utils import PropertyInfo
1010
11- __all__ = ["CardTokenCreateParams" , "Capability" ]
11+ __all__ = ["CardTokenCreateParams" , "Capability" , "Outcome" , "OutcomeDecline" ]
1212
1313
1414class CardTokenCreateParams (TypedDict , total = False ):
@@ -21,6 +21,9 @@ class CardTokenCreateParams(TypedDict, total=False):
2121 last4 : str
2222 """The last 4 digits of the card number."""
2323
24+ outcome : Outcome
25+ """The outcome to simulate for card push transfers using this token."""
26+
2427 prefix : str
2528 """The prefix of the card number, usually the first 8 digits."""
2629
@@ -49,3 +52,142 @@ class Capability(TypedDict, total=False):
4952 - `visa` - Visa and Interlink
5053 - `mastercard` - Mastercard and Maestro
5154 """
55+
56+
57+ class OutcomeDecline (TypedDict , total = False ):
58+ """If the result is declined, the details of the decline."""
59+
60+ reason : Literal [
61+ "do_not_honor" ,
62+ "activity_count_limit_exceeded" ,
63+ "refer_to_card_issuer" ,
64+ "refer_to_card_issuer_special_condition" ,
65+ "invalid_merchant" ,
66+ "pick_up_card" ,
67+ "error" ,
68+ "pick_up_card_special" ,
69+ "invalid_transaction" ,
70+ "invalid_amount" ,
71+ "invalid_account_number" ,
72+ "no_such_issuer" ,
73+ "re_enter_transaction" ,
74+ "no_credit_account" ,
75+ "pick_up_card_lost" ,
76+ "pick_up_card_stolen" ,
77+ "closed_account" ,
78+ "insufficient_funds" ,
79+ "no_checking_account" ,
80+ "no_savings_account" ,
81+ "expired_card" ,
82+ "transaction_not_permitted_to_cardholder" ,
83+ "transaction_not_allowed_at_terminal" ,
84+ "suspected_fraud" ,
85+ "activity_amount_limit_exceeded" ,
86+ "restricted_card" ,
87+ "security_violation" ,
88+ "transaction_does_not_fulfill_anti_money_laundering_requirement" ,
89+ "blocked_first_use" ,
90+ "credit_issuer_unavailable" ,
91+ "negative_card_verification_value_results" ,
92+ "issuer_unavailable" ,
93+ "financial_institution_cannot_be_found" ,
94+ "transaction_cannot_be_completed" ,
95+ "duplicate_transaction" ,
96+ "system_malfunction" ,
97+ "additional_customer_authentication_required" ,
98+ "surcharge_amount_not_permitted" ,
99+ "decline_for_cvv2_failure" ,
100+ "stop_payment_order" ,
101+ "revocation_of_authorization_order" ,
102+ "revocation_of_all_authorizations_order" ,
103+ ]
104+ """The reason for the decline.
105+
106+ - `do_not_honor` - The card issuer has declined the transaction without
107+ providing a specific reason.
108+ - `activity_count_limit_exceeded` - The number of transactions for the card has
109+ exceeded the limit set by the issuer.
110+ - `refer_to_card_issuer` - The card issuer requires the cardholder to contact
111+ them for further information regarding the transaction.
112+ - `refer_to_card_issuer_special_condition` - The card issuer requires the
113+ cardholder to contact them due to a special condition related to the
114+ transaction.
115+ - `invalid_merchant` - The merchant is not valid for this transaction.
116+ - `pick_up_card` - The card should be retained by the terminal.
117+ - `error` - An error occurred during processing of the transaction.
118+ - `pick_up_card_special` - The card should be retained by the terminal due to a
119+ special condition.
120+ - `invalid_transaction` - The transaction is invalid and cannot be processed.
121+ - `invalid_amount` - The amount of the transaction is invalid.
122+ - `invalid_account_number` - The account number provided is invalid.
123+ - `no_such_issuer` - The issuer of the card could not be found.
124+ - `re_enter_transaction` - The transaction should be re-entered for processing.
125+ - `no_credit_account` - There is no credit account associated with the card.
126+ - `pick_up_card_lost` - The card should be retained by the terminal because it
127+ has been reported lost.
128+ - `pick_up_card_stolen` - The card should be retained by the terminal because it
129+ has been reported stolen.
130+ - `closed_account` - The account associated with the card has been closed.
131+ - `insufficient_funds` - There are insufficient funds in the account to complete
132+ the transaction.
133+ - `no_checking_account` - There is no checking account associated with the card.
134+ - `no_savings_account` - There is no savings account associated with the card.
135+ - `expired_card` - The card has expired and cannot be used for transactions.
136+ - `transaction_not_permitted_to_cardholder` - The transaction is not permitted
137+ for this cardholder.
138+ - `transaction_not_allowed_at_terminal` - The transaction is not allowed at this
139+ terminal.
140+ - `suspected_fraud` - The transaction has been flagged as suspected fraud and
141+ cannot be processed.
142+ - `activity_amount_limit_exceeded` - The amount of activity on the card has
143+ exceeded the limit set by the issuer.
144+ - `restricted_card` - The card has restrictions that prevent it from being used
145+ for this transaction.
146+ - `security_violation` - A security violation has occurred, preventing the
147+ transaction from being processed.
148+ - `transaction_does_not_fulfill_anti_money_laundering_requirement` - The
149+ transaction does not meet the anti-money laundering requirements set by the
150+ issuer.
151+ - `blocked_first_use` - The first use of the card has been blocked by the
152+ issuer.
153+ - `credit_issuer_unavailable` - The credit issuer is currently unavailable to
154+ process the transaction.
155+ - `negative_card_verification_value_results` - The card verification value (CVV)
156+ results were negative, indicating a potential issue with the card.
157+ - `issuer_unavailable` - The issuer of the card is currently unavailable to
158+ process the transaction.
159+ - `financial_institution_cannot_be_found` - The financial institution associated
160+ with the card could not be found.
161+ - `transaction_cannot_be_completed` - The transaction cannot be completed due to
162+ an unspecified reason.
163+ - `duplicate_transaction` - The transaction is a duplicate of a previous
164+ transaction and cannot be processed again.
165+ - `system_malfunction` - A system malfunction occurred, preventing the
166+ transaction from being processed.
167+ - `additional_customer_authentication_required` - Additional customer
168+ authentication is required to complete the transaction.
169+ - `surcharge_amount_not_permitted` - The surcharge amount applied to the
170+ transaction is not permitted by the issuer.
171+ - `decline_for_cvv2_failure` - The transaction was declined due to a failure in
172+ verifying the CVV2 code.
173+ - `stop_payment_order` - A stop payment order has been placed on this
174+ transaction.
175+ - `revocation_of_authorization_order` - An order has been placed to revoke
176+ authorization for this transaction.
177+ - `revocation_of_all_authorizations_order` - An order has been placed to revoke
178+ all authorizations for this cardholder.
179+ """
180+
181+
182+ class Outcome (TypedDict , total = False ):
183+ """The outcome to simulate for card push transfers using this token."""
184+
185+ result : Required [Literal ["approve" , "decline" ]]
186+ """Whether card push transfers or validations will be approved or declined.
187+
188+ - `approve` - Any card push transfers or validations will be approved.
189+ - `decline` - Any card push transfers or validations will be declined.
190+ """
191+
192+ decline : OutcomeDecline
193+ """If the result is declined, the details of the decline."""
0 commit comments