#Julio
1 messages · Page 1 of 1 (latest)
Hi there, i can see that by default, creating an invoice excludes previously created invoice items.
But if i want to keep this behavior "excluding", how can i create an invoice with some invoice items ?
( Plus question, do i have to do anything more , if want to upgrade api version )
More than updating API_VERSION in nodeJS
Hi there,
But if i want to keep this behavior "excluding", how can i create an invoice with some invoice items ?
exlude behavior, creates an invoice without the pending invoice items.
What do you want to achieve exatcly? could you please share an example scenario?
just create an invoice , with some items
right now, i was creating items, and THEN , an invoice for the same customer, and it would automatically takes the pending items
If you don't want to take the pending items and you want to create an empty invoice, you need to pass pending_invoice_items_behavior=exlude
https://stripe.com/docs/api/invoices/create#create_invoice-pending_invoice_items_behavior
but its now excluding by default, so i must use include right ?
i WANT them to be included, but im not sure if all the items should be included
i just want to include the ones that i'm creating
yes you specify explicitly the param that you need, exclude or include.
Actually, all the customer pending invoice items will be included if you set include param when you create the invoice
ok so
i want to keep excluding every items
BUT i want to create an invoice an create items only for this invoice
Yes you can create empty Invoice and then when creating each invoice items you specify the related invoiceId that you want to attach that invoice item to it:
https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-invoice
ALLRIGHT
( Plus question, do i have to do anything more , if want to upgrade api version )
More than updating API_VERSION in nodeJS
You should work through the breaking API changes here (https://stripe.com/docs/upgrades) and ensure that none of them will impact your integration unexpectedly. Otherwise, there's no other work required.
Most opt to upgrade incrementally (by passing the apiVersion param on a per request basis), as opposed to a blanket upgrade of the default account version.
hum ok
i have a small project, so i will upgrade and test it all
and its it possible to chang api version of a webhook without deleting it ?
It depends. If you explicitly set the API version when you created the webhook, then no. Otherwise they just default to the account API version – so if you upgrade your account default then the webhooks will reflect that
np!