#Gkiokan-subscription-coupon

1 messages · Page 1 of 1 (latest)

gleaming glacier
#

Hmmm, let me dig a minute

abstract patrol
#

I have especially one problem with that.

#

A coupon, with a duration of 3 months for 100% discount doesn't work for yearly subscriptions. (reported already)

However, I am patching them before updating the subs.

The issue happens when I upgrdae from a monthly sub with coupon to a yearly sub

gleaming glacier
#

Which coupon on you using?

abstract patrol
#

There was not any other easy solution to this. But this works only for initial subscriptions.
So I have each coupon duplicated

#

VISOFAMILY

#

I am talking expecially about this invoice here in_1LBnUoHa5WPIKK5IQdgTqtMx

#

It just overtakes the "old coupon". But as I said, even the coupon is setup as 3 months for 100% it does discounts* the yearly subscriptions with full 100% so I made this workaround

#

I could maybe get around this when I check for the coupon input. If nothing is provided I could try to add coupon => '' but not sure if this will work

gleaming glacier
#

So the duration on the coupon is set to 3, so that means it will apply to the next 3 Invoices generated on the subscription, which complicates things

abstract patrol
#

it is set to 3 months, not 3 intervals

gleaming glacier
#

Ahhhhh, right

abstract patrol
#

No worries about that

gleaming glacier
#

Still though. Same basic problem

#

It's getting applied regardless of the upgrade

abstract patrol
#

correct

#

Is there a way to prevent it?

#

I mean it's fine for monthly subs, but if I swap to a yearly it screws up the whole invoice

#

I can confirm, setting coupon to a empty string deletes the whole coupon on sub update

#

Let's fix this other way arround

#

I guess I can check if the current sub has a coupon applied right? I could get that coupon and patch it to the right one and apply it to the update params

gleaming glacier
#

Not sure if that implementation works for your use-case or not though

abstract patrol
#

Intersting part, but doesn't fix the issue if the coupon should still work but just with other params

#

I am looking for the api to get the current discount stuff

#

Is a coupon bound to a customer itself or to the subscription?

#

I think I can dig though that now.

#

Thanks anyways for the help. Can be closed

gleaming glacier
#

Sure thing. Hope you have a good day!

abstract patrol
#

Not that easy as I thought. Discount is null on the subscription lol