#やまだ えしら

1 messages · Page 1 of 1 (latest)

obtuse socketBOT
cursive creek
#

cus_Nzl9jNatA4OEB1 has customer's coupon.
cus_Nzl7ZMJchbbjLd has subscription's coupon.

There is a difference whether the coupon is digested with proration payment or not.

formal cradle
#

Can you share more details please? what you mean by different behavior can you share some example

#

Can you share the subscriptionId of both customer ?

cursive creek
#

ok!

sub_1NDldmJrgt3ZD9jfVSgcoe1j
sub_1NDlbmJrgt3ZD9jf2cdnYZsm

Same order.

formal cradle
#

Thanks for sharing, checking..

#

The subscription sub_1NDldmJrgt3ZD9jfVSgcoe1j the coupon is applied only for one month. While for sub_1NDlbmJrgt3ZD9jf2cdnYZsm the coupon is applied for each month

cursive creek
#

sub_1NDlbmJrgt3ZD9jf2cdnYZsm the coupon is applied for each month

Yes, the coupon is applied for each month. Therefore, sub_1NDlbmJrgt3ZD9jf2cdnYZsm should also not have the coupon applied for the 6/1 payment.

obtuse socketBOT
formal cradle
#

should also not have the coupon applied for the 6/1 payment
What do you mean exactly by this ?

cursive creek
#

To avoid using a TEST CLOCK, I was testing with an easy to understand 1 month coupon!

#

It should be the same with or without the test clock.

formal cradle
#

Yes, just to make sure that the issue is in the upcoming invoice or the next invoice.

cursive creek
#

For clarity, we are trying this with a one-month REPEATING coupon.

On the first payment, both the customer coupon and the subscription coupon are successfully discounted. At this point, the 1-month coupon should have done its job.
Yet, in the case of the customer coupon, the coupon has been applied to the next month's payment.

#

Ok,

#

I'll try with test clock

formal cradle
#

Yet, in the case of the customer coupon, the coupon has been applied to the next month's payment.
This is for the upcoming invoice and not the concrete next invoice, that's why I suggested using test clock and advance time to see the generated invoice of the next month is correct or not.

#

I'll do a test with you in //

cursive creek
#

Ah, I see. So you are saying that the next Invoice may not be accurate?

formal cradle
#

the upcoming* invoice.

#

Between why you are creating a recurring coupon for 1 month and not creating a single time use coupon ?

cursive creek
#

For testing. I really want to use a 6 month repeating coupon, but the length of time it can be used depends on whether it is given to a customer or a subscription.

formal cradle
#

Why you are using 1 month repeating coupon ?

#

And not 6 month repeating coupon ?

cursive creek
#

I thought the upcoming invoice would show the applicable time period.

#

Since it takes time to validate using a test clock, I thought that if we tried it in one month instead of six months, we would not need a test clock.

But if the UPCOMING INVOICE is not accurate, then it may be a different story.

#

Now, the test clock data is ready.

clock_1NDm37Jrgt3ZD9jfgYzVU0dW

cus_Nzlbn3EhdJyPFX has a coupon for 10% off for 6 months to the subscription.
cus_Nzlaf4QztpExyc has a coupon for 10% off for 6 months to customers.

formal cradle
#

And every is working fine ?

cursive creek
#

Confirmation.

Since it starts 5/31, the 6 months in effect are payments for 5/31, 6/1, 7/1, 8/1, 9/1, 10/1 and the discount should disappear from 11/1, right?

#

I will advance the time until 12/1.

#

Ah wait

formal cradle
#

Yes.

cursive creek
#

TestClock seems to support until 2023/07/31 😢

#

Now I'll try again with a one month coupon.

formal cradle
#

Ah yes I missed that sorry, the test clock can be advanced just for 3 monthes.

#

Can you retry with a repeating coupon for 2 months.

obtuse socketBOT
cursive creek
#

ah, ok. I'll try with 2 months one

formal cradle
#

Between, I didn't managed to reproduce the behavior of your Subscription sub_1NDlbmJrgt3ZD9jf2cdnYZsm using 1 month repeating coupon 🤔

cursive creek
#

clock_1NDmJtJrgt3ZD9jf4Cn4fqEj
cus_Nzlt7k1oWF3UOr and cus_Nzltm0FSA0GwP6
created data. Let's move forward in time.

#

After all, coupons applied to customers are applied one month longer.

#

In cus_Nzltm0FSA0GwP6, three payments were discounted, so the discount was applied over two months.

In cus_Nzlt7k1oWF3UOr only two payments were discounted. This one is still correct.

formal cradle
#

Ah you are creating a backdated subscription (start on May 1st), right ?

cursive creek
#

Yes

formal cradle
#

Doing quickly another test...

#

The issue is that you are using a billing cycle anchor different to the subscriprion start.

#

I think this is a bug, I'll submit a ticket for this internally and assign your account to it.

cursive creek
#

Oh, really

formal cradle
#

However, you can set both Subscription and billing start at the same date.

#

So that the coupon will be used only once, I'm not sure if this is expected or this is a bug actually, I'll submit feedback and see

#

So to resume you have two option:

  • Create the Subscription starting from today
  • Create a backdated Susbcription and make sure that the billing cycle start at the same backdate.
cursive creek
#

I thought so too, and set the billing_cycle_anchor to be the same as the backdate_start_date, but it seems that I cannot use a past timestamp for the billing_cycle_anchor!

formal cradle
#

When using the APIs you can't yeah. However in the dashboard it seem you can.

cursive creek
#

I see. That's strange.

#

But we must always operate from the API due to time zone issues. So we cannot solve that problem.

formal cradle
#

You can either use Subscription's coupon for backdated or create a Subscription that is starting today for both coupons (customer and subscription)

cursive creek
#

It will be.

I'm going to ask a slightly different angle on this question.

formal cradle
#

thanks for your patience and your help. Don't hestiate to come back if you have any follow up questions.

cursive creek
#

Our service requires payment on the 1st of each month.
Even if you start a contract in the middle of the month, you must pay the full amount for that month immediately.

I was told by StripeDevs yesterday how to fulfill this.

  • backdate_start_date: make it the first day of the month you join
  • proration_behavior: always
  • billing_cycle_anchor: next beggining day of month
formal cradle
#

Correct.

cursive creek
#

And it worked fine, but thanks to the discrepancy with the billing_cycle_anchor, I found that the coupon did not have the intended result.

#

Are there any other ways to create data that would satisfy the conditions I just mentioned?

formal cradle
#

You can set the coupon to the Subscription and not the customer level

cursive creek
#

I see. Indeed it is.

#

I did not explain the background of the big book. My apologies.

#

For example, you have a "Coupon A" that offers 10% off for 6 months and a "Coupon B" that offers 50% off for the first time only.
Now, by giving Coupon A to the customer and Coupon B to the subscription, Coupon B would give a 50% discount on the first payment and a 10% discount on the remaining 5 months.

#

In that sense, it is important whether coupons are given to customers or subscriptions.

The previous example would not work if it were the other way around. We understand that coupons granted to subscriptions have a higher priority.

#

Sorry it took so long.

Anyway, if there is no other way in this case, it seems that the only way is to manually control the discount using SubscriptionSchedule.

formal cradle
#

Anyway, if there is no other way in this case, it seems that the only way is to manually control the discount using SubscriptionSchedule.
Yeah unfortunatly this use case is quiet advanced, probably you should manage it using Subscription Schedule.

cursive creek
#

Thank you for everything.

First of all, I hope that bug will be cured. Can I know if there is any progress?

formal cradle
#

You'll be contacted if this will be addressed, but don't hesitate to come back or reach out to Stripe Support by mentioning this thread and check for updates at
https://support.stripe.com/contact