-
#1837 Better type hints in your editor!!
- Added type hints for method parameters
- 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_fieldsoncustomer->invoice_settingswithout 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
UsageRecordSummaryandUsageRecord - Remove support for
createmethod on resourceUsageRecord - Remove support for
allmethod on resourceUsageRecordSummary - Remove support for
upcomingLinesandupcomingmethods on resourceInvoice - Remove support for
invoiceonChargeandPaymentIntent - Remove support for
shipping_detailsonCheckout.Session - Remove support for
refundonCreditNote - Remove support for
tax_amountsonCreditNoteLineItem,CreditNote, andInvoiceLineItem - Remove support for
amount_excluding_taxandunit_amount_excluding_taxonCreditNoteLineItemandInvoiceLineItem - 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, andtransfer_dataonInvoice - Remove support for
discountonInvoiceandSubscription - Remove support for
invoice_item,proration_details,proration,tax_rates, andtypeonInvoiceLineItem - Remove support for
plan,price, andsubscription_itemonInvoiceItemandInvoiceLineItem - Remove support for
subscription,unit_amount_decimal, andunit_amountonInvoiceItem - Remove support for
aggregate_usageonPlan - Remove support for
billing_thresholdsonSubscriptionItemandSubscription - Remove support for
current_period_endandcurrent_period_startonSubscription
⚠️ Other Breaking changes in the SDK
- #1826 configure max_nextwork_retries at the client level
- Allow setting
maxNetworkRetriesat theStripeClientlevel via a new argument to theRequestOptionsconstructor- ⚠️ (potentially breaking) a client's configuration for
maxNetworkRetriesis set during client initialization. Subsequent calls toStripe::setMaxNetworkRetries()after client creation won't affect that client.
- ⚠️ (potentially breaking) a client's configuration for
- Allow setting
maxNetworkRetriesper-request via themax_network_retriesconfig 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.
- Allow setting
- #1835 Removed the protected method _searchResource as it is no longer used
- ⚠️ Removed
_searchResourcemethod andSearchtrait. Use the publicsearchmethod onCharge,Customer,Invoice,PaymentIntent,Price,Product, andSubscriptionresource.
- ⚠️ Removed
- #1832 Added requestCollection and requestSearchResult to StripeClientInterface
- ⚠️ Added
requestSearchResult,requestCollectiontoStripeClientInterface. Developers building custom StripeClient will now have to implement these new methods.- Refer to our implementation in BaseStripeClient for guidance.
- ⚠️ Added
Additions
- Add support for new resource
InvoicePayment - Add support for
allandretrievemethods on resourceInvoicePayment - Add support for new values
forwarding_api_retryable_upstream_errorandsetup_intent_mobile_wallet_unsupportedon enumsInvoice.last_finalization_error.code,PaymentIntent.last_payment_error.code,SetupAttempt.setup_error.code,SetupIntent.last_setup_error.code, andStripeError.code - Add support for new values
stripe_balance_payment_debit_reversalandstripe_balance_payment_debiton enumBalanceTransaction.type - Add support for new value
laston enumBilling.Meter.default_aggregation.formula - Add support for
presentment_detailsonCharge,Checkout.Session,PaymentIntent, andRefund - Add support for
optional_itemsonCheckout.SessionandPaymentLink - Add support for
permissionsonCheckout.Session - Add support for new value
customon enumCheckout.Session.ui_mode - Add support for new values
billie,nz_bank_account, andsatispayon enumsConfirmationToken.payment_method_preview.typeandPaymentMethod.type - Add support for
refundsonCreditNote - Add support for
total_taxesonCreditNoteandInvoice - Add support for
taxesonCreditNoteLineItemandInvoiceLineItem - Add support for
checkout_sessiononCustomerBalanceTransaction - Add support for new values
checkout_session_subscription_payment_canceledandcheckout_session_subscription_paymenton enumCustomerBalanceTransaction.type - Add support for new value
invoice.overpaidon enumEvent.type - Add support for
amount_overpaid,confirmation_secret, andpaymentsonInvoice - Add support for
parentonInvoiceItem,InvoiceLineItem, andInvoice - Add support for new values
klarnaandnz_bank_accounton enumsInvoice.payment_settings.payment_method_typesandSubscription.payment_settings.payment_method_types - Add support for
pricingonInvoiceItemandInvoiceLineItem - Add support for new value
network_fallbackon enumIssuing.Authorization.request_history[].reason - Add support for new value
expiredon enumIssuing.Authorization.status - Add support for new value
expiredon enumPaymentIntent.cancellation_reason - Add support for new values
billieandsatispayon enumPaymentLink.payment_method_types - Add support for
billie,nz_bank_account, andsatispayonPaymentMethodConfigurationandPaymentMethod - Add support for new value
canceledon enumReview.closed_reason - Add support for
current_period_endandcurrent_period_startonSubscriptionItem - Add support for
wifionTerminal.Configuration
- Remove support for resources
