#itsed-invoice-shipping

1 messages · Page 1 of 1 (latest)

vapid sleet
#

Hey there, do you mean with one-off Invoices you're assembling with custom items?

willow needle
#

yes, exactly

vapid sleet
#

And you're either charging these automatically or using the hosted invoice page for customers to pay them?

#

in that case I would expect that you'd want to add another invoice item to account for the shipping charges

willow needle
#

ok, that's easy enough, but then my next issue is with taxes for one off invoices created through the api. is automatic tax calculation just not supported for invoices created through the api?

#

i guess that may be a separate question -- would it be better to ask it in #dev-help instead of this thread?

vapid sleet
#

no that's fine to keep here, all closely related 🙂

willow needle
#

Ok - great

#

So the only thing I can see is the ability to assign a tax rate to a line item

#

But I’m hoping that there’s a way to instead assign a tax code and take advantage of the automatic tax calculation

#

Also a a more general question, how granular is the automatic tax calculation? I know in Florida we have a 6% general sales tax, but there is a supplemental sales tax that is calculated based on the city where goods are delivered

#

Does stripe keep track on the city/county level?

vapid sleet
#

and yes you'd need to set up registration, tax behaviour etc as you mentioned

willow needle
#

The issue seems to be that a tax code can’t be set for a one-off line item through the api

vapid sleet
#

Can you share the request id?

#

oh thats from the docs

willow needle
#

Yes, that’s from the docs

vapid sleet
#

you have to use products & prices, but you can do it via the api

willow needle
#

can you point me to the docs that show how to add a product to an invoice via the API?

vapid sleet
#

price has the amount & currency & product reference

#

you dont using products directly because products don't contain any pricing information

willow needle
#

ok - great

#

so for a one off item, i would just need to use the api to:

#
  • create a product
#
  • create a price for the product
#
  • add the invoice item using the price id
#

is there a limit to how many products stripe will let me create?

vapid sleet
#

nope, go wild

willow needle
#

great - thanks a lot

vapid sleet
#

👍

vapid sleet
#

Archiving this thread 🗄️ -- if you have further questions, please feel free to ask in the main channel!

vapid sleet
#

📂

#

is it possible to have more than 1 draft invoices for a customer? i have 2 services that bill the same customer independently, and each service needs to create its own invoice for the customer. it seems i cant create an empty draft invoice and then add items to it...

willow needle
#

so i can't seem to find a way to have 2 independent invoices for the same customer

vapid sleet
#

You can't create empty drafts, no, but you can create multiple drafting from pending items

#

so create the item, then create the invoice

#

then to add more items you can specify the invoice parameter on the invoice item creation to attach it to an existing draft

willow needle
#

im trying to avoid a race condition where 2 services might both create an item at the same time, and then one of the services will create a draft invoice using both of those items

#

i guess i could always create a $0 dummy item as the first item, and then just remove it after the draft invoice is created...

#

are line items guaranteed to always be returned in the order they were added?

vapid sleet
#

you can check if there are pending invoice items and have the service wait

#

until those go away

#

(because the other one pulls them into an invoice)

willow needle
#

i know it would be super rare, but it still seems possible that i could query that before the second service adds a pending item, and then the second service could add an item before the first service creates the invoice

vapid sleet
#

then you can confirm the items in the invoice are what you expect after creating it, if you need to

willow needle
#

are line items guaranteed to always be returned in the order they were added?

#

i would be ok with only ever adding a "dummy" item without specifying an invoice. that way i wouldn't care if one invoice consumed 2 of the pending items

#

and then i guess once i have a draft invoice i can just go through and remove any line items that match the "dummy" item

vapid sleet
#

I see no reason you couldnt do that

willow needle
#

the only problem then would be that i could never actually use the "pending item" feature as intended

#

is there a way to use tax calculation with payment intents/charges?

#

then i wouldnt need to use invoices at all

vapid sleet
#

No, automatic taxes are not currently supported on payment intents unless you're using Checkout payment mode

willow needle
#

ok - thanks. i just did some testing with the dummy items. it seems like stripe has no issue with me creating a pending item, then a draft invoice, then removing the pending item

#

so empty invoices dont seem to be an issue. it would definitely be nice to be able to create one without the 2 extra steps

#

in_1JcXc6AbO50Vvg08k67jmsYE is the invoice i just tried that with

#

i expected an error when i removed the only item it had, but this should work

vapid sleet
#

yep, this is feedback we've heard, and we are looking at ways to improve this for future 🙂

#

but for now, it sounds like you've got a working solution that meets your needs