#JDPT - invoice
1 messages ยท Page 1 of 1 (latest)
Hi there!
Can you share the request ID (req_xxx)? Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
req_oFLhhzwOo1LJSb
That invoice is for an amount of $0, so it's expected that there is no PaymentIntent or Charge.
Ah okay, was that changed in the latest api update? The test case was working before upgrading.
What API version were you using before?
2020-08-27
I can find an example request for that
Oh sorry, no I can't, we delete the connected account after running the test suite
Give me a few minutes to run some tests on my end.
I'll run the test suite on a different branch and I can get you an example.
Even better, thanks!
req_zfCnslBX0vD4Eo
That's actually got an invoice line item
Weird. I wonder whether the issue is elsewhere then
That invoice has a non-zero amount, so it's different.
I'm pretty sure we didn't change this in this API version. If the amount is $0, then there's no PaymentIntent, which makes sense.
Still very weird, as the only difference between the two branches is the Stripe API version and JS package. I'll do a bit more digging and let you know if I find anything you might need to be aware of
I believe it's to do with the behaviour around attaching invoice items to invoices implicitly based on the customer.
ii_1LUUFtQDqCHFpskc79Ismx6D
This invoice item is attached to the customer
But it is not attached to the invoice
in_1LUUFuQDqCHFpskcNlGnHO8p
Your original question was about getting a payment_intent or a charge when paying a $0 invoice. Did you manage to reproduce this behavior? If so can you share the request ID?
I think that's intended behaviour across both API versions. The reason why it was happening between the two versions was because the invoice item isn't getting attached to the invoice on the new API version, resulting in a $0 invoice being created, and therefore no payment_intent being created.
The docs specify that If no invoice is specified, the item will be on the next invoice created for the customer specified. but that's not happening for the invoice item and the invoice specified above
@serene pewter Any updates on this?
Sorry for the delay, Discord is busy. Give me a few minutes.
No problem ๐ Just wanted to make sure this wasn't forgotten about!
๐ taking over for my colleague. Let me catch up.
Thanks! Let me know if you need more information
basically the 1st line of this Change log explains what's happening in your case
Ah I see, default behaviour has been changed. Should've noticed that. My bad
The pending_invoice_items_behavior parameter on create Invoice no longer supports the include_and_require value. When the parameter is omitted the default value of pending_invoice_items_behavior is now exclude.
Meaning that unless you specify so, the pending_invoice_items from the customer will no longer be attached automatically
no, no worries, it happens with API version upgrades
let me know if you need any more help
Nope, that's fine, this should allow the test to pass so we can upgrade to the latest API version. Thanks for the information!
sure my pleasure