#citronovastava

1 messages ยท Page 1 of 1 (latest)

warm lichenBOT
timber anvil
#

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?

meager osprey
#

We are looking for API endpoint for creating "one time invoice" in the invoice as screenshot refers

timber anvil
#

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.

meager osprey
#

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
timber anvil
#

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

meager osprey
#

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?

timber anvil
meager osprey
#

Thank you, but just to be sure: theres no possibility to basically just add invoice items to invoice and dont create a product?

timber anvil
#

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.

meager osprey
#

Im not sure if I understand the connection between amount and the fact that I need or dont need products in invoices

timber anvil
#

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.

meager osprey
#

this is what I was looking for! Awesome!

#

thank you so much

timber anvil
#

Thank you for the feedback!

meager osprey
#

thank you, have a nice da

#

y

timber anvil
#

Thank you, hope you do the same ๐Ÿ‘‹