#vin_dev.
1 messages · Page 1 of 1 (latest)
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.
- vin_dev., 5 minutes ago, 10 messages
hi there!
you would add multiple Invoice Items to the Invoice.
you cann learn more about this here: https://stripe.com/docs/invoicing/integration/quickstart
i have
- 3 one-time payment products
- 2 subscription products
how to manage in invoice item?
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?
i need it for create a subscription
withour checkout session
you are using Checkout Session to create the Subscripiton?
then add all your Prices here: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items
and it will work
Subscription create using customer default payment method after their join pre-registration with 1$ and we convert theme manually using stripes subscription create api
let me check
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!
yes
i have multiple products in invoice bill
- 3 one time products
- 2 subscription products
so how to pass this items in invoice bill to pay
Did you follow the steps outlined by my colleague? What was the outcome and what was unexpected?
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
But you're using Checkout, right?
no we convert them manually using stripes subscription create API
using customer's default payment method
Can you share the code you're using to create the Subscription?
And what specifically is the issue? You're using the add_invoice_items parameter which is how you add one-time items to the initial invoice: https://stripe.com/docs/api/subscriptions/create#create_subscription-add_invoice_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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
Well you were using the wrong parameters in this API call, hence the error: https://stripe.com/docs/api/invoiceitems/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You can't create multiple items in a single call like you were trying to
okay so we have to create items one bye one and then we will send invoice?
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
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.
Yes, you can't pass recurring items to the Invoicing API