#elka_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/1326530299894566923
π Have more to share? Add more details, code, screenshots, videos, etc. below.
I want edit What are you working on with this :
I am creating a service for lawyers that will allow them to manage fee agreements online and make payments in instalments under cover of this agreement.
A screen to my local BDD is need π
I suggest using a subscription schedule it's easier to handle installment plans https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases#installment-plans
I don't know anything about fees, you can ask your Sales contact or contact https://support.stripe.com/?contact=true
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
anyways, if you prefer using the Invoicing API over Subscriptions
I can help you with that
Your invoice scheduling service generates additional stripe fees (0.7% I believe).
If is possible yes π
again I (and everyone on this channel) don't know anything about fees so I can't really help with that
what step of https://docs.stripe.com/invoicing/integration are you stuck on?
I want to manage price HT and VAT value
why not just use a Tax Rate?
Because if i use it Totals are wrong
what's the tax rate here?
If i got in my Database 1 facture at 100β¬ HT
i need send at stripe 3 facture:
- One at 33.33
- one at 33.33
- one at 33.34
33.33 *1.2 = 40
33.33 * 1.2 = 40
33.34 *1.2 =40.01
total TTC 120.01
ok I understand the concept instead of 1 invoice you want 3 invoices at different due dates
Exactly !
You can see in my BDD screen,
Yes for moment is20% but in future i will got various tax rates
actually you just need to collect 3 * 40 with inclusive tax of 20% rate
So you purpose to split the Total TTC to the "main invoice" instead of total HT ?
yes it's going to be 33.33 and 6.67 for 3 invoices
yes I think that's how you should approach this
if you're using the API, you need to create the tax rate
then you create your customer and an invoice for that customer
for the invoice item
other than the customer and the invoice IDs
you can pass a price_data
Create tax sure ? π€ we cant let stripe understand this automatically
price_data:{
currency:"eur",
product: "prod_xxx",
unit_amount: 4000,
tax_behavior: "inclusive"
},
quantity: x,
tax_rates: [txr_xxx]
I actually do this
try{
$clientStripe->invoiceItems->create([
'customer' => $signatureRequest->getCustomer()->getStripeId(),
'invoice' => $stripeInvoiceId,
'price' => $priceId,
'quantity' => $item->getQuantity(),
], [
'stripe_account' => $signatureRequest->getLawyer()->getSociety()->getStripeAccId(),
]);
}catch (\
I create price on same product when i split invoices
I will work on this
Thanks a lot π
yes but you don't need to create the price ahead of time
and i got all of product and price in my Database πΉ
that's irrelevant to be honest
be honest i am agree with u
you can still use the price you have in your DB and add it as a metadata to the invoice
what if tomorrow you want to offer 4 installment plans instead of 3, you would have to create all prices for all products, it's a big hassle
That's not quite how it works in the base.
But I understand the idea you're proposing.
The reality is that I don't have that many products, and I always check if there's more than one.
It's just that it's easier to know which connected_account.
But when there's a need for a product, users can create their price directly.
It's B2B2C, my customers need to manage their products and prices for their customers.
But I think we're straying from the subject. I don't mind, on the contrary, I'm always open to technical advice.
yes that's the point of these discussions on Discord
to help guide you through the best choices for your use-case
To come back to the solution you proposed, if the total including VAT is 100β¬, it no longer works.
why?
it still does
that's why I said you need to pass in the price_data yourself
this time around the 3 invoices will be 33.33 * 2 and 33.34 TTC
the total of your invoices should always be equal to the total you need to collect
I really do think that you should pass price_data in your case rather than using price IDs
no need to apologize
100 TTC = 83.33 HT
33.33 TTC = 26.67 HT
33.33 TTC = 26.67 HT
33.34 TTC = 26.68 HT
If I'm not mistaken
don't overthink the VAT and HT values
you just need to think of TTC
and pass the tax rate (in this case 20%)
Stripe will do the calculation for you
Yes, but the problem is that we edit the invoices and for accounting purposes we are obliged to have the information.
I will make some screenshoot for you u will see
That''s my front end vuejs my backend api is in php symfony
you don't need to think about this, you just use the numbers generated from the invoice
Yes but how i can show invoice in 3 month
I can't create it that far into the future with the api
so I need to anticipate all the βsplitβ invoices ?
you can
using invoice preview
I know what you mean
and then you can use https://docs.stripe.com/api/invoices/object#invoice_object-total_excluding_tax and https://docs.stripe.com/api/invoices/object#invoice_object-tax to show the values
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
of HT and VAT
sorry for the inconvenience but it's really important we're about to finalize a big project
but
sure
what is still blocking for you?
And if I only use the preview data
For an InvoiceItem at 33.33 incl. VAT, I'll get 26.67 excl.
For the second at 33.33 incl. VAT, I'll get 26.67 excl.
For the last one at 33.34 incl. VAT, I'll get 26.68 excl.
If I calculate the 3 invoices, I get a total of 100β¬ including tax and a total of 80.02β¬ excluding tax instead of 80β¬.
Except that I'm displaying the total of the main invoice at 100β¬ inc. tax and 80 ex.
look at 2nd screenshoot
In red main invoice in green split invoice
invoice at 100β¬ inc. tax and 80 ex.
the calculation is wrong though
Yes, if I divide the amount TTC or HT there is always a case where I end up with distorted amounts when I send to stripe
if invoice is 100EUR TTC then you have 83.34 HT
Simply because the euro rounding policy is in Half Up
not 80
no worries
but what I showed you in my screenshot is correct
I added the 3 invoice items to the same invoice
but it's the same if you put them each on a separate invoice
In your screenshoot is not the same invoice ? it's 3 different invoices
no in my screenshot it's 3 invoice items on the same invoice
Hum ok π
We can let open this thread for the time i testing ? for history ?
Or it's difficult for you
1st and second invoice
Ok i trust you i test and i marry you (joke )
The thing is, I need to pre-calculate the value before and after tax of all invoices in advance π
you can use the invoice preview as I suggested
But I'll get back to it, I understand the information better thanks to you π
Yes i will work on
if the thread is closed before you come back, feel free to just ask another question on #help and we will keep the history for context don't worry
Damn i was sorry
no worries
I'm going back to the code, I'll come back later to tell you about the success if the thread is still open, otherwise thanks for everything.
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!
oh π ! Good luck @frosty plover i was testing, but if you have another approach i reading you
Np!