I am currently working on a project that utilizes the Stripe payments extension in conjunction with Firebase. The application is built using Next JS.
After a user subscribes, I want to provide them with a tab where they can manage their subscription. The extension requires running a cloud function called createPortalLink. Below is my implementation of it: const functions = getFunctions(getApp()) const functionRef = httpsCallable(functions, "ext-firestore-stripe-payments-createPortalLink")
const {data} = await functionRef({
returnUrl: window.location.href + "/plans",
locale: "auto",
})
// @ts-ignore
window.location.assign(data.url)
However, when I test this code, it redirects to a payment page instead of a dashboard where users can manage and delete subscriptions.
Do I need to make any adjustments, or is this behavior expected in test mode?