#noah-classdojo_code

1 messages ยท Page 1 of 1 (latest)

civic chasmBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1392201740958568468

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

mint gate
#

hello! i'm still wrapping my brain around your question

#

i'm not aware of a way to do this (tie a negative value line item to a product)... can you help me understand why it's needed for your use case?

craggy robin
#

Well, we'd just like to tie an amount to a product in general - is there a way to do this without going via a price?

#

To give more context on the use case - we have a subscription product, it has a fixed amount (say, $60/week). Thats the base rate that a user expects each week. but if they cancel one of their sessions that week, the invoice should reflect that

#

So we often create invoiceItems that are negative so the invoice reflects the actual sessions that a user should be charged for, which is often less than their base rate

#

hence the negative amounts

mint gate
#

unfortunately no, the price is the only linkage that exists between a line item and a product currently

#

what's the end problem you're trying to solve for? is it something along the lines of how this is displayed to the customer? i understand that you want to tie it to a product but i'm having a hard time understanding why you want to do that

#

i.e. what are the negative outcomes associated with just creating a negative value invoice item and not associating it with a product

craggy robin
#

Sorry for the slow response, I'm just in discord on browser ๐Ÿ˜ฆ

#

So the problem we are trying to solve for in product - charging the user the correct amount and having the invoice reflect that

#

And that has been working historically

#

However, our finance team came back to us telling me that ">50k transactions that aren't assigned a product code"

mint gate
#

so the issue is mostly around internally tracking that these are somehow related to a cancellation / rescheduling (essentially a refund) of a specific product?

craggy robin
#

It isn't necessarily a refund

#

effectively we charge our users each week

#

And they may have had a cancelation several weeks out

#

Also, sometimes it can be the opposite of a refund, sometimes the amount can be positive -- imagine a user has a class twice per week, and they have a reschedule, so one week they have 3, another they have 1. We would be adding a positive amount to their invoice that one week, and a negative one the following week

#

essentially these are invoice reconciliations

#

From the perspective of our finance team, we want to be
"... in compliance with state sales tax regulations (i.e. charge and remit taxes on Stripe sales). As part of the implementation, we need to assign a tax profile to all historical Stripe transactions based their product codes"

However, in our current setup, these "amount" based items don't get associated with product codes

mint gate
#

yeah, unfortunately i don't think there's a way to do that on the stripe side currently... i think the only way to do that would be to document the product internally on your side to maintain that connection

craggy robin
#

Is there any way to tag an entire invoice with a product id so that every item on it gets tagged?

#

(I assume there's nothing as easy as just adding some product data to an invoice item's metadata or something like that)

#

One other option - is there any way to use a product id, but do something like a negative quantity on the invoice item? Say we use a $30 price and leverage that for a -$30 item on the invoice?

#

Happy for this to always go through prices, I just haven't figured out a way to have price interact with negative numbers

mint gate
#

negative quantities or prices aren't possible unfortunately

craggy robin
#

I would love to do that

#

what would that look like?

mint gate
craggy robin
#

Ok, so you are suggesting just putting the product id as a string

mint gate
#

so you would just pass the product ID in the metadata. it wouldn't formally tie the invoice to the product in stripey terms, but it would at least show if you called a GET on that invoice item

craggy robin
#

it wouldn't have any functional tie

#

yeah, exactly

mint gate
#

yep, it would just be a string

craggy robin
#

That may be the best we've got for now ๐Ÿคทโ€โ™‚๏ธ

#

I appreciate your help in discussing this

mint gate
#

yep of course! i would be surprised if other folks haven't already asked for something like this so i'm going to poke through our existing product feedback for negative prices (which i think would address this the most directly) and see if we can show there's more demand for something like that

craggy robin
#

If you do find something, is there a way you could reach out?

mint gate
#

this would be a feature request, and since we don't already have something planned for release here we generally don't follow up on feature requests individually

craggy robin
#

Ok, I appreciate your help here

mint gate
#

of course! hopefully the metadata solution works well enough for you in the meantime