#vin_dev.

1 messages · Page 1 of 1 (latest)

soft spadeBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

whole veldt
#

hi there!

#

you would add multiple Invoice Items to the Invoice.

tender topaz
#

i have

  • 3 one-time payment products
  • 2 subscription products
#

how to manage in invoice item?

whole veldt
#

Are you creating the Invoice itslef, or the Subscription?

#

You should most likely create one Subscription with multipel prices (some recurring, some not recurring).

#

how are you creating the Subscription? Checkout Session, the Subscriptione endpoint, something else?

tender topaz
#

i need it for create a subscription

whole veldt
#

you are using Checkout Session to create the Subscripiton?

#

and it will work

tender topaz
#

Subscription create using customer default payment method after their join pre-registration with 1$ and we convert theme manually using stripes subscription create api

soft spadeBOT
river light
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!

tender topaz
#

yes

#

i have multiple products in invoice bill

  1. 3 one time products
  2. 2 subscription products
    so how to pass this items in invoice bill to pay
river light
#

Did you follow the steps outlined by my colleague? What was the outcome and what was unexpected?

tender topaz
#

const invoiceItem = await stripe.invoiceItems.create({
customer: "cust",
line_items: [
{
price: "price_id_1",
quantity: 1,
},
{
price: "price_id_2",
quantity: 1,
},
{
price: "price_id_3",
quantity: 1,
},
],
invoice: "invoice_id",
});

#

i tried it

#

err: StripeInvalidRequestError: Received unknown parameter: line_items

river light
#

But you're using Checkout, right?

tender topaz
#

no we convert them manually using stripes subscription create API

#

using customer's default payment method

river light
#

Can you share the code you're using to create the Subscription?

tender topaz
#

sure let me share

river light
tender topaz
#

issue is: we have to send mail with invoice bill its working fine with only one product user pay fine with one time product but we have multiple products i shared already but dont know how to clarifying the multiple products in our invoice bill like manual create

#

we got this with one-time products its work
but we have
two subscription monthly, yearly different products

river light
#

You can't create multiple items in a single call like you were trying to

tender topaz
#

okay so we have to create items one bye one and then we will send invoice?

river light
#

I'm still not really understanding what the issue is to be honest

#

But no, you'd add the invocie items and then call finalize which would send the email

tender topaz
#

okay

#

The price specified is set to type=recurring but this field only accepts prices with type=one_time.

#

const invoiceItem = await stripe.invoiceItems.create({
customer: "cust_id",
price: "price_1O4gBjCXaAD4dtVTQNzba9Yo1",
invoice: "in_1OWzVgCXaAD4dtVT9DiB1cfm1",
});

#

i got this recurring error on invoice item create

#

its a last que.

river light
#

Yes, you can't pass recurring items to the Invoicing API