#veiss - Subscription Trials
1 messages · Page 1 of 1 (latest)
Hello! Yep, you can add the $1 one-time payment using add_invoice_items: https://stripe.com/docs/api/subscriptions/create#create_subscription-add_invoice_items
Yes but I didn't quite get how I can implement that in this code
const docRef = await db
.collection("customers")
.doc(currentUser)
.collection("checkout_sessions")
.add({
price: "price_1GqIC8HYgolSBA35zoTTN2Zl",
trial_from_plan: false,
success_url: window.location.origin,
cancel_url: window.location.origin,
});
as that part is handled by firestore extension.
That part I'm not sure about. So you're not writing the code that actually creates the Subscription?
Nop. I send that data to firebase, that triggers that extension, it saves data to firestore and returns me sessionId that I use to redirect user to checkout.
it looks like this
Looks like there's a similar question here you may want to subscribe to/comment on: https://github.com/stripe/stripe-firebase-extensions/issues/354