Releases: stripe/stripe-php
v17.0.0
-
#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_fields
oncustomer->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 APIPlease review details for the breaking changes and alternatives in the Stripe API changelog before upgrading.
- Remove support for resources
UsageRecordSummary
andUsageRecord
- Remove support for
create
method on resourceUsageRecord
- Remove support for
all
method on resourceUsageRecordSummary
- Remove support for
upcomingLines
andupcoming
methods on resourceInvoice
- Remove support for
invoice
onCharge
andPaymentIntent
- Remove support for
shipping_details
onCheckout.Session
- Remove support for
refund
onCreditNote
- Remove support for
tax_amounts
onCreditNoteLineItem
,CreditNote
, andInvoiceLineItem
- Remove support for
amount_excluding_tax
andunit_amount_excluding_tax
onCreditNoteLineItem
andInvoiceLineItem
- 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_data
onInvoice
- Remove support for
discount
onInvoice
andSubscription
- Remove support for
invoice_item
,proration_details
,proration
,tax_rates
, andtype
onInvoiceLineItem
- Remove support for
plan
,price
, andsubscription_item
onInvoiceItem
andInvoiceLineItem
- Remove support for
subscription
,unit_amount_decimal
, andunit_amount
onInvoiceItem
- Remove support for
aggregate_usage
onPlan
- Remove support for
billing_thresholds
onSubscriptionItem
andSubscription
- Remove support for
current_period_end
andcurrent_period_start
onSubscription
⚠️ Other Breaking changes in the SDK- #1826 configure max_nextwork_retries at the client level
- Allow setting
maxNetworkRetries
at theStripeClient
level via a new argument to theRequestOptions
constructor⚠️ (potentially breaking) a client's configuration formaxNetworkRetries
is set during client initialization. Subsequent calls toStripe::setMaxNetworkRetries()
after client creation won't affect that client.
- Allow setting
maxNetworkRetries
per-request via themax_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.
- Allow setting
- #1835 Removed the protected method _searchResource as it is no longer used
⚠️ Removed_searchResource
method andSearch
trait. Use the publicsearch
method onCharge
,Customer
,Invoice
,PaymentIntent
,Price
,Product
, andSubscription
resource.
- #1832 Added requestCollection and requestSearchResult to StripeClientInterface
⚠️ AddedrequestSearchResult
,requestCollection
toStripeClientInterface
. Developers building custom StripeClient will now have to implement these new methods.- Refer to our implementation in BaseStripeClient for guidance.
Additions
- Add support for new resource
InvoicePayment
- Add support for
all
andretrieve
methods on resourceInvoicePayment
- Add support for new values
forwarding_api_retryable_upstream_error
andsetup_intent_mobile_wallet_unsupported
on 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_reversal
andstripe_balance_payment_debit
on enumBalanceTransaction.type
- Add support for new value
last
on enumBilling.Meter.default_aggregation.formula
- Add support for
presentment_details
onCharge
,Checkout.Session
,PaymentIntent
, andRefund
- Add support for
optional_items
onCheckout.Session
andPaymentLink
- Add support for
permissions
onCheckout.Session
- Add support for new value
custom
on enumCheckout.Session.ui_mode
- Add support for new values
billie
,nz_bank_account
, andsatispay
on enumsConfirmationToken.payment_method_preview.type
andPaymentMethod.type
- Add support for
refunds
onCreditNote
- Add support for
total_taxes
onCreditNote
andInvoice
- Add support for
taxes
onCreditNoteLineItem
andInvoiceLineItem
- Add support for
checkout_session
onCustomerBalanceTransaction
- Add support for new values
checkout_session_subscription_payment_canceled
andcheckout_session_subscription_payment
on enumCustomerBalanceTransaction.type
- Add support for new value
invoice.overpaid
on enumEvent.type
- Add support for
amount_overpaid
,confirmation_secret
, andpayments
onInvoice
- Add support for
parent
onInvoiceItem
,InvoiceLineItem
, andInvoice
- Add support for new values
klarna
andnz_bank_account
on enumsInvoice.payment_settings.payment_method_types
andSubscription.payment_settings.payment_method_types
- Add support for
pricing
onInvoiceItem
andInvoiceLineItem
- Add support for new value
network_fallback
on enumIssuing.Authorization.request_history[].reason
- Add support for new value
expired
on enumIssuing.Authorization.status
- Add support for new value
expired
on enumPaymentIntent.cancellation_reason
- Add support for new values
billie
andsatispay
on enumPaymentLink.payment_method_types
- Add support for
billie
,nz_bank_account
, andsatispay
onPaymentMethodConfiguration
andPaymentMethod
- Add support for new value
canceled
on enumReview.closed_reason
- Add support for
current_period_end
andcurrent_period_start
onSubscriptionItem
- Add support for
wifi
onTerminal.Configuration
- Remove support for resources
v16.7.0-beta.1
-
#1820 Beta SDK updates between Open API versions 1473 and 1505
Codegen for openapi 1505.- Add support for
succeed_input_collection
andtimeout_input_collection
test helper methods on resourceTerminal.Reader
- Add support for
-
#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
.
- V2 Events now are subclass of
-
#1796 Update generated code for beta
- Add support for
close
method on resourceTreasury.FinancialAccount
- Add support for
advice_code
onStripeError
- Add support for
brand_product
onCard
- Add support for
is_default
andnickname
onTreasury.FinancialAccount
- Add support for
-
#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
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.
Now you will be able to reference
custom_fields
andrendering_options
oncustomer->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
onCard
andSource
- Remove support for
amount_refunded
onPaymentRecord
- Add support for
-
#1790 Update generated code for beta
- Add support for new values
payout_minimum_balance_hold
andpayout_minimum_balance_release
on enumBalanceTransaction.type
- Add support for new values
-
#1788 Update generated code for beta
- Add support for
network_advice_code
andnetwork_decline_code
onStripeError
- Add support for new value
invoice.overpaid
on enumEvent.type
- Add support for
adjustable_quantity
,display
, andmetadata
onLineItem
- Change type of
LineItem.description
fromstring
tonullable(string)
- Add support for
-
#1784 Update generated code for beta
-
#1783 Update generated code for beta
- Add support for new resources
Issuing.FraudLiabilityDebit
,PaymentAttemptRecord
, andPaymentRecord
- Add support for
all
andretrieve
methods on resourcesFraudLiabilityDebit
andPaymentAttemptRecord
- Add support for
report_payment_attempt_canceled
,report_payment_attempt_failed
,report_payment_attempt_guaranteed
,report_payment_attempt
,report_payment
, andretrieve
methods on resourcePaymentRecord
- Add support for
adaptive_pricing
onCheckout.Session
- Add support for new values
invoice.payment_attempt_required
andissuing_fraud_liability_debit.created
on enumEvent.type
- Add support for
amount_overpaid
onInvoice
- Add support for new value
li_vat
on enumTaxId.type
- Add support for new value
service_tax
on enumTaxRate.tax_type
- Change type of
Treasury.InboundTransfer.origin_payment_method
fromstring
tonullable(string)
- Add support for new resources
-
#1780 Update generated code for beta
- Add support for
trigger_action
method on resourcePaymentIntent
- Remove support for value
payout_statement_descriptor_profanity
from enumStripeError.code
- Add support for
id_bank_transfer
onPaymentMethodConfiguration
andPaymentMethod
- Add support for
gopay
,qris
, andshopeepay
onPaymentMethodConfiguration
- Add support for
-
#1774 Update generated code for beta
- Remove support for value
expired
from enumIssuing.Authorization.status
- Add support for new values
alma
,gopay
,qris
, andshopeepay
on enumPaymentLink.payment_method_types[]
- Add support for
alma
onPaymentMethodConfiguration
andPaymentMethod
- Add support for
gopay
,qris
, andshopeepay
onPaymentMethod
- Add support for new values
alma
,gopay
,qris
, andshopeepay
on enumPaymentMethod.type
- Add support for
amazon_pay
onPaymentMethodDomain
- Add support for
au_serr
,ca_mrdp
,eu_dac7
,gb_mrdp
, andnz_mrdp
onTax.Form
- Add support for new values
au_serr
,ca_mrdp
,eu_dac7
,gb_mrdp
, andnz_mrdp
on enumTax.Form.type
- Remove support for value
-
#1749 Update generated code for beta
- Add support for
submit_card
test helper method on resourceIssuing.Card
- Add support for
groups
onAccount
- Add support for new value
payout_statement_descriptor_profanity
on enumStripeError.code
- Add support for new value
refund.failed
on enumEvent.type
- Add support for
metadata
onForwarding.Request
- Add support for new value
expired
on enumIssuing.Authorization.status
- Add support for
kakao_pay
,kr_card
,naver_pay
,payco
, andsamsung_pay
onPaymentMethod
- Add support for new values
kakao_pay
,kr_card
,naver_pay
,payco
, andsamsung_pay
on enumPaymentMethod.type
- Add support for new values
by_tin
,ma_vat
,md_vat
,tz_vat
,uz_tin
, anduz_vat
on enumTaxId.type
- Add support for
flat_amount
andrate_type
onTaxRate
- Add support for new value
retail_delivery_fee
on enumTaxRate.tax_type
- Add support for
-
#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
ofv1
instead ofstandard
andv2
instead ofpreview
.
- the http method as parameter instead of the dedicated methods in the
- The
-
#1748 Update generated code for beta
- Remove support for resource
QuotePhase
- Remove support for
list_line_items
andretrieve
methods on resourceQuotePhase
- Add support for new value
rechnung
on enumPaymentLink.payment_method_types[]
- Remove support for resource
-
#1743 Update generated code for beta
- Add support for new resources
Issuing.DisputeSettlementDetail
andIssuing.Settlement
- Add support for
all
andretrieve
methods on resourceDisputeSettlementDetail
- Remove support for
all
method on resourceQuotePhase
- Add support for new values
issuing_dispute_settlement_detail.created
,issuing_dispute_settlement_detail.updated
,issuing_settlement.created
, andissuing_settlement.updated
on enumEvent.type
- Add support for
settlement
onIssuing.Transaction
- Add support for new resources
-
#1738 Update generated code for beta
- Add support for new resources
Billing.MeterErrorReport
andTerminal.ReaderCollectedData
- Add support for
retrieve
method on resourceReaderCollectedData
- Add support for new value
terminal_reader_collected_data_invalid
on enumStripeError.code
- Add support for new value
billing.meter_error_report.triggered
on enumEvent.type
- Add support for
regulatory_reporting_file
onIssuing.CreditUnderwritingRecord
- Add support for new value
mb_way
on enumPaymentLink.payment_method_types[]
- Add support for
mb_way
onPaymentMethod
- Add support for new value
mb_way
on enumPaymentMethod.type
- Add support for new resources
-
#1735 Update generated code for beta
- Add support for
collected_information
andpermissions
onCheckout.Session
- Add support for
-
#1730 Update generated code for beta
- Add support for new value
custom
on enumCheckout.Session.ui_mode
- Add support for new value
payto
on enumPaymentLink.payment_method_types[]
- Add support for new value
-
#1728 Update generated code for beta
- Add support for
attach_payment
method on resourceInvoice
- Add support for
last_price_migration_error
onSubscriptionSchedule
andSubscription
- Add support for
-
#1723 Update generated code for beta
- Add support for new resources
Billing.AlertTriggered
,Billing.Alert
, andTax.Association
- Add support for
activate
,all
,archive
,create
,deactivate
, andretrieve
methods on resourceAlert
- Add support for
find
method on resourceAssociation
- Add support for new values
issuing.account_closed_for_not_providing_business_model_clarification
, `issuing.account_closed_for_not_providi...
- Add support for new resources
v16.6.0
v16.6.0-beta.1
- #1808 Update generated code for beta
v16.5.1
v16.5.0
- #1804 Update generated code
- Add support for
close
method on resourceTreasury.FinancialAccount
- Add support for
discounts
onCheckout.Session
- Add support for new value
pay_by_bank
on enumPaymentLink.payment_method_types[]
- Add support for
pay_by_bank
onPaymentMethodConfiguration
andPaymentMethod
- Add support for new value
pay_by_bank
on enumPaymentMethod.type
- Add support for
is_default
andnickname
onTreasury.FinancialAccount
- Add support for
- #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
v16.5.0-beta.3
- #1803 Update generated code for beta
- V2 Events now are subclass of
\Stripe\V2\Event
.
- V2 Events now are subclass of
v16.5.0-beta.2
- #1796 Update generated code for beta
- Add support for
close
method on resourceTreasury.FinancialAccount
- Add support for
advice_code
onStripeError
- Add support for
brand_product
onCard
- Add support for
is_default
andnickname
onTreasury.FinancialAccount
- Add support for
v16.5.0-beta.1
-
#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
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.
Now you will be able to reference
custom_fields
andrendering_options
oncustomer->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 */
v16.4.0
- #1793 This release changes the pinned API version to
2024-12-18.acacia
.- Add support for new values
payout_minimum_balance_hold
andpayout_minimum_balance_release
on enumBalanceTransaction.type
- Add support for
allow_redisplay
onCard
andSource
- Add support for
regulated_status
onCard
- Add support for new value
request_signature
on enumForwarding.Request.replacements[]
- Change type of
LineItem.description
fromstring
tonullable(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
, andzw_tin
on enumTaxId.type
- Add support for new values