#ilyeselb

1 messages · Page 1 of 1 (latest)

errant rockBOT
true jackal
#

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

mental vine
true jackal
#

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

mental vine
#

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?

true jackal
#

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

mental vine
true jackal
#

my question is why the renwal invoice is of the hobby includ the domain

mental vine
true jackal
#

even if the invoice item dosent includ the coupon when we pay it

#

?

#

how can i appply that coupon only on that product

mental vine
true jackal
#

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

mental vine
#

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.

true jackal
#

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

errant rockBOT
true jackal
#

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

#

?

outer ridge
#

Hi! I'm taking over this thread.

#

Can you clarify your question with a concrete example? I'm not sure I follow.

true jackal
#

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 ?

outer ridge
#

Sorry for the delay, Discord is busy.

true jackal
#

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

outer ridge
#

I see that Invoice contains two line items: civitality.news and hobby. And your question is why there are these two?

true jackal
#

the question is why they are both in the same invoice when the user bought them sepratly

outer ridge
#

What do you mean by "bought them sepratly"?

true jackal
#

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

outer ridge
#

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)

true jackal
#

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 ?

outer ridge
#

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

true jackal
#

okay

#

so the domain didnt get billed to time

#

?

#

im creating a scheduled subscription after the invoice is paid ( from the invoice item)

outer ridge
#

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?

true jackal
#

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

errant rockBOT
true jackal
#

so it should not get billed on the the second invoice

wheat solar
#

👋 taking over for my colleague. Let me catch up.

true jackal
#

do you know whats cuasing that

true jackal
#

so do you need more info or you will check the conversation ?

wheat solar
#

I'm checking the conversation

#

please give me a quick moment

#

would you mind sharing an invoice ID? or a customer ID?

true jackal
#

customer

#

yes

#

just a mintuute

#

cus_OsyclYozH6GPar

#

here it is

wheat solar
#

taking a look

true jackal
#

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

wheat solar
#

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

true jackal
#

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

wheat solar
#

no it's your code

true jackal
#

whhat does this mean "billing_reason": "manual",
?

#

i see it in the invoice object

wheat solar
#

this means it's not part of a recurring payment plan (== subscription)

true jackal
#

okay so my code is creating an invoice item without invoice

wheat solar
#

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

true jackal
#

but thats what i do i create the invoice items then i create the invoice for the customer

wheat solar
#

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

true jackal
#

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

wheat solar
#

you should always create an invoice with the invoice item

#

rather than just creating an invoice once a month

true jackal
#

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

wheat solar
#

I think what's best to be honest

true jackal
#

?

wheat solar
#

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

true jackal
#

yes but we have other product

#

yoou can have many prodcut inn a company ahhh

#

aha

wheat solar
#

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
#

okay i need to found out why i had one invoice items

#

without the invoice

wheat solar
#

@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?

true jackal
#

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

wheat solar
#

you said it was recurring 😦 I'm a bit confused now

#

is Hobby a recurring price?

#

oh actually my bad

#

it is a subscription