#saeed_89869

1 messages ยท Page 1 of 1 (latest)

near troutBOT
frail pond
#

req_vsAiwmof1zb1Ed

patent wadi
#

Hello ๐Ÿ‘‹
Were you using test mode on the same account or a different account?
It is possible that you're on different API versions on both accounts.

The account you're making the above request from is on API version 2020-08-27

#

@frail pond can you clarify if you have separate accounts?

Also, are you trying to create an empty invoice OR do you have any pending invoice items?

frail pond
#

different account

patent wadi
#

Gotcha. You'd want to check the API version on the test account.

The API error you're currently getting is returned when you try to create an invoice for a customer that has no pending invoice items.

If you're trying to create an empty invoice then you can set pending_invoice_items_behavior to exclude , that should let you create an empty invoice & then you can create invoice items
https://stripe.com/docs/api/invoices/create#create_invoice-pending_invoice_items_behavior

frail pond
#

ok. I will check the API version

patent wadi
#

๐Ÿ‘

frail pond
#

where can I set the api version

#

Updating the API version solved the issue. Thanks

patent wadi
#

Awesome, apologies I missed your last question.
Glad you worked it out.