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.

Edited Subscription Link extension reports as "invalid" but it works.

Solved

Edited Subscription Link extension reports as "invalid" but it works.

minsko
Shopify Partner
28 3 6

I am working on an application that supports subscriptions and need to update the URL behind the "View Subscription" on the admin UI's order page, basically changing it from .../subscriptions?... to .../app/contract?....

 

Looking at the instructions at https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts/build-a-subscription-co..., the "hardcoded" value is "{app_application_url}/subscriptions?customer_id={customer_id}&hmac={hmac}&id={subscription_contract_id}&shop={myshopify_domain}"

 

Setting the value to "{app_application_url}/app/contract?customer_id={customer_id}&id={contract_id}&shop={shop}" and clicking save, states the value is invalid, but it does provide the correct URL on the Admin UI's order page.

 

Later I found that {app_application_url} is just replaced by "" (just like all the others in the variables seen the hardcoded value).

 

I am currently using "/app/contract?customer_id={customer_id}&id={contract_id}&shop={shop}" which provides the correct URL on in the admin UI but also gets reported as Invalid.

 

Will a link in this format stop working in the future?

Is there an error in the validation of the value for the Subscription Link extension?

Do you plan to support "{app_application_url}" as a valid variable?

 

Accepted Solution (1)
minsko
Shopify Partner
28 3 6

This is an accepted solution.

I found that I needed to just specify my actual server's url (i.e. SHOPIFY_APP_URL).

The setting "https://www.myserver.com/app/contract?customer_id={customer_id}&id={contract_id}&shop={shop}", where "www.myserver.com" is the url of my shopify app, properly directs the browser to https://admin.shopify.com/store/{shop_name}/apps/{app_handlle}/app/contract?customer_id=xxx&id=yyy&s...

View solution in original post

Replies 2 (2)

minsko
Shopify Partner
28 3 6

I am also unable to deploy a new version because that value (even though it is working) does not pass the validation.

minsko
Shopify Partner
28 3 6

This is an accepted solution.

I found that I needed to just specify my actual server's url (i.e. SHOPIFY_APP_URL).

The setting "https://www.myserver.com/app/contract?customer_id={customer_id}&id={contract_id}&shop={shop}", where "www.myserver.com" is the url of my shopify app, properly directs the browser to https://admin.shopify.com/store/{shop_name}/apps/{app_handlle}/app/contract?customer_id=xxx&id=yyy&s...