#Serotonin9443 - Checkout Coupon, Metered

1 messages ยท Page 1 of 1 (latest)

prime aspen
#

Hello! Can you describe in detail what you do want? How exactly do you want the discount to behave?

swift vortex
#

Hi! I'd like a Coupon set for a duration of 1 month, and have it apply to all metered usage reported during that 1 month.

#

I'm currently seeing that the metered usage will be billed at the start of the next month's invoice.

prime aspen
#

But you only want the discount to apply once?

swift vortex
#

Good question, I understood the "duration" field of the Coupon to mean that all charges during that duration would be discounted.

#

Maybe I need to apply a discount on the Customer object? That would have other undesired behavior though, because I only want the Coupon to apply for 1 month's usage

prime aspen
swift vortex
#

Sorry, I wasn't very clear. For this particular Coupon, I have set the duration="repeating" and duration_in_months=1

#

And it doesn't appear to be applying to the metered usage.

#

It seems to behave the same as duration="once"

prime aspen
#

Right, because the metered usage shows up on the Invoice for the second month.

swift vortex
#

Exactly the problem ๐Ÿ™‚

prime aspen
#

Sorry, maybe I'm misunderstanding something. Is the first Invoice generated for the Subscription $0?

swift vortex
#

After the discount is applied, yes it is $0. There are 2 prices attached to the subscription, one of a base price, and another of a metered usage price. The offer to my customers is "$15 off of 1 months usage"

#

And the way things are set up now, they will be billed next month for the metered usage, which is not what I want.

prime aspen
#

Ah, okay, I thought the first Invoice was $0 before the discount.

#

But it's not, so it's consuming the one-time Coupon.

#

So you would need to apply the Coupon after the first Invoice is generated.

#

You can make it a one-time coupon, which I think is what you want, instead of a repeating one.

#

Since you only want it to apply to a single Invoice, correct?

swift vortex
#

Yes that's right... ok I think this will do what I want! Thank you! ๐Ÿ™Œ

prime aspen
#

Happy to help! Make sure you test it in test mode to ensure it does exactly what you want. ๐Ÿ™‚

swift vortex
#

Definitely. One caveat is that I think I will need to wait until the last day of the first month before applying it, and deduct the next month's base price from the coupon. That way it only applies to the metered usage and not the next month's base price.

prime aspen
#

If you don't restrict it the Coupon applies to the entire Invoice, including everything on it regardless of when the stuff was created.

swift vortex
#

Oh perfect

#

Hmm, I was hoping applies_to would allow by Price. All of my prices (base and metered usage) are on a single Product, so that field isn't going to work out for me.

#

Maybe I am using Products and Prices wrong ๐Ÿ˜…

prime aspen
#

I think you'll need to break it out into a separate Product for your use case.

swift vortex
#

Yeah agreed. Is it a convention to normally put metered usage Prices on separate Products? Or just something I need to do for my specific offering.

prime aspen
#

It depends a lot on the use case, but generally speaking a Product represents the thing someone gets for paying, and thus if you want to apply a discount the thinking is that the discount would apply to that thing, not some subset of the thing.

swift vortex
#

Makes sense. FWIW it was a little confusing that Prices get added to Subscriptions, not Products to Subscriptions ๐Ÿ˜“

prime aspen
#

Products represent the thing people are paying for, and Prices are meant to represent how much they pay. An example would be a Product representing something like a specific chair, and that Product might have two Prices, one for the normal cost of the chair and another for a sale price.

swift vortex
#

Ahhh that makes it more clear.