#shaneCC-remove-promotion
1 messages · Page 1 of 1 (latest)
Good question. Will look in to this in a moment. How are you updating the subscription?
I run a subscriptions.update call to add the new price, then I run a subscriptionItems.del on the original sub item
Hello! So you mean the Promotion Code is still showing up in the discount property of the Subscription?
yep! active and discounting still
Meaning it's discounting a Product it's not configured to? Can you give me a Subscription ID where this is happening?
for sure!
Sub ID: sub_1JrmwrBCGMlcADBTyIMbdPot
Original Price ID (promo allowed)
price_1GuI5zBCGMlcADBTPmxo46na
New Price ID (promo not allowed)
price_1GuI5zBCGMlcADBTnkZPaSnb
Taking a look, hang on...
You will see a lot of events on this sub as well. I am using this sub to work out some bugs
You know... I am actually seeing that the next invoice is for the full price of the new product. So maybe it's not still in affect but still showing details about it
I'm seeing the discount still present, but the actual amount being taken off on the next Invoice is zero.
Yep.
The discount is still on the Subscription, but it will only apply to the Products you set it to apply to. Removing a Price belonging to one of those Products doesn't remove the discount from the Subscription. That way the discount still works if you switch back to a Product where the discount applies.
ok I see
So the only issue for me is that because it doesn't drop from the sub, the webhook includes the discount line item still even tho that product is no longer in there. So our platform is showing incorrect information because it thinks that coupon is applied still
Do you have any suggestions for overcoming this?
Yes, but question: what behavior do you want? Do you want the discount to remain on the Subscription so it works if you switch back to a Product it applies to, or do you want to remove it from the Subscription entirely?
I would prefer it being removed entirely since the customer will be required to entire the coupon again anyways