#mariotux

1 messages ยท Page 1 of 1 (latest)

worldly orchidBOT
thin field
#

Hi there

signal niche
#

๐Ÿ––

#

hi

#

the customer variable, is the a string with the customer id

thin field
#

With this behavior you need to create the invoice item first before the invoice

#

Or, you can specify pending_invoice_items_behavior and it will work

signal niche
#

I am using old version, yes

#

how?

pending_invoice_items_behavior: include

#

?

#

it seems should be exclude, Am I right?

thin field
#

In this case it won't really matter since you are creating the invoice first

signal niche
#

perfect this works

#

should I have to open another thread to talk about another thing?

#

by the way, thank you for your help @thin field

#

I will open another thread to not generate noise in this topic, thank you.

thin field
#

Nope

#

You can use this same thread for any questions!

#

I'm happy to help with any dev questions you have

#

Moving into the thread @signal niche !

#

Hello again! I am trying to create an invoice with a negative amount. It is a manual invoice using the API, do I need to create a price object to use it in the InvoiceItem ?

signal niche
#

thanks

thin field
#

You can't create price items with negative amounts. However, you can create invoice items with negative amounts

#

So you would do exactly what you are doing above but just use a negative amount there

signal niche
#

I am trying to create an invoice item with a negative amount

#

but the price parameter is expecting a price object

#

Am I wrong?

#

can I use amount an that's it

thin field
#

For invoice items you can use amount and that's it

signal niche
#

perfect

#

next step

#

Stripe::Invoice.send_invoice(stripe_invoice.id)

#

You can only manually send an invoice if its collection method is 'send_invoice'. (Stripe::InvalidRequestError)

#

do I have to create the invoice with the send_invoice as collection method?

#

I had problems when I tried it

#

If invoice collection method is 'send_invoice', you must specify 'due_date' or 'days_until_due'. (Stripe::InvalidRequestError)

#

I would like to create it now for now ๐Ÿ˜„

#

do I have to define the days_until_due to go forward?

#

I am asking that because using the UI I didn't see this option

#

adding the days_until_due it worked

#

I am going to verify it in the ui if it did that expected

#

thanks