#lec1892

1 messages · Page 1 of 1 (latest)

mint jungleBOT
exotic spoke
#

Can you share the Invoice that you create in test mode so that I can compare?

obsidian timber
#

sure

#

one sec please

#

The invoices are in different accounts also.
The test mode invoice has been created in account A.
I tried to create the live mode invoice in account B.

exotic spoke
#

Yeah you're seeing this difference in behavior because these two accounts are on different API version and have different defaults - in this case, your livemode request failed because it's on an older API version where the default value for pending_invoice_items_behavior still uses include_and_require and will fail if the customer has no line items (https://stripe.com/docs/api/invoices/create#create_invoice-pending_invoice_items_behavior)

#

You need to explicitly pass in pending_invoice_items_behavior: exclude on your live mode request to get the same behavior as your test mode request

obsidian timber
#

Give me a few minutes please, let me take a look

#

thank you

#

it worked