-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redirecting back to app after billing / how to get app name #1227
Comments
@JeaneC when you say you are using There are mechanisms in the API library to allow you to do billing checks and requests that might help Using those mechanisms, the user is returned to the main page of your app. W.r.t. constructing the URL manually, note that |
🤦 .Thank you @mkevinosullivan for the pointer and fast response! I think I must've just missed these in the docs as I was learning a lot of things. I was doing it manually but no more! |
@mkevinosullivan, the guides appear to be out of date. I am wondering if there is no easier way to get the store and host, it seems they are used internally to check auth but not exposed anywhere in the shopify-api-js api. |
This should help. |
I'm using
appSubscriptionCreate
to create a subscription which needs areturnUrl
and according to shopify support this returnUrl needs to be back in my embedded app. Would be nice if this could be automatic (the user just returns back to the page they were at before billing).I don't know how to get a return URL in the backend of the embedded app. I saw a function called
getEmbeddedAppUrl
somewhere, but this only seems to work well during the auth flow (where it's used) where the host and shop name are passed as query parameters.I also thought about manually constructing the URL
www.store.myshopify.com/admin/${APP_NAME}
, but then I need an app nameThe text was updated successfully, but these errors were encountered: