#vinkesh

1 messages · Page 1 of 1 (latest)

light atlasBOT
grave forge
#

I have added demo invoice could you please take a look and revert me back

rancid wave
#

Can you share the Subscription Id?

grave forge
#

sub_1NsHV3K8IgBtWxQksnH0q9Ac

#

still there

rancid wave
#

Sorry looking

grave forge
#

okay no worries

rancid wave
#

I see it has a normal Invoice in_1NsHV3K8IgBtWxQkuBcpmzkX

#

What is the minus you mentioned?

#

ah

grave forge
rancid wave
#

This part?

vinkesh-partime-test_Sibling ($16.67 off)
-$0.01
grave forge
#

yes

#

.01 is invoice item

rancid wave
#

You added that extra .01, but you also applied a discount of $16.67

#

So it tried to subtract $16.67, but it can only subtract maximum of .01

#

so becoming .01, then discounted exactly .01 again

grave forge
#

Not sure what you are trying to say But same is working for current subscription

#

here i am adding extra item to invoice not a discount

rancid wave
#

I know, but the discount is automatically applied to it too. See this event https://dashboard.stripe.com/test/events/evt_1NsHV5K8IgBtWxQkq4uTHHj9

 "data": [
        {
          "id": "il_1NsHV3K8IgBtWxQksit9JAR1",
          "object": "line_item",
          "amount": 1,
          "amount_excluding_tax": 1,
          "currency": "cad",
          "description": "Vinkesh Part Time Test extrta item 1",
          "discount_amounts": [
            {
              "amount": **1**,
              "discount": "**di_1NsHV3K8IgBtWxQkGai9FQLG**"
            }
          ],
#

Amount is 1 and discount is also 1

grave forge
#

I am adding it from subscription
AddInvoiceItems = new List<SubscriptionAddInvoiceItemOptions>
{
new SubscriptionAddInvoiceItemOptions
{
Price = price.Id
}
},
like this
But why its changed to discounts

#

Is there any parameter i ned to pass there

#

this the payload i am sending to stripe as its a backdate subscription
{
"metadata": {
"School Name": "Vinkesh Part Time Test",
"Account InvoiceId": "44866",
"Student Name": "02sept 2023",
"Parent Name": "payat vip4e",
"Parent Email": "payat80726@vip4e.com",
"Date": "9/20/2023 9:24:51 AM",
"School Identifier": "vinkesh-partime-test",
"Amount": "144",
"Charge Type": "ProgramFee",
"Invoice Identifier": "f6e6f23f-98bc-40c9-8086-7258d65af30d_Attempt_1",
"Student Id": "18841"
},
"backdate_start_date": "1693549800",
"items": {
"0": {
"plan": "plan_Ofcjrg1vU7OZqA"
}
},
"customer": "cus_OevXg6fOlKyr7F",
"default_source": "card_1NsHUuK8IgBtWxQk7PFJnakV",
"cancel_at": "1701412200",
"billing_cycle_anchor": "1696141800",
"add_invoice_items": {
"0": {
"price": "price_1NsHV3K8IgBtWxQkRqiadfhj"
}
},
"coupon": "l0AlGRdX"
}

rancid wave
#

Yeah I think the coupon here make it applies to both the original price and the extra invoice items

#

Can you try making the Invoice to only apply once, or only apply to a specific product

grave forge
#

But in case of current and future subscription its behaving correctly

#

only issue is with backdate

rancid wave
#

Okie, any example with curernt and future subscription?

grave forge
#

here is current
sub_1NsHS9K8IgBtWxQkGm5k2vzD

#

this is future
sub_sched_1NsHaZK8IgBtWxQkJwFV6tVo

rancid wave
#

Umm okie I see

#

This is kind of behavior that, for current and future we take both the regular price and extra items first then apply the coupon. But for backdate Sub we apply coupons separately

grave forge
#

yes

rancid wave
#

I am looking closer, gimme some time

grave forge
#

sure

rancid wave
#

Umm this looks a bit odd and need more time for looking into details. Could you write into Support and mention this Discord thread? I will leave a note there and we can look closer into it

grave forge
#

How can mention this thread in support like
#id or some unique number

rancid wave
#

Copy this thread URL