Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d160ee9
Update generated code for v2032 and
stripe-openapi[bot] Oct 2, 2025
7c872f6
Update generated code for v2034 and
stripe-openapi[bot] Oct 2, 2025
4215e9e
Update generated code for v2040 and
stripe-openapi[bot] Oct 6, 2025
6f68d73
Update generated code for v2041 and
stripe-openapi[bot] Oct 6, 2025
98b345b
Improve event notification example (#1934)
xavdid-stripe Oct 6, 2025
f81a0ed
Merge upstream and update generated code for v2041 and
stripe-openapi[bot] Oct 6, 2025
cba11ea
Update generated code for v2042 and
stripe-openapi[bot] Oct 6, 2025
cc02ccc
Update generated code for v2043 and
stripe-openapi[bot] Oct 7, 2025
d2b3780
Update generated code for v2045 and
stripe-openapi[bot] Oct 7, 2025
e107f8a
Update generated code for v2048 and
stripe-openapi[bot] Oct 8, 2025
1548421
Update generated code for v2049 and
stripe-openapi[bot] Oct 9, 2025
0e34251
Update generated code for v2051 and
stripe-openapi[bot] Oct 9, 2025
7b3d99e
Update generated code for v2052 and
stripe-openapi[bot] Oct 9, 2025
cd74312
Update generated code for v2054 and
stripe-openapi[bot] Oct 9, 2025
5b538ef
Update generated code for v2055 and
stripe-openapi[bot] Oct 10, 2025
5e370ea
Update generated code for v2056 and
stripe-openapi[bot] Oct 10, 2025
72c2d35
Update generated code for v2057 and
stripe-openapi[bot] Oct 10, 2025
baa2112
Update generated code for v2062 and
stripe-openapi[bot] Oct 13, 2025
0220872
Update generated code for v2065 and
stripe-openapi[bot] Oct 13, 2025
a3108ac
Update generated code for v2067 and
stripe-openapi[bot] Oct 14, 2025
ee7a974
Update generated code for v2073 and
stripe-openapi[bot] Oct 15, 2025
191fae6
Update generated code for v2076 and
stripe-openapi[bot] Oct 16, 2025
db9613f
Update generated code for v2077 and
stripe-openapi[bot] Oct 16, 2025
73aab64
Update generated code for v2082 and
stripe-openapi[bot] Oct 17, 2025
b3954b8
Update generated code for v2084 and
stripe-openapi[bot] Oct 17, 2025
9cbfd41
Update generated code for v2085 and
stripe-openapi[bot] Oct 17, 2025
c09c56f
Update generated code for v2086 and
stripe-openapi[bot] Oct 17, 2025
00e73a3
Update generated code for v2088 and
stripe-openapi[bot] Oct 18, 2025
7e49f87
Update generated code for v2091 and
stripe-openapi[bot] Oct 20, 2025
7dbe135
Update generated code for v2092 and
stripe-openapi[bot] Oct 21, 2025
57d27ae
Update generated code for v2094 and
stripe-openapi[bot] Oct 22, 2025
16ab516
Update generated code for v2095 and
stripe-openapi[bot] Oct 22, 2025
0212af8
Update generated code for v2096 and
stripe-openapi[bot] Oct 22, 2025
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
2 changes: 1 addition & 1 deletion API_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0de52cdca31a7c51c6d11187fc88ab23ea3a1c5b
173b24e412b55604d1775225f1560f5218fbaeca
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2031
v2096
22 changes: 15 additions & 7 deletions examples/EventNotificationWebhookHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,24 @@

// check what type of event notification we have
if ($event_notification instanceof Stripe\Events\V1BillingMeterErrorReportTriggeredEventNotification) {
$meter = $event_notification->fetchRelatedObject();
$meter_id = $meter->id;
// there's basic info about the related object in the notification
echo "Meter with id {$event_notification->related_object->id} reported an error\n";

// Record the failures and alert your team
// Add your logic here
// or you can fetch the full object form the API for more details
$meter = $event_notification->fetchRelatedObject();
echo "Meter {$meter->display_name} ({$meter->id}) had a problem\n";

// can fetch full event w/ data
// And you can always fetch the full event:
$event = $event_notification->fetchEvent();
// data is fully typed
$event->data->developer_message_summary;
echo "More info: {$event->data->developer_message_summary}\n";
} elseif ($event_notification instanceof Stripe\Events\UnknownEventNotification) {
// Events that were introduced after this SDK version release are
// represented as `UnknownEventNotification`s.
// They're valid, the SDK just doesn't have corresponding classes for them.
// You must match on the "type" property instead.
if ('some.new.event' === $event_notification->type) {
// handle it the same way as above
}
}

return $response->withStatus(200);
Expand Down
4 changes: 1 addition & 3 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@
require __DIR__ . '/lib/Event.php';
require __DIR__ . '/lib/EventData/V1BillingMeterErrorReportTriggeredEventData.php';
require __DIR__ . '/lib/EventData/V1BillingMeterNoMeterFoundEventData.php';
require __DIR__ . '/lib/EventData/V2BillingBillSettingUpdatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventData.php';
Expand All @@ -157,12 +156,11 @@
require __DIR__ . '/lib/EventData/V2CoreAccountPersonUpdatedEventData.php';
require __DIR__ . '/lib/EventData/V2MoneyManagementInboundTransferAvailableEventData.php';
require __DIR__ . '/lib/EventData/V2MoneyManagementReceivedCreditAvailableEventData.php';
require __DIR__ . '/lib/EventData/V2MoneyManagementTransactionCreatedEventData.php';
require __DIR__ . '/lib/Events/V1BillingMeterErrorReportTriggeredEvent.php';
require __DIR__ . '/lib/Events/V1BillingMeterErrorReportTriggeredEventNotification.php';
require __DIR__ . '/lib/Events/V1BillingMeterNoMeterFoundEvent.php';
require __DIR__ . '/lib/Events/V1BillingMeterNoMeterFoundEventNotification.php';
require __DIR__ . '/lib/Events/V2BillingBillSettingUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2BillingBillSettingUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountClosedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountClosedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountCreatedEvent.php';
Expand Down
6 changes: 3 additions & 3 deletions lib/Account.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/Billing/CreditGrant.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class CreditGrant extends \Stripe\ApiResource
/**
* Creates a credit grant.
*
* @param null|array{amount: array{monetary?: array{currency: string, value: int}, type: string}, applicability_config: array{scope: array{price_type?: string, prices?: array{id: string}[]}}, category: string, customer?: string, customer_account?: string, effective_at?: int, expand?: string[], expires_at?: int, metadata?: array<string, string>, name?: string, priority?: int} $params
* @param null|array{amount: array{monetary?: array{currency: string, value: int}, type: string}, applicability_config: array{scope: array{price_type?: string, prices?: array{id: string}[]}}, category?: string, customer?: string, customer_account?: string, effective_at?: int, expand?: string[], expires_at?: int, metadata?: array<string, string>, name?: string, priority?: int} $params
* @param null|array|string $options
*
* @return CreditGrant the created resource
Expand Down
6 changes: 3 additions & 3 deletions lib/BillingPortal/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Stripe\BillingPortal;

/**
* A portal configuration describes the functionality and behavior of a portal session.
* A portal configuration describes the functionality and behavior you embed in a portal session. Related guide: <a href="/customer-management/configure-portal">Configure the customer portal</a>.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
Expand All @@ -32,7 +32,7 @@ class Configuration extends \Stripe\ApiResource
* Creates a configuration that describes the functionality and behavior of a
* PortalSession.
*
* @param null|array{business_profile?: array{headline?: null|string, privacy_policy_url?: string, terms_of_service_url?: string}, default_return_url?: null|string, expand?: string[], features: array{customer_update?: array{allowed_updates?: null|string[], enabled: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options: null|string[]}, enabled: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: array{type: string}[]}, trial_update_behavior?: string}}, login_page?: array{enabled: bool}, metadata?: array<string, string>, name?: null|string} $params
* @param null|array{business_profile?: array{headline?: null|string, privacy_policy_url?: string, terms_of_service_url?: string}, default_return_url?: null|string, expand?: string[], features: array{customer_update?: array{allowed_updates?: null|string[], enabled: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool, payment_method_configuration?: null|string}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options: null|string[]}, enabled: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: array{type: string}[]}, trial_update_behavior?: string}}, login_page?: array{enabled: bool}, metadata?: array<string, string>, name?: null|string} $params
* @param null|array|string $options
*
* @return Configuration the created resource
Expand Down Expand Up @@ -93,7 +93,7 @@ public static function retrieve($id, $opts = null)
* Updates a configuration that describes the functionality of the customer portal.
*
* @param string $id the ID of the resource to update
* @param null|array{active?: bool, business_profile?: array{headline?: null|string, privacy_policy_url?: null|string, terms_of_service_url?: null|string}, default_return_url?: null|string, expand?: string[], features?: array{customer_update?: array{allowed_updates?: null|string[], enabled?: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options?: null|string[]}, enabled?: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled?: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: null|array{type: string}[]}, trial_update_behavior?: string}}, login_page?: array{enabled: bool}, metadata?: null|array<string, string>, name?: null|string} $params
* @param null|array{active?: bool, business_profile?: array{headline?: null|string, privacy_policy_url?: null|string, terms_of_service_url?: null|string}, default_return_url?: null|string, expand?: string[], features?: array{customer_update?: array{allowed_updates?: null|string[], enabled?: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool, payment_method_configuration?: null|string}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options?: null|string[]}, enabled?: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled?: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: null|array{type: string}[]}, trial_update_behavior?: string}}, login_page?: array{enabled: bool}, metadata?: null|array<string, string>, name?: null|string} $params
* @param null|array|string $opts
*
* @return Configuration the updated resource
Expand Down
Loading