#ShubhamDev
1 messages · Page 1 of 1 (latest)
hi! what do you mean by 'multiple subscription plan amount' exactly?
We want to select multiple product after that we have to make subscribe to the selected products.
you can pass multiple line_items to Checkout then yes, to create a Subscription with multiple products, it works fine.
We have muliple product listed then we have to calculate its price in backend itself
Can we calculate multiple product prices in getPrice api ?
I'm not sure what you mean by 'calculate' or what this 'getPrice api' is. Do you have some code you can share to explain?
try {
let final_amount = 0;
let { priceId } = ctx.params;
const price = await stripe.prices.retrieve(
priceId
);
// final_amount += parseInt(data.unit_amount);
return responseFormatter({ ctx, data: price });
}
In this code I want every product price then we have to add multiple product price and then we have to generate new price id by calling createPrice api. This process I want
hmm, I mean you can use https://stripe.com/docs/api/prices/list to get a list of multiple Prices if you need to. Not really following you overall, but it's all quite possible