#ilyeselb
1 messages · Page 1 of 1 (latest)
this is the invoice id in_1OGn3nGyOBDbEOMCjxCtvswX of the renwal
where we should not have the coupon appllied on the totale
but only on the hobby plan
hi! hmm, why do you think it shouldn't apply? The customer has a "66% off, forever" cooupon. https://dashboard.stripe.com/coupons/Nu6qCyXS
when the customer bought the hobby it was alone we apply the coupon on that plan only
the domain is not included in that offer
you can check the invoices before
but on the renwal we got them like that
I'm not sure what you mean by "it was alone we apply the coupon on that plan only" ; that is not how coupons work.
The coupon just applies to all Invoices generated on the Customer or Subscription that it's applied to. It's not tied to a specific product.
Did you see otherwise when you tested it in test mode?
look
in_1O5YHQGyOBDbEOMCYrQYUuFq
when he bought it it was without the coupon
the coupon should be applied only on the hobby plan
he bought them seperalty
my question is why the renwal invoice is of the hobby includ the domain
but that's not how coupons work on Stripe, you seem to expect it to work a certain way.
my question is why the renwal invoice is of the hobby includ the domain
because you added an InvoiceItem to the customer, which is then pulled into the next Invoice for that Customer(the recurring one), and that Invoice will be discounted by the Customer's coupon.
even if the invoice item dosent includ the coupon when we pay it
?
how can i appply that coupon only on that product
using https://stripe.com/docs/api/coupons/create#create_coupon-applies_to on the coupon might work if you limit it to the Product that the the recurring Price is associated with, you'd need to test that out to see
and if i have 2 invoice items , with coupon applied to both of them , i dont want it to be discounted from the total but each pla
n
I don't think it works that way, the discount is calculated from the subtotal. I'd suggest testing your exact scenarios carefully in test mode.
no already test that and it works
but other thing , how can i set the renwal to be paid on 2 diffrent invoice
the domain bought on the 27 and the plan on the 26 seperaatly
because i create a diffrent subscription for each one
why should we have them on the same
invoice
maybe i have a config issue ?
i have two product
On October 26, 2023 he bought a the first
On October 27 he bought a domain
On November 26 it was the monthly hobby invoice, but the domain is also added there (in_1OGn3nGyOBDbEOMCjxCtvswX)
Why we have both of them in the same invoice where normaly each one should be alone
or maybe the domain got billed two times
?
Hi! I'm taking over this thread.
Can you clarify your question with a concrete example? I'm not sure I follow.
i have a custimer that bought two product
On October 26, 2023 he bought a the first
On October 27 he bought a domain
On November 26 it was the monthly hobby invoice, but the domain is also added there (in_1OGn3nGyOBDbEOMCjxCtvswX)
Why we have both of them in the same invoice where normaly each one should be alone
or maybe the domain got billed two times
?
are you here ?
Sorry for the delay, Discord is busy.
its okay thanx for your availbilty
aha dont forgt about me , i need a solution or clarification this morning ahah to present it to the team
I see that Invoice contains two line items: civitality.news and hobby. And your question is why there are these two?
the question is why they are both in the same invoice when the user bought them sepratly
every thing is here
What do you mean by "bought them sepratly"?
On October 26, 2023 he bought a the first
On October 27 he bought a domain
i have the invoice of transaction haha if you dont trust me
Here you created the second Invoice Item fir that Customer: https://dashboard.stripe.com/logs/req_KEOiKvXs4PAhjy
And the way Invoiceitem works: they automatically get added to the next Invoice
So it's expected that the invoice you shared has two invoice items (one for the subscription, and one that you manually created)
okay , so let me summarize ,
if i createa a subscription onthe 26 of october
and then create another product invoice item in the 27
the product will be billed with the subscription in 26 november ?
If by "product" you mean "creating a new invoice item", then yes it will be automatically added to the next Invoice of the customer. This is mentionned here
If no invoice is specified, the item will be on the next invoice created for the customer specified.
https://stripe.com/docs/api/invoiceitems/create
okay
so the domain didnt get billed to time
?
im creating a scheduled subscription after the invoice is paid ( from the invoice item)
so the domain didnt get billed to time?
I'm not sure what that means. Can you clarify what you are trying to do? What is your end goal here?
wait a mnute because they told me the domain got billed two times this month
i will check that
hey im back
so i checked with the dev team , and normaly what we do is when we buy a domain from our platform , we create an invoice item with the price of that domain and we pay it as one time payment , after the payment is done we create a scheduled subscritpion for the next year as you see here
so it should not get billed on the the second invoice
👋 taking over for my colleague. Let me catch up.
do you know whats cuasing that
hello
so do you need more info or you will check the conversation ?
I'm checking the conversation
please give me a quick moment
would you mind sharing an invoice ID? or a customer ID?
taking a look
thanks
is this invoice got created manualy
from stripe dashbaord in_1O5u4MGyOBDbEOMCJuKYMbh4 ?
how can i know that
because im not in charge of that and it can be the problem here
ok so basically as my colleague explained above
your code is creating an invoice item
separately
without any invoice
i.e. the 27 OCT invocie item
hmm yes i know , but just to be sure can you tell me if it got create don stripe dahsvoard ?
and not by our code ?
in_1O5u4MGyOBDbEOMCJuKYMbh4 this one
no it's your code
you can see it here https://dashboard.stripe.com/logs/req_wRVSWK3d7jkDOh
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
this means it's not part of a recurring payment plan (== subscription)
okay so my code is creating an invoice item without invoice
and then when the code is creating another invoice as you can see in the request I sent you
you are including the pending_invoice_items
but thats what i do i create the invoice items then i create the invoice for the customer
which means that whenever there's an "orphaned" invoice items, that wasn't part of any other invoice, upon the invoice creation you want Stripe to include them into the invoice you're creating now
okay
i see
now
how can i get rid of these
because what i do i create an invoice item then an invoice , each time the user go to the checkout
to buy a domain
should i delete the invoices items pending before creating new ones ?
so we dont have an "orphaned" invoice items
this means that those invoice items won't be paid
you should always create an invoice with the invoice item
rather than just creating an invoice once a month
no no
its a one time payment
we have one time payment for domains , and recurrent for other producrs
i gueess i need to debug the invoice creation of the domains whiche is one time payments (the creation of the invoices) to not let invoice item
I think what's best to be honest
?
just a quick question
when you say a recurring one for other products, do you mean you're using Subscriptions? because the invoice you shared was manually created
yes but that has nothing to do with what I'm trying to explain here
if you're using Stripe Subscriptions the invoice creation for each cycle will be handled by Stripe
whereas from what you've described and what I've seen you're doing the invoice creation manually
@true jackal IMHO I think there's a deeper issue to address here which supersedes this and can potentially solve your problem
do you happen to know why you're choosing to create the invoices manually rather than using Stripe Subscriptions?
because its a one time payment product
any way thank you , i will comback to you if i need somthing , thanks for helping me to understnd the issue