#elianbraja

1 messages ยท Page 1 of 1 (latest)

desert surgeBOT
robust mantle
#

Can you share the invoice ID so I can take a look?

mint scroll
#

I am checking it with the upcoming invoice. I am not sure if I can send you any id

robust mantle
#

Oh

#

Does the amount_off field contain an amount greater than 0?

#

Can you share a screenshot or some json?

mint scroll
#

So this is my subscription:
ID: sub_1MmfOdEMyoEBRsWZZ7xn3ZEi

I am trying to update my subscription item:
ID: si_NXkuUTHK5oTCrQ
with quantity: 5

The item price is $8

When I apply the promo code 20OFF. The price in the invoice is 8 and is correct but I don't get any error from Stripe syaing that the promo code was not applied

robust mantle
#

Have you tried doing this on a real update

#

Not upcoming invoice

#

Want to narrow down if this is only happening on the upcoming invoice endpoint

mint scroll
#

yes I have done

#

the same result as the upcoming invoice

thick thorn
#

Hi ๐Ÿ‘‹

#

That screenshot isn't really helpful. Can you share an invoice ID?

mint scroll
#

The problem is that I have to always apply the coupon code to get the correct amount (8USD) for one added item. If I do not apply the coupon code I get a strange amount (bigger one) for just one item added (8USD)

#

Plase look last invoice of subscription with ID: sub_1MmfOdEMyoEBRsWZZ7xn3ZEi

#
  1. in_1Mmg33EMyoEBRsWZi61couuO
    Here I have not applied the promo code and I get a stange amount for just one item added (8 USD)

  2. in_1Mmg0KEMyoEBRsWZiuBr0cB0
    Here I have applied the coupon code (that is "once") and I get the full amount (8 USD) for one item added

#

This is very strange for the customer that gets 2 different prices for just one item added

thick thorn
#

Wait, you are applying a coupon so why wouldn't you expect to see two different prices?

mint scroll
#

The price is** 8 USD** (has no sense to be bigger) for 1 item. The coupon is with flag "once".
When I apply the coupon (that should not be applied because is "once") I get the total amount 8USD (without any discount)

When I do not apply the coupon I get the price (27.98 USD) for one item.

This is very very strange. This obligates the customer to apply the coupon code to get the full correct amount. If not he will get a bigger amount?????

#

You can se that the price that belongs to my subscription item has a value of 8 USD

thick thorn
#

The problem is how prorations + coupons get applied. When you update the quantity we refund the remaining time on the original quantity and then charge the customer for the remaining time on the new quantity. So you get the right amount when you apply the coupon again is because when we charge the customer at the new quantity we don't automatically include the existing discount.

mint scroll
#

But how can I solve the problem so that when the user added a new item so quantity + 1, I can show the correct price, without the need to apply the coupon again

thick thorn
#

You'll need to continue to apply the coupon or the price will be different.

#

But I can raise this issue for feedback

mint scroll
#

and if the coupon gets removed in the future?

thick thorn
#

What do you mean "gets removed in the future"?

#

That would be a new update to the Subscription, wouldn't it?

mint scroll
#

I mean If I remove completely the coupon from the Stripe dashboard

#

where can I find it and apply it to the subscription to get the correct amount?

thick thorn
#

If you have deleted it then you can't re-apply it

mint scroll
#

but what is the best way in this situation for me to apply the coupon on every update for the customer automatically without telling him that he has to apply the coupon to get the correct amount because this is weird

thick thorn
#

In this situation, which I agree is less than ideal, I think you would create a Coupon (non-user facing) that matches the discount for the once coupon and apply it in the API calls modifying the Subscription.

mint scroll
#

and if customer decides to apply another coupon on his own, that doesn't have to do with this that we are talking? I cannot pass two coupon codes.
Is a very complex situation and I think this should be solved because is very problematic.

thick thorn
#

What is the scenario where the Customer applies a different coupon? Wouldn't that just overwrite the existing discount?

desert surgeBOT
mint scroll
#

when he wants to apply another coupon. Plus I have to provide the coupon to fix the amount problem that we talked before

#

please let me know if an issue is opened for Stripe dev as you previously told me and if I can keep track of that

#

to know when it will be fixed

urban sparrow
#

๐Ÿ‘‹ hopping in since snufkin has to head out - give me a minute to catch up

#

Okay, so backing up for a minute here - I want to first clarify this behavior with the once coupon

#

Setting a coupon to only apply once doesn't mean "only allow it to be applied to a subscription once" it means that when it applies it won't repeat across multiple invoices (it'll only apply to the first invoice of the subscription). You can still apply that coupon to a subscription multiple times, you would just have to set it on the subscription each time

#

That's why you're not seeing any error when you attempt to use it

#

And the reason it's being applied by discounting $0 is because all the invoice items in that invoice are proration invoice items - those can't be discounted further, so there's nothing on the invoice that the coupon can be applied to (hence the $0 discount)

mint scroll
#

ok but the problem was another one. I am getting a bigger amount just by adding another item

#

so incrementing the quantity by 1

#

the item price is 8USD and when I add the quantity I get the price 27USD

#

this happens just in cases when I apply the coupon code

urban sparrow
#

Did you have the Invoice ID for the 27USD one?

mint scroll
#

I have sent them in this conversation before

urban sparrow
#

You sent the $8 ones, but I didn't see an Invoice for $27

#

Ah, I see it - it's in_1Mmg33EMyoEBRsWZi61couuO

#

That behavior's expected - the coupon ONLY applies to the credit amount (for unused time) because it was a one-time coupon. When we calculate how much to charge for the remaining time at the new price/quantity we don't apply the coupon

#

In comparison, in_1Mmg0KEMyoEBRsWZiuBr0cB0 applies the coupon to BOTH the credit for unused time and the debit for remaining time

urban sparrow
#

@mint scroll Did that clear things up?