#afacic_code

1 messages ยท Page 1 of 1 (latest)

ripe gullBOT
#

๐Ÿ‘‹ 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/1362366063664173097

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

paper pasture
#

hi there!

#

I'm sorry I don't understand your question. Can you share a concrete example of the issue?

unreal turret
#

Sorry work related but the gist is
await stripe.invoiceItems.create({ customer: (customer as Stripe.Customer).id, unit_amount: pricePerUnit, currency: currency ?? "eur", quantity: quantity, description, invoice: id, metadata: { is_overage_charge: "true", billing_period_start: billingPeriod.start.toString(), billing_period_end: billingPeriod.end.toString(), unique_id: overage_${Date.now()}, // Add unique identifier }, period: { start: billingPeriod.start - 100, // Contract start date end: billingPeriod.end - 100, // Contract end date }, expand: ["data.period", "data.price"], }) => this create invoice items under certain rules and is charged to existing subscription invoice! what happens on invoice is that all items which are this item and subscription are under same time period, but generally they shouldn't be because this invoiceItem is on custom period and subscription is on monthly basis

#

Is that a bit more clear-er

paper pasture
#

can you share a concrete example? Like a specific Invoice ID or Subscription ID, and tell me exactly which values you expected to be different?

unreal turret
#

It's on test side

paper pasture
#

that's fine

unreal turret
#

invoice_ID in_1REpfMEkylNfyvDDxjsKxcnt

Dates of items should be as overchareg on yearly basis everything else on monthly basis

#

Easier to say is every item should have it's own date

paper pasture
#

got it. but that's not possible.

unreal turret
#

๐Ÿ˜ฆ If I remove period I get something close to that but no range

paper pasture
#

you could write your custom dates inside the description of the items?

#

but no range
what does that mean?

#

can you share an Invoice ID?

unreal turret
#

Get a day on invoicing

#

just a minute

#

in_1REppzEkylNfyvDDk9dEVZ3m

#

HERE

#

it says 1.03.2041 after which is montly subscription

#

I'd like to say on first item contractStart - contractEnd after which to say the same as it is right now

paper pasture
#

I'd like to say on first item contractStart - contractEnd after which to say the same as it is right now
I don't understand. can you give me a concrete example of what you want to show exactly and where?

unreal turret
#

so take a look at dates on invoice items where it just. says "01.03.2041" it should be 01.03.2040 - 01.03.2041 and everything else stays the same

paper pasture
#

Here's what I see on the Invoice you shared:

#

so what do you want to change here exactly?

unreal turret
#

Mar1 - Mar 1, 2041 should be Mar 1, 2040 - Mar 1, 2041

paper pasture
#

you want the time to be in the future?

unreal turret
#

no I want it to be custom dates

#

custom range dates

#

only for the Overconsumption

#

Not the other items

#

Future is because is simulated time

ripe gullBOT
shy gate
#

Hi. I'm taking over from my colleague. Please, give me a moment to catch up.

#

To clarify, you want to show the customer the whole period of their Subscription, rather than the period of the current Invoice? It's purely visual, you don't want any behavior to change?

unreal turret
#

yesss but just for the Overconsumption item the rest stays the same

shy gate
#

Your best bet is to update the Product name, or add custom fields to the Invoice.

unreal turret
#

I was afraid of that

#

okey

shy gate
#

Real dates are related to how Billing works, and you can't set it to just any value.

unreal turret
#

tnx for the info