I want a stripe checkout page for subscription but now I want to use same checkout page for subscription mode and payment mode. suppose my subscription is for $99, and user selects $10 as top-up or add-on then I want to add that money also as payment not as subscription, how can I acheive this ? my code for stripe checkout session for subscription is as below.
sessionObj = {
mode: "subscription",
line_items: [
{
price: priceId,
quantity: 1,
}
],
subscription_data: {
metadata
},
metadata,
success_url: `${Meteor.settings.private.PUBLIC_SITE_URL}/contact-us`,
cancel_url: `${Meteor.settings.private.PUBLIC_SITE_URL}/payment-failure`,
payment_method_types: ["card"]
}
const stripeRes = await stripe.checkout.sessions.create(sessionObj);