Migrate extensions to Shopify CLI
If you have existing payment extensions that were created through the Partner Dashboard, then you can import these extensions into your codebase. After that, you can deploy the extensions that you’ve imported into Shopify CLI. Moving forward, Shopify CLI manages those extensions.
Extensions that are migrated to Shopify CLI will include the handle
property, which is a globally-unique identifier for the extension. A handle
property is created in the extension's TOML configuration file after running the import-extensions
command.
Requirements
Anchor link to section titled "Requirements"Create a Partner account.
Scaffold an app that uses Shopify CLI v3.60.0 or higher, or migrate your existing app so it's compatible with Shopify CLI v3.60.0 or higher.
Step 1: Import your Payment extension
Anchor link to section titled "Step 1: Import your Payment extension"The command in this step generates the local file representation of your Partner Dashboard extensions.
You can only import extensions that have versions. The published version is imported, if one exists. Otherwise, the latest version is imported.
- Navigate to your app directory.
To start importing your Payment extension, run the following command:
Select
Payments Extensions
.Select extension(s) from the list of extensions that are available to import.
After you’ve selected the extension(s) to import, Shopify CLI automatically generates the file representation in your application’s /extensions
directory and displays a success message.
To learn more about the extension file structure, refer to our app structure documentation, and the documentation for your extension type.
Available Flags
Anchor link to section titled "Available Flags"An application’s client-id
. The ID enables you to target a specific application when running the import command.
Step 2: Migrate your extension
Anchor link to section titled "Step 2: Migrate your extension"After you've imported the extension, you must finalize the migration of your extension to Shopify CLI by running the dev
or deploy
commands.
If you haven't made any changes to your extension, you can finalize the migration using the dev
command.
- Navigate to your app directory.
Run the following command to finalize the migration:
Follow the prompts.
Optional: If you have made changes to your extensions in Shopify CLI, you can create a new version by running the
deploy
command.Optional: Follow the prompts to deploy your app.