# Change your app's ID

Update the ID of an existing Stripe app while keeping its identity and installed versions.

Change your app’s ID (`public_id`) in the Dashboard or with the Stripe Apps CLI.

## When to change your app’s ID

Your app ID (`public_id`) is the human-readable identifier you chose for your app, such as `com.example.my-app`.

Change the ID when it no longer fits your app, for example after your company or product name changes, to fix a mistake, or to follow a naming convention. The ID will be in Dashboard URLs for your app, in OAuth redirect URLs, and in any code or configuration that refers to it, so plan for those before you change it. If you only want to change the name shown to users, update the `name` property in your [app manifest](https://docs.stripe.com/stripe-apps/reference/app-manifest.md) and upload a new version.

The app ID is separate from your app’s internal identity and its Marketplace listing ID. Changing it keeps the same app and doesn’t change the listing ID.

## Before you begin

Before changing your app’s ID:

- Sign in to the account that owns the app. A user role on the app or an install of the app doesn’t make an account its owner.
- If you use the CLI, sign in with `stripe login`. Check the current account with `stripe whoami`, or change it with [stripe switch](https://docs.stripe.com/cli/switch).
- If you use the CLI, [upgrade the apps plugin](https://docs.stripe.com/stripe-apps/reference/cli.md#upgrade-the-cli) with `stripe plugin upgrade apps`. Plugin 1.29.0 or later updates your local app manifest after an ID change. Apps with versioned custom objects need plugin 1.25.0 or later to upload after an ID change.
- Finish or cancel uploads before changing the ID. The Stripe upload-in-progress check only sees uploads it has already received.
- Find hard-coded app URLs, OAuth provider registrations, and any other configuration or code that contains the current ID. Plan how to update them while supporting installed builds that still use an earlier ID.
- If you use OAuth, register redirect URLs containing the requested ID with your provider for both sandboxes and live mode before changing it. Keep the old URLs registered while installed builds still use them. Follow the [OAuth migration guidance](https://docs.stripe.com/stripe-apps/change-app-id.md#links-and-oauth).

## Choose the new ID

Choose an ID such as `com.example.my-app` that meets these rules:

- It has at most 64 characters.
- It contains only lowercase letters, numbers, `.`, `_`, or `-`.
- It starts and ends with a letter or number.
- It isn’t another app’s current or previous ID. Previous IDs remain reserved for the app that used them.
- It differs from the current ID by more than capitalization. Case-only changes are refused.

An app normally has a limit of five distinct IDs, including its initial ID. Switching back to a previous ID doesn’t use another slot.

## Change the ID

### Dashboard

1. Go to [Created apps](https://dashboard.stripe.com/apps/created) in the Dashboard and select your app.
2. On the **Details** tab, select the edit icon (✏) next to **App ID**.
3. If you see the **App ID** dropdown in the **Update App ID** dialog, select **A new App ID**.
4. Enter the requested ID in **New App ID**, then select **Update App ID** to confirm.

The change takes effect immediately. Your local app manifest still has the previous ID. To sync it, run `stripe apps update-public-id <new ID>` from your app’s project directory, replacing `<new ID>` with the current app ID. When the app already has that ID, the command only updates the manifest. You can also let your next upload with apps plugin 1.29.0 or later replace the previous ID in the manifest.

### Stripe Apps CLI

From your app’s project directory, run `stripe apps update-public-id <public_id> [--live] [--yes]`, replacing `<public_id>` with the requested ID. For example:

```bash
stripe apps update-public-id com.example.my-app
```

By default, the command uses test credentials, such as a sandbox’s. Use `--live` to use live credentials, and confirm that the selected account owns the app you intend to change.

The CLI shows **Current app ID** and **Requested app ID** and asks for confirmation. Check both values before confirming. Use `--yes` to skip the prompt. Non-interactive runs and runs that request JSON output require `--yes`.

The change takes effect immediately. The command then updates the `id` in your local app manifest to the new ID. If it can’t update the manifest, it shows a warning, and the next upload updates it. The command uploads nothing, and existing installs stay on their version. Commit the updated manifest so other copies of the project use the new ID.

## What changes and what stays the same

After the change, use the current ID for new links, configuration, and code. Existing IDs continue to identify the same app:

- **Installed versions**: Installs keep their current build. Upload and release a version separately to distribute updated code or configuration.
- **Previous IDs**: Earlier IDs remain aliases for the app and stay reserved. Preserve compatibility for links and installed builds that use them.
- **Uploads**: The next upload must submit the current ID. A Dashboard change doesn’t update your local manifest. `update-public-id` updates the manifest in the directory where you run it. If another copy of the project still has a previous ID, the apps plugin replaces it during upload. Earlier plugins or other clients that submit a previous ID receive an error naming the current ID. See [Uploading after an ID change](https://docs.stripe.com/stripe-apps/upload-install-app.md#uploading-after-an-id-change).
- **Custom objects**: Existing definitions and version history continue. Use apps plugin 1.25.0 or later to upload versioned custom objects after changing the ID.
- **Back-end signatures**: Signature requests accept any current or previous ID belonging to the same app. You don’t need to migrate the app’s signing secret because of the ID change.
- **Marketplace listing**: The listing ID is separate and doesn’t change.

## Links and OAuth 

Use the current app ID when creating links. Update hard-coded URLs, configuration, and code as you distribute updated builds, while keeping support for installed builds that use earlier IDs.

For [OAuth authorization flows](https://docs.stripe.com/stripe-apps/pkce-oauth-flow.md), register both redirect URLs for the requested ID before changing it. For example, for `com.example.my-app`:

- Sandbox: **https://dashboard.stripe.com/test/apps-oauth/com.example.my-app**.
- Live mode: **https://dashboard.stripe.com/apps-oauth/com.example.my-app**.

Keep the old redirect URLs registered while installed builds still use them. Changing the app ID doesn’t rewrite provider registrations or code in an installed build. Use the same app ID and redirect URL when starting an OAuth flow and exchanging its authorization code. Don’t rely on a flow started on an old build completing on a new build. Test authorization on the builds you support before releasing updated code.

## Switch back to a previous ID

In the Dashboard, select the edit icon (✏) next to **App ID** on your app’s **Details** tab. In the **Update App ID** dialog, choose a previous ID from the **App ID** dropdown, then select **Update App ID** to confirm.

With the CLI, run the same command with an ID previously assigned to this app:

```bash
stripe apps update-public-id com.example.previous-app
```

Use an actual previous ID in place of `com.example.previous-app`, and select the same owning account and credentials as when changing the ID. Switching back doesn’t use another slot. All previously assigned IDs remain reserved and continue as aliases, including the ID you’re switching away from.

When you switch back, a previous ID can contain uppercase letters or end with `.`, `_`, or `-`, but it must still meet the other rules. Case-only changes are still refused.

## Troubleshooting

The API can return the following messages. The CLI displays API messages for most client errors, but uses its own wording for responses with status 403, 404, or 5xx. When changes aren’t enabled, the CLI displays the message in [ID changes aren’t enabled for your app](https://docs.stripe.com/stripe-apps/change-app-id.md#id-changes-arent-enabled-for-your-app). The Dashboard shows its own messages.

| API message | Action |
| --- | --- |
| `This App ID is already used, or was used before, by another app. App IDs are unique across Stripe. Choose a different App ID.` | Choose an ID that isn’t another app’s current or previous ID. |
| `A public_id must be at most 64 characters, start and end with a letter or number, and contain only letters, numbers, ".", "_" or "-". New public_ids can't contain uppercase letters.` | Check the length, allowed characters, capitalization, and first and last characters. |
| `The new public_id must differ from the current public_id by more than capitalization.` | Choose a different ID. You can’t make a case-only change. |
| `Changing this App's public_id is not enabled.` | Contact Stripe support if you need to change the app’s ID. |
| `An upload is in progress for this App. Wait for it to finish, then try again.` | Finish or cancel uploads before retrying. The check only sees uploads Stripe has already received. |
| `This App has reached the limit of 5 public_ids. Use a previous public_id or contact Stripe support.` | Switch back to an ID previously assigned to this app or contact Stripe support. |
| `This App is being updated. Wait for the update to finish, then try again.` | Wait for the app update to finish, then retry. |
| `This App is banned and cannot change its public_id.` | Contact Stripe support. |
| `This App cannot change its public_id. Contact Stripe support.` | Contact Stripe support. |

### ID changes aren’t enabled for your app 

The Dashboard doesn’t show the edit icon next to **App ID**, and the CLI says:

`App ID changes aren't enabled for this app. Contact Stripe support if you need to change its app ID.`

Contact Stripe support if you need to change the ID.

### Upload uses a previous ID

Apps plugin 1.29.0 and later update the manifest when you use `stripe apps update-public-id` and before uploading. This error mostly comes from earlier plugins or other clients that submit a previous ID:

`This App's public_id changed to "com.example.my-app". Update the id in your app manifest to "com.example.my-app", then upload again.`

The message names your current app ID. Set the manifest’s `id` to that value and upload again.

### Custom object upload uses an earlier plugin

An earlier plugin can fail to upload versioned custom objects when an existing custom object group still uses an earlier ID:

`This App's public_id changed, and Stripe Apps CLI plugin versions before 1.25.0 can't upload its custom objects. Run "stripe plugin upgrade apps", then upload again.`

Run `stripe plugin upgrade apps`, then retry. The guard applies only to versioned custom objects with an existing group under an earlier ID.

### Account selection and uncertain outcomes

If the CLI can’t find or change the app, confirm that you’re signed in to the owning account and using the intended credentials. Check the current account with `stripe whoami`, or change it with [stripe switch](https://docs.stripe.com/cli/switch). Use `--live` for live credentials, or omit it to use test credentials, such as a sandbox’s.

If the connection ends before you receive a result, don’t assume that the change failed. Check the current app ID before requesting a different one. Retrying the same requested ID doesn’t use another slot if the first attempt succeeded.
