Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
9a2ed1e
Update generated code (#2072)
stripe-openapi[bot] May 27, 2026
38b784d
Bump version to 20.2.0
mbroshi-stripe May 27, 2026
cb7ec09
Merge upstream and update generated code for v2277 and e410e9ac8e4f0d…
stripe-openapi[bot] May 28, 2026
382ded3
docs: clarify private preview SDK access in README (#2081)
jar-stripe Jun 4, 2026
4ec7510
Disable trim_trailing_whitespace for CHANGELOG.md (#2077)
jar-stripe Jun 5, 2026
9e4b768
Add Changelog section to PR template (#2078)
jar-stripe Jun 5, 2026
eef12d5
Merge upstream and update generated code for v2290 and a2127a04972df9…
stripe-openapi[bot] Jun 5, 2026
1312d46
Add source field to user-agent header (#2079)
xavdid Jun 5, 2026
ae5f1b3
Merge upstream and update generated code for v2290 and 2fbde613160d9a…
stripe-openapi[bot] Jun 6, 2026
c628cfa
Bump version to 20.2.1
xavdid Jun 12, 2026
b5b6735
Merge upstream and update generated code for v2303 and 368e28dbde85e7…
stripe-openapi[bot] Jun 12, 2026
2c1b5ae
Remove retired manual API tests fully covered by generated examples (…
jar-stripe Jun 12, 2026
711b852
Merge upstream and update generated code for v2305 and c26e09541d7120…
stripe-openapi[bot] Jun 13, 2026
59f11bf
Add PR disclaimer to README (#2085)
xavdid Jun 16, 2026
3e9dd75
Merge upstream and update generated code for v2314 and d4c29f23507218…
stripe-openapi[bot] Jun 16, 2026
bf60209
Update generated code for v2323 and 1f0a7866ce5b5e12153c09a04349f9148…
stripe-openapi[bot] Jun 23, 2026
3b48b79
Update generated code for v2324 and 6012b623b1c09ad54d466947da04511a0…
stripe-openapi[bot] Jun 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ indent_style = tab

[Makefile]
indent_style = tab

[CHANGELOG.md]
trim_trailing_whitespace = false
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,15 @@ List out the key changes made in this PR, e.g.

### See Also
<!-- Include any links or additional information that help explain this change. -->

## Changelog
<!-- Heads up! This section should include entries for any user-facing changes.
Either fill it out or remove it if there are no entries to report.
List changes that affect end users, e.g.
- Fixes crash when calling `foo.bar()` with null argument
- Adds support for new `baz` parameter on `PaymentIntent` creation
List breaking changes first with a ⚠️ prefix, e.g.
- ⚠️ Removes deprecated `legacy_method` function
-->
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,54 @@ This release changes the pinned API version to 2026-05-27.private.
* ⚠️ Change type of `V2.MoneyManagement.ReceivedCredit.bank_transfer.gb_bank_account.network` from `literal('fps')` to `enum('chaps'|'fps')`
* Add support for error codes `payment_method_microdeposit_processing_error` and `siret_invalid` on `QuotePreviewInvoice.last_finalization_error`

## 20.2.1 - 2026-06-12
* [#2079](https://github.com/stripe/stripe-php/pull/2079) Add "source" field to user-agent header

## 20.2.0 - 2026-05-27
This release changes the pinned API version to 2026-05-27.dahlia.

* [#2072](https://github.com/stripe/stripe-php/pull/2072) Update generated code
* Add support for new resource `V2.Commerce.ProductCatalogImport`
* Add support for `create` and `retrieve` methods on resource `V2.Commerce.ProductCatalogImport`
* Add support for `bizum_payments` and `scalapay_payments` on `Account.capabilities`, `Account.create().$params.capability`, and `Account.update().$params.capability`
* Add support for `automatic_transfer_rules_by_currency` on `BalanceSettings.payments.payouts` and `BalanceSettings.update().$params.payment.payout`
* Add support for `start_of_day` on `BalanceSettings.payments.settlement_timing` and `BalanceSettings.update().$params.payment.settlement_timing`
* Add support for `description` on `Charge.create().$params.transfer_datum`, `PaymentIntent.create().$params.transfer_datum`, `PaymentIntent.transfer_data`, and `PaymentIntent.update().$params.transfer_datum`
* Add support for `bizum` on `Charge.payment_method_details`, `ConfirmationToken.create().$params.payment_method_datum`, `ConfirmationToken.payment_method_preview`, `PaymentAttemptRecord.payment_method_details`, `PaymentIntent.confirm().$params.payment_method_datum`, `PaymentIntent.confirm().$params.payment_method_option`, `PaymentIntent.create().$params.payment_method_datum`, `PaymentIntent.create().$params.payment_method_option`, `PaymentIntent.payment_method_options`, `PaymentIntent.update().$params.payment_method_datum`, `PaymentIntent.update().$params.payment_method_option`, `PaymentMethod.create().$params`, `PaymentMethodConfiguration.create().$params`, `PaymentMethodConfiguration.update().$params`, `PaymentMethodConfiguration`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `SetupIntent.confirm().$params.payment_method_datum`, `SetupIntent.confirm().$params.payment_method_option`, `SetupIntent.create().$params.payment_method_datum`, `SetupIntent.create().$params.payment_method_option`, `SetupIntent.payment_method_options`, `SetupIntent.update().$params.payment_method_datum`, and `SetupIntent.update().$params.payment_method_option`
* Add support for `scalapay` on `Charge.payment_method_details`, `Checkout.Session.payment_method_options`, `Checkout\Session.create().$params.payment_method_option`, `ConfirmationToken.create().$params.payment_method_datum`, `ConfirmationToken.payment_method_preview`, `PaymentAttemptRecord.payment_method_details`, `PaymentIntent.confirm().$params.payment_method_datum`, `PaymentIntent.confirm().$params.payment_method_option`, `PaymentIntent.create().$params.payment_method_datum`, `PaymentIntent.create().$params.payment_method_option`, `PaymentIntent.payment_method_options`, `PaymentIntent.update().$params.payment_method_datum`, `PaymentIntent.update().$params.payment_method_option`, `PaymentMethod.create().$params`, `PaymentMethodConfiguration.create().$params`, `PaymentMethodConfiguration.update().$params`, `PaymentMethodConfiguration`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `Refund.destination_details`, `SetupIntent.confirm().$params.payment_method_datum`, `SetupIntent.create().$params.payment_method_datum`, and `SetupIntent.update().$params.payment_method_datum`
* Add support for `mandate` on `Charge.payment_method_details.twint`, `PaymentAttemptRecord.payment_method_details.twint`, and `PaymentRecord.payment_method_details.twint`
* Change type of `Checkout\Session.create().$params.payment_method_option.twint.setup_future_usage`, `PaymentIntent.confirm().$params.payment_method_option.twint.setup_future_usage`, `PaymentIntent.create().$params.payment_method_option.twint.setup_future_usage`, and `PaymentIntent.update().$params.payment_method_option.twint.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')`
* ⚠️ Change type of `Checkout.Session.payment_method_options.twint.setup_future_usage` and `PaymentIntent.payment_method_options.twint.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')`
* Add support for new values `bizum` and `scalapay` on enums `ConfirmationToken.payment_method_preview.type` and `PaymentMethod.type`
* Add support for `credited_items` on `InvoiceItem.proration_details`
* Add support for `discountable` on `Invoice.create_preview().$params.schedule_detail.phase.add_invoice_item`, `Subscription.create().$params.add_invoice_item`, `Subscription.update().$params.add_invoice_item`, `SubscriptionSchedule.create().$params.phase.add_invoice_item`, `SubscriptionSchedule.phases[].add_invoice_items[]`, and `SubscriptionSchedule.update().$params.phase.add_invoice_item`
* Add support for `billing_schedules` on `Invoice.create_preview().$params.subscription_detail`, `Subscription.create().$params`, `Subscription.update().$params`, and `Subscription`
* Add support for `amount_paid_off_stripe` on `Invoice`
* Add support for new value `twint` on enums `Invoice.payment_settings.payment_method_types` and `Subscription.payment_settings.payment_method_types`
* Add support for `twint` on `Mandate.payment_method_details` and `SetupAttempt.payment_method_details`
* Add support for `metadata` on `PaymentIntent.create().$params.transfer_datum`, `PaymentIntent.transfer_data`, `PaymentIntent.update().$params.transfer_datum`, and `Subscription.pending_update`
* Add support for `payment_data` on `PaymentIntent.create().$params.transfer_datum`, `PaymentIntent.transfer_data`, and `PaymentIntent.update().$params.transfer_datum`
* Add support for new values `bizum` and `scalapay` on enums `PaymentIntent.excluded_payment_method_types` and `SetupIntent.excluded_payment_method_types`
* Add support for `blik_authorize` on `PaymentIntent.next_action` and `SetupIntent.next_action`
* Add support for `payment_method_options` on `PaymentLink.create().$params`, `PaymentLink.update().$params`, and `PaymentLink`
* Add support for new value `bizum` on enum `PaymentLink.payment_method_types`
* Add support for `active` on `PaymentMethodConfiguration.all().$params`
* Add support for `billed_until` on `SubscriptionItem`
* Add support for `discount` and `discounts` on `Subscription.pending_update`
* Add support for `verifone_m425`, `verifone_p630`, `verifone_ux700`, and `verifone_v660p` on `Terminal.Configuration`, `Terminal\Configuration.create().$params`, and `Terminal\Configuration.update().$params`
* Add support for `api_error` and `print_content` on `Terminal.Reader.action`
* Add support for new value `print_content` on enum `Terminal.Reader.action.type`
* Add support for new values `simulated_verifone_m425`, `simulated_verifone_p630`, `simulated_verifone_ux700`, `simulated_verifone_v660p`, `verifone_m425`, `verifone_p630`, `verifone_ux700`, and `verifone_v660p` on enum `Terminal.Reader.device_type`
* Add support for `customer` on `TestHelpers\TestClock.create().$params`
* Add support for `signer` on `V2.Core.Account.identity.business_details.documents.proof_of_registration`, `V2.Core.Account.identity.business_details.documents.proof_of_ultimate_beneficial_ownership`, `V2\Core\Account.create().$params.identity.business_detail.document.proof_of_registration`, `V2\Core\Account.create().$params.identity.business_detail.document.proof_of_ultimate_beneficial_ownership`, `V2\Core\Account.update().$params.identity.business_detail.document.proof_of_registration`, `V2\Core\Account.update().$params.identity.business_detail.document.proof_of_ultimate_beneficial_ownership`, `V2\Core\AccountToken.create().$params.identity.business_detail.document.proof_of_registration`, and `V2\Core\AccountToken.create().$params.identity.business_detail.document.proof_of_ultimate_beneficial_ownership`
* Add support for `azure_event_grid` on `V2.Core.EventDestination` and `V2\Core\EventDestination.create().$params`
* Add support for new value `no_azure_partner_topic_exists` on enum `V2.Core.EventDestination.status_details.disabled.reason`
* Add support for new value `azure_event_grid` on enum `V2.Core.EventDestination.type`
* Add support for new value `meter_event_value_too_many_digits` on enums `EventsV1BillingMeterErrorReportTriggeredEvent.reason.error_types[].code` and `EventsV1BillingMeterNoMeterFoundEvent.reason.error_types[].code`
* Add support for event notifications `V2CommerceProductCatalogImportsFailedEvent`, `V2CommerceProductCatalogImportsProcessingEvent`, `V2CommerceProductCatalogImportsSucceededEvent`, and `V2CommerceProductCatalogImportsSucceededWithErrorsEvent` with related object `V2.Commerce.ProductCatalogImport`
* Add support for error codes `payment_method_microdeposit_processing_error` and `siret_invalid` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError`
* [#2071](https://github.com/stripe/stripe-php/pull/2071) Emit warning when `stripe-notify` header is present in response

## 20.2.0-beta.2 - 2026-04-24
* [#2060](https://github.com/stripe/stripe-php/pull/2060) Update generated code for beta
* Add support for new resources `V2.Commerce.ProductCatalogImport`, `V2.Data.Reporting.QueryRun`, `V2.Extend.WorkflowRun`, `V2.Extend.Workflow`, `V2.Iam.ActivityLog`, `V2.Network.BusinessProfile`, and `V2.OrchestratedCommerce.Agreement`
Expand Down
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d59a1f4bdea3032b8e282d40badc032cb021fc60
6012b623b1c09ad54d466947da04511a042ee45a
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2277
v2324
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Stripe::addBetaVersion("feature_beta", "v3");

### Private Preview SDKs

Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-alpha.X` suffix like `12.2.0-alpha.2`. These are invite-only features. Once invited, you can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-php?tab=readme-ov-file#public-preview-sdks) above and replacing the term `beta` with `alpha`.
Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-alpha.X` suffix like `12.2.0-alpha.2`. You can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-php?tab=readme-ov-file#public-preview-sdks) above and replacing the term `beta` with `alpha`. Note that access to specific private preview API features may require separate approval.

### Custom requests

Expand Down Expand Up @@ -264,6 +264,9 @@ New features and bug fixes are released on the latest major version of the Strip

## Development

> [!WARNING]
> External contributions to this repo from first-time contributors are currently on hiatus. If you'd like to see a change made to the package, please open an issue.

[Contribution guidelines for this project](CONTRIBUTING.md)

We use [just](https://github.com/casey/just) for conveniently running development tasks. You can use them directly, or copy the commands out of the `justfile`. To our help docs, run `just`.
Expand Down
14 changes: 9 additions & 5 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@
require __DIR__ . '/lib/EventData/V1BillingMeterNoMeterFoundEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountLinkReturnedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountPersonCreatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountPersonDeletedEventData.php';
Expand Down Expand Up @@ -193,14 +193,14 @@
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationMerchantUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationRecipientUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationStorerUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingDefaultsUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingDefaultsUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingFutureRequirementsUpdatedEvent.php';
Expand Down Expand Up @@ -289,6 +289,8 @@
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundPaymentPostedEventNotification.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundPaymentReturnedEvent.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundPaymentReturnedEventNotification.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundPaymentUnderReviewEvent.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundPaymentUnderReviewEventNotification.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundPaymentUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundPaymentUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundTransferCanceledEvent.php';
Expand All @@ -301,6 +303,8 @@
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundTransferPostedEventNotification.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundTransferReturnedEvent.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundTransferReturnedEventNotification.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundTransferUnderReviewEvent.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundTransferUnderReviewEventNotification.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundTransferUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundTransferUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2MoneyManagementPayoutMethodCreatedEvent.php';
Expand Down
19 changes: 19 additions & 0 deletions lib/ApiRequestor.php
Original file line number Diff line number Diff line change
Expand Up @@ -591,11 +591,30 @@ private static function _defaultHeaders($apiKey, $clientInfo = null, $appInfo =

// Fallback to global configuration to maintain backwards compatibility.
$appInfo = $appInfo ?: Stripe::getAppInfo();
// `static` here means it persists for the lifetime of the process
static $cachedSource = null;
if (null === $cachedSource) {
$uname_disabled = self::_isDisabled(\ini_get('disable_functions'), 'php_uname');
if ($uname_disabled) {
$cachedSource = false;
} else {
$parts = [\php_uname()];
$hostname_disabled = self::_isDisabled(\ini_get('disable_functions'), 'gethostname');
if (!$hostname_disabled) {
$parts[] = \gethostname();
}
$cachedSource = \md5(\implode(' ', $parts));
}
}

$ua = [
'bindings_version' => Stripe::VERSION,
'lang' => 'php',
'lang_version' => $langVersion,
];
if ($cachedSource) {
$ua['source'] = $cachedSource;
}
if (Stripe::getEnableTelemetry()) {
$uname_disabled = self::_isDisabled(\ini_get('disable_functions'), 'php_uname');
$ua['platform'] = $uname_disabled
Expand Down
Loading
Loading