# Adds session recovery for expired customer portal sessions

## What’s new

Adds the [after_expiration](https://docs.stripe.com/api/customer_portal/sessions/create.md?api-version=2026-09-30.preview#create_portal_session-after_expiration) parameter when you [create a customer portal Session](https://docs.stripe.com/api/customer_portal/sessions/create.md?api-version=2026-09-30.preview). This parameter lets you configure what happens when a portal session expires. Set [type](https://docs.stripe.com/api/customer_portal/sessions/create.md?api-version=2026-09-30.preview#create_portal_session-after_expiration-type) to `customer_login` to allow customers to verify their email address and receive a replacement session with the same configuration.

The [customer_login](https://docs.stripe.com/api/customer_portal/sessions/create.md?api-version=2026-09-30.preview#create_portal_session-after_expiration-customer_login) object accepts an optional [expires_at](https://docs.stripe.com/api/customer_portal/sessions/create.md?api-version=2026-09-30.preview#create_portal_session-after_expiration-customer_login-expires_at) timestamp that sets a deadline for session recovery. If you omit `expires_at`, the customer can recover the session at any time after it expires.

The [Session](https://docs.stripe.com/api/customer_portal/sessions/object.md?api-version=2026-09-30.preview) object also returns the corresponding `after_expiration` property in the response.

## Impact

To enable session recovery, follow the [customer portal API integration guide](https://docs.stripe.com/customer-management/integrate-customer-portal.md) and set [after_expiration](https://docs.stripe.com/api/customer_portal/sessions/create.md?api-version=2026-09-30.preview#create_portal_session-after_expiration) when you create each portal session. Set [type](https://docs.stripe.com/api/customer_portal/sessions/create.md?api-version=2026-09-30.preview#create_portal_session-after_expiration-type) to `customer_login`. Customers who receive a session URL (for example, through a recovery email) can then access the portal after the original session expires without requiring a different URL.

## Changes

#### REST API

| Parameter | Change | Resources or endpoints |
| --- | --- | --- |
| `after_expiration` | Added | [BillingPortal.Session](/api/customer_portal/sessions/object?api-version=2026-09-30.preview#portal_session_object), [BillingPortal.Session#create](/api/customer_portal/sessions/create?api-version=2026-09-30.preview#create_portal_session) |

#### Ruby

| Parameter | Change | Resources or methods |
| --- | --- | --- |
| `after_expiration` | Added | [BillingPortal::Session](/api/customer_portal/sessions/object?api-version=2026-09-30.preview#portal_session_object), [BillingPortal::SessionCreateParams](/api/customer_portal/sessions/create?api-version=2026-09-30.preview#create_portal_session) |

#### Python

| Parameter | Change | Resources or methods |
| --- | --- | --- |
| `after_expiration` | Added | [BillingPortal.Session](/api/customer_portal/sessions/object?api-version=2026-09-30.preview#portal_session_object), [billing_portal.SessionCreateParams](/api/customer_portal/sessions/create?api-version=2026-09-30.preview#create_portal_session) |

#### PHP

| Parameter | Change | Resources or methods |
| --- | --- | --- |
| `after_expiration` | Added | [BillingPortal.Session](/api/customer_portal/sessions/object?api-version=2026-09-30.preview#portal_session_object), [BillingPortal\Session.create().$params](/api/customer_portal/sessions/create?api-version=2026-09-30.preview#create_portal_session) |

#### Java

| Parameter | Change | Resources or methods |
| --- | --- | --- |
| `afterExpiration` | Added | [billingportal.Session](/api/customer_portal/sessions/object?api-version=2026-09-30.preview#portal_session_object), [billingportal.SessionCreateParams](/api/customer_portal/sessions/create?api-version=2026-09-30.preview#create_portal_session) |

#### Node.js

| Parameter | Change | Resources or methods |
| --- | --- | --- |
| `after_expiration` | Added | [BillingPortal.Session](/api/customer_portal/sessions/object?api-version=2026-09-30.preview#portal_session_object), [BillingPortal.SessionCreateParams](/api/customer_portal/sessions/create?api-version=2026-09-30.preview#create_portal_session) |

#### Go

| Parameter | Change | Resources or methods |
| --- | --- | --- |
| `AfterExpiration` | Added | [BillingPortalSession](/api/customer_portal/sessions/object?api-version=2026-09-30.preview#portal_session_object), [BillingPortalSessionParams](/api/customer_portal/sessions/create?api-version=2026-09-30.preview#create_portal_session) |

#### .NET

| Parameter | Change | Resources or methods |
| --- | --- | --- |
| `AfterExpiration` | Added | [BillingPortal.Session](/api/customer_portal/sessions/object?api-version=2026-09-30.preview#portal_session_object), [BillingPortal.SessionCreateOptions](/api/customer_portal/sessions/create?api-version=2026-09-30.preview#create_portal_session) |

## Upgrade

#### REST API

1. [View your current API version](https://docs.stripe.com/workbench/guides.md#view-api-versions) in Workbench.
2. If you use an SDK, upgrade to the corresponding SDK version for this API version.
   - If you don’t use an SDK, update your [API requests](https://docs.stripe.com/api-versions.md#how-versions-are-specified-in-requests) to include `Stripe-Version: 2026-09-30.preview`
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Ruby

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your Ruby SDK to the latest version.
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Python

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your Python SDK to the latest version.
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### PHP

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your PHP SDK to the latest version.
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Java

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your Java SDK to the latest version.
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Node.js

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your Node SDK to the latest version.
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Go

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your Go SDK to the latest version.
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### .NET

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your .NET SDK to the latest version.
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

## Related changes

- [Adds archiving and trial end behaviour settings to Trial Offers](https://docs.stripe.com/changelog/endive/2026-09-30/trial-offers-archiving-and-trial-end-behavior-settings.md)
- [Adds Billie company details and reference properties to Quote Preview Invoices](https://docs.stripe.com/changelog/endive/2026-09-30/adds-reference-and-company-details-payment-method-options-for-billie.md)
