Skip to content

Releases: stripe/stripe-php

v17.0.0

01 Apr 20:48
Compare
Choose a tag to compare
  • #1837 Better type hints in your editor!!

    • Added type hints for method parameters
      • PHPStorm IDE with array type hints
    • Improved type hints for resource properties that are not primitive types. Take for example, the invoice settings in Customer resource. Previously, you could not reference inner fields like custom_fields on customer->invoice_settings without PHPStan complaining. This is now fixed.
  • #1818 Support for APIs in the new API version 2025-03-31.basil

    This release changes the pinned API version to 2025-03-31.basil.

    ⚠️ Breaking changes due to changes in the Stripe API

    Please review details for the breaking changes and alternatives in the Stripe API changelog before upgrading.

    • Remove support for resources UsageRecordSummary and UsageRecord
    • Remove support for create method on resource UsageRecord
    • Remove support for all method on resource UsageRecordSummary
    • Remove support for upcomingLines and upcoming methods on resource Invoice
    • Remove support for invoice on Charge and PaymentIntent
    • Remove support for shipping_details on Checkout.Session
    • Remove support for refund on CreditNote
    • Remove support for tax_amounts on CreditNoteLineItem, CreditNote, and InvoiceLineItem
    • Remove support for amount_excluding_tax and unit_amount_excluding_tax on CreditNoteLineItem and InvoiceLineItem
    • Remove support for application_fee_amount, charge, paid_out_of_band, paid, payment_intent, quote, subscription, subscription_details, subscription_proration_date, tax, total_tax_amounts, and transfer_data on Invoice
    • Remove support for discount on Invoice and Subscription
    • Remove support for invoice_item, proration_details, proration, tax_rates, and type on InvoiceLineItem
    • Remove support for plan, price, and subscription_item on InvoiceItem and InvoiceLineItem
    • Remove support for subscription, unit_amount_decimal, and unit_amount on InvoiceItem
    • Remove support for aggregate_usage on Plan
    • Remove support for billing_thresholds on SubscriptionItem and Subscription
    • Remove support for current_period_end and current_period_start on Subscription

    ⚠️ Other Breaking changes in the SDK

    • #1826 configure max_nextwork_retries at the client level
      • Allow setting maxNetworkRetries at the StripeClient level via a new argument to the RequestOptions constructor
        • ⚠️ (potentially breaking) a client's configuration for maxNetworkRetries is set during client initialization. Subsequent calls to Stripe::setMaxNetworkRetries() after client creation won't affect that client.
      • Allow setting maxNetworkRetries per-request via the max_network_retries config argument. This works for both the service and resource based patterns. In both cases, an explicitly passed value takes precedence over the global (or client) value.
    • #1835 Removed the protected method _searchResource as it is no longer used
      • ⚠️ Removed _searchResource method and Search trait. Use the public search method on Charge, Customer, Invoice, PaymentIntent, Price, Product, and Subscription resource.
    • #1832 Added requestCollection and requestSearchResult to StripeClientInterface
      • ⚠️ Added requestSearchResult, requestCollection to StripeClientInterface. Developers building custom StripeClient will now have to implement these new methods.

    Additions

    • Add support for new resource InvoicePayment
    • Add support for all and retrieve methods on resource InvoicePayment
    • Add support for new values forwarding_api_retryable_upstream_error and setup_intent_mobile_wallet_unsupported on enums Invoice.last_finalization_error.code, PaymentIntent.last_payment_error.code, SetupAttempt.setup_error.code, SetupIntent.last_setup_error.code, and StripeError.code
    • Add support for new values stripe_balance_payment_debit_reversal and stripe_balance_payment_debit on enum BalanceTransaction.type
    • Add support for new value last on enum Billing.Meter.default_aggregation.formula
    • Add support for presentment_details on Charge, Checkout.Session, PaymentIntent, and Refund
    • Add support for optional_items on Checkout.Session and PaymentLink
    • Add support for permissions on Checkout.Session
    • Add support for new value custom on enum Checkout.Session.ui_mode
    • Add support for new values billie, nz_bank_account, and satispay on enums ConfirmationToken.payment_method_preview.type and PaymentMethod.type
    • Add support for refunds on CreditNote
    • Add support for total_taxes on CreditNote and Invoice
    • Add support for taxes on CreditNoteLineItem and InvoiceLineItem
    • Add support for checkout_session on CustomerBalanceTransaction
    • Add support for new values checkout_session_subscription_payment_canceled and checkout_session_subscription_payment on enum CustomerBalanceTransaction.type
    • Add support for new value invoice.overpaid on enum Event.type
    • Add support for amount_overpaid, confirmation_secret, and payments on Invoice
    • Add support for parent on InvoiceItem, InvoiceLineItem, and Invoice
    • Add support for new values klarna and nz_bank_account on enums Invoice.payment_settings.payment_method_types and Subscription.payment_settings.payment_method_types
    • Add support for pricing on InvoiceItem and InvoiceLineItem
    • Add support for new value network_fallback on enum Issuing.Authorization.request_history[].reason
    • Add support for new value expired on enum Issuing.Authorization.status
    • Add support for new value expired on enum PaymentIntent.cancellation_reason
    • Add support for new values billie and satispay on enum PaymentLink.payment_method_types
    • Add support for billie, nz_bank_account, and satispay on PaymentMethodConfiguration and PaymentMethod
    • Add support for new value canceled on enum Review.closed_reason
    • Add support for current_period_end and current_period_start on SubscriptionItem
    • Add support for wifi on Terminal.Configuration

See the changelog for more details.

v16.7.0-beta.1

18 Mar 20:36
Compare
Choose a tag to compare
v16.7.0-beta.1 Pre-release
Pre-release
  • #1820 Beta SDK updates between Open API versions 1473 and 1505
    Codegen for openapi 1505.

    • Add support for succeed_input_collection and timeout_input_collection test helper methods on resource Terminal.Reader
  • #1825 Results of running formatter

  • #1823 Merge from stripe-php master

  • #1821 Merge from stripe-php master

  • #1808 Update generated code for beta

  • #1803 Update generated code for beta

    • V2 Events now are subclass of \Stripe\V2\Event.
  • #1796 Update generated code for beta

    • Add support for close method on resource Treasury.FinancialAccount
    • Add support for advice_code on StripeError
    • Add support for brand_product on Card
    • Add support for is_default and nickname on Treasury.FinancialAccount
  • #1794 Improved php type hints

    Adds Create/Update/Retrieve/Delete/All/Search parameters

    You will now be able to get type hints of the keys that can passed without switching out of your IDE. Eg.

    * @param null|array{customer:string, components: array} $params
    PHPStorm IDE with array type hints

    Updated StripeObject class properties

    We changed the type of class properties from StripeObject to something more specific.

    For example: Invoice settings was defined as a StripeObject in Customer resource.

    https://github.com/stripe/stripe-php/blob/bae10cd799404f0f4862ec03810c5ff8ca634b30/lib/Customer.php#L25

    Now you will be able to reference custom_fields and rendering_options on customer->invoice_settings without PHPStan complaining.

    * @property object{custom_fields: null|object{name: string, value: string}&\Stripe\StripeObject&\stdClass[], default_payment_method: null|string|\Stripe\PaymentMethod, footer: null|string, rendering_options: null|object{amount_tax_display: null|string, template: null|string}&\Stripe\StripeObject&\stdClass}&\Stripe\StripeObject&\stdClass $invoice_settings
     */
  • #1792 Update generated code for beta

    • Add support for allow_redisplay on Card and Source
    • Remove support for amount_refunded on PaymentRecord
  • #1790 Update generated code for beta

    • Add support for new values payout_minimum_balance_hold and payout_minimum_balance_release on enum BalanceTransaction.type
  • #1788 Update generated code for beta

    • Add support for network_advice_code and network_decline_code on StripeError
    • Add support for new value invoice.overpaid on enum Event.type
    • Add support for adjustable_quantity, display, and metadata on LineItem
    • Change type of LineItem.description from string to nullable(string)
  • #1784 Update generated code for beta

  • #1783 Update generated code for beta

    • Add support for new resources Issuing.FraudLiabilityDebit, PaymentAttemptRecord, and PaymentRecord
    • Add support for all and retrieve methods on resources FraudLiabilityDebit and PaymentAttemptRecord
    • Add support for report_payment_attempt_canceled, report_payment_attempt_failed, report_payment_attempt_guaranteed, report_payment_attempt, report_payment, and retrieve methods on resource PaymentRecord
    • Add support for adaptive_pricing on Checkout.Session
    • Add support for new values invoice.payment_attempt_required and issuing_fraud_liability_debit.created on enum Event.type
    • Add support for amount_overpaid on Invoice
    • Add support for new value li_vat on enum TaxId.type
    • Add support for new value service_tax on enum TaxRate.tax_type
    • Change type of Treasury.InboundTransfer.origin_payment_method from string to nullable(string)
  • #1780 Update generated code for beta

    • Add support for trigger_action method on resource PaymentIntent
    • Remove support for value payout_statement_descriptor_profanity from enum StripeError.code
    • Add support for id_bank_transfer on PaymentMethodConfiguration and PaymentMethod
    • Add support for gopay, qris, and shopeepay on PaymentMethodConfiguration
  • #1774 Update generated code for beta

    • Remove support for value expired from enum Issuing.Authorization.status
    • Add support for new values alma, gopay, qris, and shopeepay on enum PaymentLink.payment_method_types[]
    • Add support for alma on PaymentMethodConfiguration and PaymentMethod
    • Add support for gopay, qris, and shopeepay on PaymentMethod
    • Add support for new values alma, gopay, qris, and shopeepay on enum PaymentMethod.type
    • Add support for amazon_pay on PaymentMethodDomain
    • Add support for au_serr, ca_mrdp, eu_dac7, gb_mrdp, and nz_mrdp on Tax.Form
    • Add support for new values au_serr, ca_mrdp, eu_dac7, gb_mrdp, and nz_mrdp on enum Tax.Form.type
  • #1749 Update generated code for beta

    • Add support for submit_card test helper method on resource Issuing.Card
    • Add support for groups on Account
    • Add support for new value payout_statement_descriptor_profanity on enum StripeError.code
    • Add support for new value refund.failed on enum Event.type
    • Add support for metadata on Forwarding.Request
    • Add support for new value expired on enum Issuing.Authorization.status
    • Add support for kakao_pay, kr_card, naver_pay, payco, and samsung_pay on PaymentMethod
    • Add support for new values kakao_pay, kr_card, naver_pay, payco, and samsung_pay on enum PaymentMethod.type
    • Add support for new values by_tin, ma_vat, md_vat, tz_vat, uz_tin, and uz_vat on enum TaxId.type
    • Add support for flat_amount and rate_type on TaxRate
    • Add support for new value retail_delivery_fee on enum TaxRate.tax_type
  • #1770 Merge into beta using the merge script

  • #1766 Merge updates from stripe-php master to beta

    • The Preview class has been removed. Please use rawRequest instead which accepts
      • the http method as parameter instead of the dedicated methods in the Preview class
      • an apiMode of v1 instead of standard and v2 instead of preview.
  • #1748 Update generated code for beta

    • Remove support for resource QuotePhase
    • Remove support for list_line_items and retrieve methods on resource QuotePhase
    • Add support for new value rechnung on enum PaymentLink.payment_method_types[]
  • #1743 Update generated code for beta

    • Add support for new resources Issuing.DisputeSettlementDetail and Issuing.Settlement
    • Add support for all and retrieve methods on resource DisputeSettlementDetail
    • Remove support for all method on resource QuotePhase
    • Add support for new values issuing_dispute_settlement_detail.created, issuing_dispute_settlement_detail.updated, issuing_settlement.created, and issuing_settlement.updated on enum Event.type
    • Add support for settlement on Issuing.Transaction
  • #1738 Update generated code for beta

    • Add support for new resources Billing.MeterErrorReport and Terminal.ReaderCollectedData
    • Add support for retrieve method on resource ReaderCollectedData
    • Add support for new value terminal_reader_collected_data_invalid on enum StripeError.code
    • Add support for new value billing.meter_error_report.triggered on enum Event.type
    • Add support for regulatory_reporting_file on Issuing.CreditUnderwritingRecord
    • Add support for new value mb_way on enum PaymentLink.payment_method_types[]
    • Add support for mb_way on PaymentMethod
    • Add support for new value mb_way on enum PaymentMethod.type
  • #1735 Update generated code for beta

    • Add support for collected_information and permissions on Checkout.Session
  • #1730 Update generated code for beta

    • Add support for new value custom on enum Checkout.Session.ui_mode
    • Add support for new value payto on enum PaymentLink.payment_method_types[]
  • #1728 Update generated code for beta

    • Add support for attach_payment method on resource Invoice
    • Add support for last_price_migration_error on SubscriptionSchedule and Subscription
  • #1723 Update generated code for beta

    • Add support for new resources Billing.AlertTriggered, Billing.Alert, and Tax.Association
    • Add support for activate, all, archive, create, deactivate, and retrieve methods on resource Alert
    • Add support for find method on resource Association
    • Add support for new values issuing.account_closed_for_not_providing_business_model_clarification, `issuing.account_closed_for_not_providi...
Read more

v16.6.0

24 Feb 22:35
Compare
Choose a tag to compare
  • #1809 Update generated code
    • Add support for priority on Billing.CreditGrant
    • Add support for collected_information on Checkout.Session
  • #1816 add codeowners file

See the changelog for more details.

v16.6.0-beta.1

07 Feb 21:46
Compare
Choose a tag to compare
v16.6.0-beta.1 Pre-release
Pre-release
  • #1808 Update generated code for beta

See the changelog for more details.

v16.5.1

07 Feb 21:24
Compare
Choose a tag to compare
  • #1811 Include a useful error message when a null byte is found in the URL path
  • #1810 Make httpClient() a public, static method

See the changelog for more details.

v16.5.0

27 Jan 20:20
Compare
Choose a tag to compare
  • #1804 Update generated code
    • Add support for close method on resource Treasury.FinancialAccount
    • Add support for discounts on Checkout.Session
    • Add support for new value pay_by_bank on enum PaymentLink.payment_method_types[]
    • Add support for pay_by_bank on PaymentMethodConfiguration and PaymentMethod
    • Add support for new value pay_by_bank on enum PaymentMethod.type
    • Add support for is_default and nickname on Treasury.FinancialAccount
  • #1805 Restore testCoreEventsGet generated test
  • #1807 minor justfile fixes
  • #1806 Added CONTRIBUTING.md file
  • #1802 ensure dependencies are installed for format and test recipes
  • #1801 Add justfile, remove coveralls, and fix AUTOLOAD in CI
  • #1797 Added pull request template

See the changelog for more details.

v16.5.0-beta.3

23 Jan 21:25
Compare
Choose a tag to compare
v16.5.0-beta.3 Pre-release
Pre-release
  • #1803 Update generated code for beta
    • V2 Events now are subclass of \Stripe\V2\Event.

See the changelog for more details.

v16.5.0-beta.2

09 Jan 21:39
Compare
Choose a tag to compare
v16.5.0-beta.2 Pre-release
Pre-release
  • #1796 Update generated code for beta
    • Add support for close method on resource Treasury.FinancialAccount
    • Add support for advice_code on StripeError
    • Add support for brand_product on Card
    • Add support for is_default and nickname on Treasury.FinancialAccount

See the changelog for more details.

v16.5.0-beta.1

20 Dec 18:08
Compare
Choose a tag to compare
v16.5.0-beta.1 Pre-release
Pre-release
  • #1794 Improved php type hints

    Adds Create/Update/Retrieve/Delete/All/Search parameters

    You will now be able to get type hints of the keys that can passed without switching out of your IDE. Eg.

    * @param null|array{customer:string, components: array} $params
    PHPStorm IDE with array type hints

    Updated StripeObject class properties

    We changed the type of class properties from StripeObject to something more specific.

    For example: Invoice settings was defined as a StripeObject in Customer resource.

    https://github.com/stripe/stripe-php/blob/bae10cd799404f0f4862ec03810c5ff8ca634b30/lib/Customer.php#L25

    Now you will be able to reference custom_fields and rendering_options on customer->invoice_settings without PHPStan complaining.

    * @property object{custom_fields: null|object{name: string, value: string}&\Stripe\StripeObject&\stdClass[], default_payment_method: null|string|\Stripe\PaymentMethod, footer: null|string, rendering_options: null|object{amount_tax_display: null|string, template: null|string}&\Stripe\StripeObject&\stdClass}&\Stripe\StripeObject&\stdClass $invoice_settings
     */

See the changelog for more details.

v16.4.0

18 Dec 23:42
Compare
Choose a tag to compare
  • #1793 This release changes the pinned API version to 2024-12-18.acacia.
    • Add support for new values payout_minimum_balance_hold and payout_minimum_balance_release on enum BalanceTransaction.type
    • Add support for allow_redisplay on Card and Source
    • Add support for regulated_status on Card
    • Add support for new value request_signature on enum Forwarding.Request.replacements[]
    • Change type of LineItem.description from string to nullable(string)
    • Add support for new values al_tin, am_tin, ao_tin, ba_tin, bb_tin, bs_tin, cd_nif, gn_nif, kh_tin, me_pib, mk_vat, mr_nif, np_pan, sn_ninea, sr_fin, tj_tin, ug_tin, zm_tin, and zw_tin on enum TaxId.type

See the changelog for more details.