#ShubhamDev

1 messages · Page 1 of 1 (latest)

shrewd locustBOT
pearl star
#

hi! what do you mean by 'multiple subscription plan amount' exactly?

past spindle
#

We want to select multiple product after that we have to make subscribe to the selected products.

pearl star
#

you can pass multiple line_items to Checkout then yes, to create a Subscription with multiple products, it works fine.

past spindle
#

We have muliple product listed then we have to calculate its price in backend itself

#

Can we calculate multiple product prices in getPrice api ?

pearl star
#

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?

past spindle
#

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

pearl star