Skip to main content

Post-purchase extensions configuration

When you create a post-purchase extension, the shopify.extension.toml file is automatically generated in your extension directory. This guide describes the properties that you can configure in shopify.extension.toml.


You define properties for your extension in the extension configuration file. The shopify.extension.toml file contains the extension's settings, which include the extension name and metafields.

When an extension is published to Shopify, the contents of the configuration file are pushed alongside the extension.


Anchor to Anatomy of a configuration fileAnatomy of a configuration file

The following example shows the properties in the shopify.extension.toml file:

shopify.extension.toml

name = "post-purchase-ui"
handle = "post-purchase-ui"
type = "checkout_post_purchase"
uid = "cd7fff10-47a6-a6f7-60f2-c8e090f069c8fd0d2443"

# [[metafields]]
# namespace = "my-namespace"
# key = "my-key"

# [[metafields]]
# namespace = "my-namespace"
# key = "my-key-2"

The following properties are available:

PropertyDescriptionRules
name
required
The name of the post-purchase extension.
handle
optional
A unique identifier for the extension. It's used to reference the extension in configuration, APIs, and the Dev Dashboard. If you don't set it, then it's derived from name.- Must be unique across your app's extensions.
- Can only contain alphanumeric characters and hyphens.
- Can't be changed after you run dev or deploy.
type
required
The extension type.- Value must be checkout_post_purchase.
uid
required
An app-scoped identifier that shopify app deploy uses to determine whether the extension is being created, updated, or deleted. Shopify CLI generates this value for you — you don't need to set or edit it manually.- Must be unique within the app.
metafields
optional
The metafields that your extension needs to read, declared as repeated [[metafields]] tables. Each table takes a namespace and a key. When the extension runs, Shopify looks for these metafields on each resource and returns their contents.- You can specify up to five namespace and key pairs.

Was this page helpful?