#afacic_code
1 messages ยท Page 1 of 1 (latest)
๐ 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.
hi there!
I'm sorry I don't understand your question. Can you share a concrete example of the issue?
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
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?
It's on test side
that's fine
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
got it. but that's not possible.
๐ฆ If I remove period I get something close to that but no range
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?
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
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?
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
Here's what I see on the Invoice you shared:
so what do you want to change here exactly?
Mar1 - Mar 1, 2041 should be Mar 1, 2040 - Mar 1, 2041
you want the time to be in the future?
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
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?
yesss but just for the Overconsumption item the rest stays the same
Your best bet is to update the Product name, or add custom fields to the Invoice.
Real dates are related to how Billing works, and you can't set it to just any value.
tnx for the info