#citronovastava
1 messages ยท Page 1 of 1 (latest)
Hi ๐ can you elaborate? Are you looking for our API endpoint for creating Invoices and the parameters that it supports:
https://stripe.com/docs/api/invoices/create
Or is there a specific piece of functionality that you're looking to emulate?
We are looking for API endpoint for creating "one time invoice" in the invoice as screenshot refers
That's the one I linked above.
This is a sample/guide for creating Invoices:
https://stripe.com/docs/invoicing/integration/quickstart
Please let me know if that doesn't look like what you're looking for. Out of curiosity, can you help me understand where you looked for this documentation before asking for a pointer to it? I got to the guide pretty quickly doing a search on "stripe one time invoice", but am eager to learn how others search to think through how we can better surface these documents.
give me a second please
thank you
The documentation (quick guide) which you sent is already working with predefined prices or products.
allow me to describe our use case and what we are trying to validate via API:
- we need to create invoices via API
- we need to add invoice items **WITHOUT **saved product in Stripe
Ah, so it is a specific piece of functionality that you're referring to. You will at least to have created a Product already, but you can create Prices in an ad-hoc fashion by using price_data instead of price when creating the Invoice Items:
https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-price_data
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So to replicate the dashboard flow via API - you have to create a product. Theres no possibility to basically just add invoice items to invoice and dont create a product?
There is also an amount field that you can use when creating Invoice Items. You can view that and all other parameters this endpoint accepts here:
https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-amount
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thank you, but just to be sure: theres no possibility to basically just add invoice items to invoice and dont create a product?
That's what the amount field can be used for.
Or there is also unit_amount, unit_amount_decimal, and quantity if you wanted to use those instead.
Im not sure if I understand the connection between amount and the fact that I need or dont need products in invoices
If you use price or price_data, then you must have previously created a Product and maybe a Price. If you use amount, unit_amount, or unit_amount_decimal then you do not need to create a Product.
this is what I was looking for! Awesome!
thank you so much
maybe a little feedback, I think it would be awesome, if this documnattion about amount https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-amount would say this info "with amount you dont need to have product created"
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thank you for the feedback!
Thank you, hope you do the same ๐