From 79cdfa63e8f57a3a0a358e298e0393f745196d65 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Oct 2025 17:43:27 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 +- src/increase/types/card_payment.py | 617 +++++++++++++++++++++++++++++ 2 files changed, 619 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 09fe707d7..b52e298fa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4ecdf6d7ab918ac6bedd10130962aa92a2b10e59ca7a98849bcbb72878bffc92.yml -openapi_spec_hash: cefa36c80b576364e72406d7da8c4610 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4aa2f4a453e4fc5f0876f09919d76289bc530dcdd693e6d69db07980803aab6d.yml +openapi_spec_hash: 32bfd518611484cb0777810dd934f1fa config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index a87566aa6..f649681fa 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -49,6 +49,24 @@ "ElementCardDeclineVerification", "ElementCardDeclineVerificationCardVerificationCode", "ElementCardDeclineVerificationCardholderAddress", + "ElementCardFinancial", + "ElementCardFinancialAdditionalAmounts", + "ElementCardFinancialAdditionalAmountsClinic", + "ElementCardFinancialAdditionalAmountsDental", + "ElementCardFinancialAdditionalAmountsOriginal", + "ElementCardFinancialAdditionalAmountsPrescription", + "ElementCardFinancialAdditionalAmountsSurcharge", + "ElementCardFinancialAdditionalAmountsTotalCumulative", + "ElementCardFinancialAdditionalAmountsTotalHealthcare", + "ElementCardFinancialAdditionalAmountsTransit", + "ElementCardFinancialAdditionalAmountsUnknown", + "ElementCardFinancialAdditionalAmountsVision", + "ElementCardFinancialNetworkDetails", + "ElementCardFinancialNetworkDetailsVisa", + "ElementCardFinancialNetworkIdentifiers", + "ElementCardFinancialVerification", + "ElementCardFinancialVerificationCardVerificationCode", + "ElementCardFinancialVerificationCardholderAddress", "ElementCardFuelConfirmation", "ElementCardFuelConfirmationNetworkIdentifiers", "ElementCardIncrement", @@ -1585,6 +1603,594 @@ class ElementCardDecline(BaseModel): """Fields related to verification of cardholder-provided values.""" +class ElementCardFinancialAdditionalAmountsClinic(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmountsDental(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmountsOriginal(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmountsPrescription(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmountsSurcharge(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmountsTotalCumulative(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmountsTotalHealthcare(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmountsTransit(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmountsUnknown(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmountsVision(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmounts(BaseModel): + clinic: Optional[ElementCardFinancialAdditionalAmountsClinic] = None + """The part of this transaction amount that was for clinic-related services.""" + + dental: Optional[ElementCardFinancialAdditionalAmountsDental] = None + """The part of this transaction amount that was for dental-related services.""" + + original: Optional[ElementCardFinancialAdditionalAmountsOriginal] = None + """The original pre-authorized amount.""" + + prescription: Optional[ElementCardFinancialAdditionalAmountsPrescription] = None + """The part of this transaction amount that was for healthcare prescriptions.""" + + surcharge: Optional[ElementCardFinancialAdditionalAmountsSurcharge] = None + """The surcharge amount charged for this transaction by the merchant.""" + + total_cumulative: Optional[ElementCardFinancialAdditionalAmountsTotalCumulative] = None + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + + total_healthcare: Optional[ElementCardFinancialAdditionalAmountsTotalHealthcare] = None + """The total amount of healthcare-related additional amounts.""" + + transit: Optional[ElementCardFinancialAdditionalAmountsTransit] = None + """The part of this transaction amount that was for transit-related services.""" + + unknown: Optional[ElementCardFinancialAdditionalAmountsUnknown] = None + """An unknown additional amount.""" + + vision: Optional[ElementCardFinancialAdditionalAmountsVision] = None + """The part of this transaction amount that was for vision-related services.""" + + +class ElementCardFinancialNetworkDetailsVisa(BaseModel): + electronic_commerce_indicator: Optional[ + Literal[ + "mail_phone_order", + "recurring", + "installment", + "unknown_mail_phone_order", + "secure_electronic_commerce", + "non_authenticated_security_transaction_at_3ds_capable_merchant", + "non_authenticated_security_transaction", + "non_secure_transaction", + ] + ] = None + """ + For electronic commerce transactions, this identifies the level of security used + in obtaining the customer's payment credential. For mail or telephone order + transactions, identifies the type of mail or telephone order. + + - `mail_phone_order` - Single transaction of a mail/phone order: Use to indicate + that the transaction is a mail/phone order purchase, not a recurring + transaction or installment payment. For domestic transactions in the US + region, this value may also indicate one bill payment transaction in the + card-present or card-absent environments. + - `recurring` - Recurring transaction: Payment indicator used to indicate a + recurring transaction that originates from an acquirer in the US region. + - `installment` - Installment payment: Payment indicator used to indicate one + purchase of goods or services that is billed to the account in multiple + charges over a period of time agreed upon by the cardholder and merchant from + transactions that originate from an acquirer in the US region. + - `unknown_mail_phone_order` - Unknown classification: other mail order: Use to + indicate that the type of mail/telephone order is unknown. + - `secure_electronic_commerce` - Secure electronic commerce transaction: Use to + indicate that the electronic commerce transaction has been authenticated using + e.g., 3-D Secure + - `non_authenticated_security_transaction_at_3ds_capable_merchant` - + Non-authenticated security transaction at a 3-D Secure-capable merchant, and + merchant attempted to authenticate the cardholder using 3-D Secure: Use to + identify an electronic commerce transaction where the merchant attempted to + authenticate the cardholder using 3-D Secure, but was unable to complete the + authentication because the issuer or cardholder does not participate in the + 3-D Secure program. + - `non_authenticated_security_transaction` - Non-authenticated security + transaction: Use to identify an electronic commerce transaction that uses data + encryption for security however, cardholder authentication is not performed + using 3-D Secure. + - `non_secure_transaction` - Non-secure transaction: Use to identify an + electronic commerce transaction that has no data protection. + """ + + point_of_service_entry_mode: Optional[ + Literal[ + "unknown", + "manual", + "magnetic_stripe_no_cvv", + "optical_code", + "integrated_circuit_card", + "contactless", + "credential_on_file", + "magnetic_stripe", + "contactless_magnetic_stripe", + "integrated_circuit_card_no_cvv", + ] + ] = None + """ + The method used to enter the cardholder's primary account number and card + expiration date. + + - `unknown` - Unknown + - `manual` - Manual key entry + - `magnetic_stripe_no_cvv` - Magnetic stripe read, without card verification + value + - `optical_code` - Optical code + - `integrated_circuit_card` - Contact chip card + - `contactless` - Contactless read of chip card + - `credential_on_file` - Transaction initiated using a credential that has + previously been stored on file + - `magnetic_stripe` - Magnetic stripe read + - `contactless_magnetic_stripe` - Contactless read of magnetic stripe data + - `integrated_circuit_card_no_cvv` - Contact chip card, without card + verification value + """ + + stand_in_processing_reason: Optional[ + Literal[ + "issuer_error", + "invalid_physical_card", + "invalid_cardholder_authentication_verification_value", + "internal_visa_error", + "merchant_transaction_advisory_service_authentication_required", + "payment_fraud_disruption_acquirer_block", + "other", + ] + ] = None + """Only present when `actioner: network`. + + Describes why a card authorization was approved or declined by Visa through + stand-in processing. + + - `issuer_error` - Increase failed to process the authorization in a timely + manner. + - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder + authentication verification value was invalid. + - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason + code for certain expected occurrences as well, such as Application Transaction + Counter (ATC) replays. + - `merchant_transaction_advisory_service_authentication_required` - The merchant + has enabled Visa's Transaction Advisory Service and requires further + authentication to perform the transaction. In practice this is often utilized + at fuel pumps to tell the cardholder to see the cashier. + - `payment_fraud_disruption_acquirer_block` - The transaction was blocked by + Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, + such as card testing. + - `other` - An unspecific reason for stand-in processing. + """ + + +class ElementCardFinancialNetworkDetails(BaseModel): + category: Literal["visa", "pulse"] + """The payment network used to process this card authorization. + + - `visa` - Visa + - `pulse` - Pulse + """ + + pulse: Optional[object] = None + """Fields specific to the `pulse` network.""" + + visa: Optional[ElementCardFinancialNetworkDetailsVisa] = None + """Fields specific to the `visa` network.""" + + +class ElementCardFinancialNetworkIdentifiers(BaseModel): + authorization_identification_response: Optional[str] = None + """ + The randomly generated 6-character Authorization Identification Response code + sent back to the acquirer in an approved response. + """ + + retrieval_reference_number: Optional[str] = None + """A life-cycle identifier used across e.g., an authorization and a reversal. + + Expected to be unique per acquirer within a window of time. For some card + networks the retrieval reference number includes the trace counter. + """ + + trace_number: Optional[str] = None + """A counter used to verify an individual authorization. + + Expected to be unique per acquirer within a window of time. + """ + + transaction_id: Optional[str] = None + """ + A globally unique transaction identifier provided by the card network, used + across multiple life-cycle requests. + """ + + +class ElementCardFinancialVerificationCardVerificationCode(BaseModel): + result: Literal["not_checked", "match", "no_match"] + """The result of verifying the Card Verification Code. + + - `not_checked` - No card verification code was provided in the authorization + request. + - `match` - The card verification code matched the one on file. + - `no_match` - The card verification code did not match the one on file. + """ + + +class ElementCardFinancialVerificationCardholderAddress(BaseModel): + actual_line1: Optional[str] = None + """Line 1 of the address on file for the cardholder.""" + + actual_postal_code: Optional[str] = None + """The postal code of the address on file for the cardholder.""" + + provided_line1: Optional[str] = None + """ + The cardholder address line 1 provided for verification in the authorization + request. + """ + + provided_postal_code: Optional[str] = None + """The postal code provided for verification in the authorization request.""" + + result: Literal[ + "not_checked", + "postal_code_match_address_no_match", + "postal_code_no_match_address_match", + "match", + "no_match", + "postal_code_match_address_not_checked", + ] + """The address verification result returned to the card network. + + - `not_checked` - No address information was provided in the authorization + request. + - `postal_code_match_address_no_match` - Postal code matches, but the street + address does not match or was not provided. + - `postal_code_no_match_address_match` - Postal code does not match, but the + street address matches or was not provided. + - `match` - Postal code and street address match. + - `no_match` - Postal code and street address do not match. + - `postal_code_match_address_not_checked` - Postal code matches, but the street + address was not verified. (deprecated) + """ + + +class ElementCardFinancialVerification(BaseModel): + card_verification_code: ElementCardFinancialVerificationCardVerificationCode + """ + Fields related to verification of the Card Verification Code, a 3-digit code on + the back of the card. + """ + + cardholder_address: ElementCardFinancialVerificationCardholderAddress + """ + Cardholder address provided in the authorization request and the address on file + we verified it against. + """ + + +class ElementCardFinancial(BaseModel): + id: str + """The Card Financial identifier.""" + + actioner: Literal["user", "increase", "network"] + """ + Whether this financial was approved by Increase, the card network through + stand-in processing, or the user through a real-time decision. + + - `user` - This object was actioned by the user through a real-time decision. + - `increase` - This object was actioned by Increase without user intervention. + - `network` - This object was actioned by the network, through stand-in + processing. + """ + + additional_amounts: ElementCardFinancialAdditionalAmounts + """ + Additional amounts associated with the card authorization, such as ATM + surcharges fees. These are usually a subset of the `amount` field and are used + to provide more detailed information about the transaction. + """ + + amount: int + """The pending amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + card_payment_id: str + """The ID of the Card Payment this transaction belongs to.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + digital_wallet_token_id: Optional[str] = None + """ + If the authorization was made via a Digital Wallet Token (such as an Apple Pay + purchase), the identifier of the token that was used. + """ + + direction: Literal["settlement", "refund"] + """ + The direction describes the direction the funds will move, either from the + cardholder to the merchant or from the merchant to the cardholder. + + - `settlement` - A regular card authorization where funds are debited from the + cardholder. + - `refund` - A refund card authorization, sometimes referred to as a credit + voucher authorization, where funds are credited to the cardholder. + """ + + merchant_acceptor_id: str + """ + The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + """ + + merchant_category_code: str + """ + The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + card is transacting with. + """ + + merchant_city: Optional[str] = None + """The city the merchant resides in.""" + + merchant_country: str + """The country the merchant resides in.""" + + merchant_descriptor: str + """The merchant descriptor of the merchant the card is transacting with.""" + + merchant_postal_code: Optional[str] = None + """The merchant's postal code. + + For US merchants this is either a 5-digit or 9-digit ZIP code, where the first 5 + and last 4 are separated by a dash. + """ + + merchant_state: Optional[str] = None + """The state the merchant resides in.""" + + network_details: ElementCardFinancialNetworkDetails + """Fields specific to the `network`.""" + + network_identifiers: ElementCardFinancialNetworkIdentifiers + """Network-specific identifiers for a specific request or transaction.""" + + network_risk_score: Optional[int] = None + """The risk score generated by the card network. + + For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where + 99 is the riskiest. For Pulse the score is from 0 to 999, where 999 is the + riskiest. + """ + + physical_card_id: Optional[str] = None + """ + If the authorization was made in-person with a physical card, the Physical Card + that was used. + """ + + presentment_amount: int + """The pending amount in the minor unit of the transaction's presentment currency.""" + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + + processing_category: Literal[ + "account_funding", + "automatic_fuel_dispenser", + "bill_payment", + "original_credit", + "purchase", + "quasi_cash", + "refund", + "cash_disbursement", + "unknown", + ] + """ + The processing category describes the intent behind the financial, such as + whether it was used for bill payments or an automatic fuel dispenser. + + - `account_funding` - Account funding transactions are transactions used to + e.g., fund an account or transfer funds between accounts. + - `automatic_fuel_dispenser` - Automatic fuel dispenser authorizations occur + when a card is used at a gas pump, prior to the actual transaction amount + being known. They are followed by an advice message that updates the amount of + the pending transaction. + - `bill_payment` - A transaction used to pay a bill. + - `original_credit` - Original credit transactions are used to send money to a + cardholder. + - `purchase` - A regular purchase. + - `quasi_cash` - Quasi-cash transactions represent purchases of items which may + be convertible to cash. + - `refund` - A refund card authorization, sometimes referred to as a credit + voucher authorization, where funds are credited to the cardholder. + - `cash_disbursement` - Cash disbursement transactions are used to withdraw cash + from an ATM or a point of sale. + - `unknown` - The processing category is unknown. + """ + + real_time_decision_id: Optional[str] = None + """ + The identifier of the Real-Time Decision sent to approve or decline this + transaction. + """ + + terminal_id: Optional[str] = None + """ + The terminal identifier (commonly abbreviated as TID) of the terminal the card + is transacting with. + """ + + transaction_id: str + """The identifier of the Transaction associated with this Transaction.""" + + type: Literal["card_financial"] + """A constant representing the object's type. + + For this resource it will always be `card_financial`. + """ + + verification: ElementCardFinancialVerification + """Fields related to verification of cardholder-provided values.""" + + class ElementCardFuelConfirmationNetworkIdentifiers(BaseModel): authorization_identification_response: Optional[str] = None """ @@ -3837,6 +4443,14 @@ class Element(BaseModel): equal to `card_decline`. """ + card_financial: Optional[ElementCardFinancial] = None + """A Card Financial object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_financial`. Card Financials are temporary holds placed on a + customers funds with the intent to later clear a transaction. + """ + card_fuel_confirmation: Optional[ElementCardFuelConfirmation] = None """A Card Fuel Confirmation object. @@ -3899,6 +4513,7 @@ class Element(BaseModel): "card_settlement", "card_refund", "card_fuel_confirmation", + "card_financial", "other", ] """The type of the resource. @@ -3925,6 +4540,8 @@ class Element(BaseModel): - `card_refund` - Card Refund: details will be under the `card_refund` object. - `card_fuel_confirmation` - Card Fuel Confirmation: details will be under the `card_fuel_confirmation` object. + - `card_financial` - Card Financial: details will be under the `card_financial` + object. - `other` - Unknown card payment element. """ From 2fc1ba868ec5323ce5e1c384206c2366a2ca596e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Oct 2025 17:43:50 +0000 Subject: [PATCH 2/2] release: 0.369.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/increase/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 741f062e3..ec847edc6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.368.0" + ".": "0.369.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 46464b259..99da7ccf1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.369.0 (2025-10-28) + +Full Changelog: [v0.368.0...v0.369.0](https://github.com/Increase/increase-python/compare/v0.368.0...v0.369.0) + +### Features + +* **api:** api update ([79cdfa6](https://github.com/Increase/increase-python/commit/79cdfa63e8f57a3a0a358e298e0393f745196d65)) + ## 0.368.0 (2025-10-27) Full Changelog: [v0.367.0...v0.368.0](https://github.com/Increase/increase-python/compare/v0.367.0...v0.368.0) diff --git a/pyproject.toml b/pyproject.toml index 709246b5f..14146b21d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.368.0" +version = "0.369.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index a035b4468..d3fb4df20 100644 --- a/src/increase/_version.py +++ b/src/increase/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "increase" -__version__ = "0.368.0" # x-release-please-version +__version__ = "0.369.0" # x-release-please-version