#zlf_api

1 messages · Page 1 of 1 (latest)

hushed shardBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1399294485887975475

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

harsh shell
#

We encountered an issue when using a Stripe coupon.

We have a coupon with a value of $24.99, and there are two products involved:

Product A: $24.99

Product B: $14.99

Case 1:
When we create a subscription with both Product A and Product B and apply the coupon, then later update the subscription to add another Product B, Stripe charges $14.99 + $14.99 during the proration.

Case 2:
When we create the same subscription with Product A and Product B, but without a coupon, and then add another Product B later, Stripe charges only $14.99, which is expected.

Both updates are made during the active billing period, and proration is enabled.

The second behavior is expected, but the first one is not — we only want to charge the customer for the newly added Product B ($14.99), not duplicate charges.

Can you help clarify why this happens when a coupon is applied, and how we can avoid this double charge behavior?

shut burrow
#

Hi! Do you have the subscription IDs for both cases so I can take a look?

harsh shell
#

1、sub_1RpkovHiYvn8ZIkePSOuGXUQ

#

2、sub_1RplGBHiYvn8ZIkei7w5PZ3Z

#

Test Environment

#

acct_1Obwo2HiYvn8ZIke

shut burrow
#

I don't see the subscriptions being updated. Do you have the subscription where you encountered case 1?

hushed shardBOT
harsh shell
#

For this subscription (sub_1RpkovHiYvn8ZIkePSOuGXUQ), when I call the upcomingInvoice method to add a product B ($14.99), the result shows that I need to pay $14.99 + $14.99.

mellow rampart
#

Hey! Taking over for my colleague. Let me catch up.

harsh shell
#

Sure, thank you! Could you please help me look into this issue?

mellow rampart
#

For this subscription (sub_1RpkovHiYvn8ZIkePSOuGXUQ), when I call the upcomingInvoice method to add a product B ($14.99), the result shows that I need to pay $14.99 + $14.99.
Could you please share the request Id of this API call?

harsh shell
#

I wasn't able to capture the request ID in my logs. Would it be okay if I share the request parameters and the response body instead?

#

request:{"customer":"cus_Sgloj05nMdl3qX","subscription":"sub_1RpkovHiYvn8ZIkePSOuGXUQ","subscriptionItems":[{"id":"si_SlHN1mF2wvBMvG","price":"price_1QUjmiHiYvn8ZIke121TvtuT","quantity":1},{"id":"si_SlHNxvc4Zl5n6W","price":"price_1RFAsAHiYvn8ZIkevRg7FTXz","quantity":2}],"subscriptionProrationBehavior":"ALWAYS_INVOICE"}

mellow rampart
#

The request Id is crusial here for investigation in order to understand when exactly you make the upcoming invoice call

#

Would you be able to create a test simulation with exact your use case and share with me the test Susbcription and the invoice preview request Id ?

harsh shell
#

I'll give it a try.

#

wait a jiff

#

req_5RBQuOFe9NsQ0O

#

Hi, I just reproduced the issue using a test request. The request ID is: req_5RBQuOFe9NsQ0O.
Please help check why the invoice preview for this subscription returns a charge of 14.99 + 14.99 instead of just 14.99 when a 24.99 coupon was originally applied.
Thank you for your help!

mellow rampart
#

Checking ...

#

Ah, at the begining, you said proration is disbaled, here proration is taken into account

#

You should update subscription_proration_behavior to none

harsh shell
#

We cannot set subscription_proration_behavior to none because our business logic requires proration to be applied during subscription updates.

mellow rampart
harsh shell
#

I'll give it a try.

mellow rampart
#

Please share the request Id too then.

harsh shell
#

req_yax2veriuRJm0K

#

Like the upcoming invoice, this also requires paying more.

mellow rampart
#

Checking further...

hushed shardBOT
harsh shell
#

I need help solving the following issue:
When creating a subscription using a coupon, I purchase product A ($24.99) and product B ($14.99). Later, when I update the subscription and add another product B, I expect to only be charged for one product B. However, the system is charging for two product B items instead.

All charges are prorated, and customers are allowed to modify subscriptions during the billing cycle.

mellow rampart
#

@harsh shell we are checking this issue, we'll get back to you shortly, sorry for the delay

cobalt harbor
#

👋 taking over for my colleague. Let me catch up.

#

sorry for the delay again

harsh shell
#

No problem, I’d really appreciate your help in resolving this issue.

cobalt harbor
#

we will don't worry

harsh shell
#

Okay, thank you very much.

cobalt harbor
#

ok, so this might take more time than expected to investigate this. would you mind taking this async? if so, you will receive a DM with a link to automatically create a ticket with our team, someone will get back to you soon with updates on our investigation and we'll continue the discussion asynchronously. does that work for you?

harsh shell
#

Yes, that works for me. Please go ahead and create the ticket — I’ll follow up asynchronously. Thanks for your help!

hushed shardBOT
#

Hello @harsh shell, we have sent you a direct message, please check it at https://discord.com/channels/@me/1399328788260585583

  • 🔗The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
cobalt harbor
#

you would have to create the ticket though with the link we sent you in a DM

harsh shell
#

Am I going to resubmit the question

hushed shardBOT
harsh shell
#

Is it created here?

cobalt harbor
#

yes please do

#

in english if it's possible

harsh shell
#

Okay, how will you contact me? By email?

subtle violet
#

hi! I'm taking over this thread.

#

someone from our team will reply to your email.