Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Extension-only post purchase app APP_URL host?

Extension-only post purchase app APP_URL host?

peepers-rick
Shopify Partner
10 0 5

Hi there,

 

I've created a very basic post purchase extension following the tutorial here: https://shopify.dev/docs/apps/checkout/product-offers/post-purchase/getting-started

 

According to this page: https://shopify.dev/docs/apps/getting-started/app-surfaces#extension-only-apps Shopify will host my code. It worked when developing and using the Chrome extension, but when I go to deploy it, how does Shopify host my server that does the call for /api/sign-changeset and generates a JWT? 

 

In the tutorial, there is an APP_URL that is defined like so
```

// For local development, replace APP_URL with your local tunnel URL.
const APP_URL = "https://abcd-1234.trycloudflare.io";
```
 
But what does that https://abcd-1234.trycloudflare.io base APP_URL become when I want Shopify to host it as an extension-only app?
 
Obviously I know I could host it myself and change the APP_URL to the base of my express app but I'd like to avoid that if Shopify can indeed host it.
Replies 3 (3)

lizk
Shopify Staff
246 58 77

Hi there 👋

Extension-only apps are apps that only have extension code, that means no server and no embedded app pages. The application that you would create with the post-purchase tutorial, would not fall under an extension-only app.
At this time the app developer is responsible for hosting the server code. 

To learn more visit the Shopify Help Center or the Community Blog.

peepers-rick
Shopify Partner
10 0 5

Thank you! Can I ask what would be an example of a post purchase extension that doesn't require a server call? The tutorial seems like the most basic example and still requires one.

lizk
Shopify Staff
246 58 77

Most post-purchase extensions will not be extension only. But an example of one could be an extension that displays some hard-coded information.

You will find that Checkout UI extensions are more likely to be able to be extension only, such as custom banners and fields. 

To learn more visit the Shopify Help Center or the Community Blog.