#ashtray-wasp_api

1 messages ยท Page 1 of 1 (latest)

viral kiteBOT
#

๐Ÿ‘‹ 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/1465706688995655773

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

rapid ravine
#

hey there, taking a look

#

Can you share the payload response you get from this?

tranquil peak
#

Tried this with new API version and the invoices/create_preview endpoint, still the same issue. See:

rapid ravine
#

Do you have the request where you created that coupon? I can't fiund it in your logs going back a week or so

tranquil peak
#

Here's the coupon creation request ID: req_6MNxb1zLXDbXU4

rapid ravine
#

ty

#

I think this is because you've disable prorations with proration_behavior=none so that first backdated/prorated month is not invoiced but is the one month that the coupon would apply to. Notice the period of the preview invoice is for Feb 19-Mar 19, the next month/renewal.

#

And because your coupon is only for one month (the first month) its done by that point and no discount applies

#

Do you intend to not invoice for Jan 19 - Feb 19?

#

If you want to have a first invoice for Jan19 -Feb 19, with the coupon discount, i think you'd get that by removing the proration_behavior

#

If you intent to not invoice for that period, and want the discount to apply to the second invoice/renewal in the response, then i expect you;d want the coupon to have a 2 month duration

#

So depends on what you're trying ot get to

tranquil peak
#

Okay, interesting. My intention was to preview the amount of next payment of subscription with that parameters with the NEW discounts added. So my assumption is that the discount doesn't exist in the subscription, it's to be added in the next invoice.

rapid ravine
#

Well you're generating a new subscription preview here, since no existing subscription is specified

#

If you remove the proration none, do you get the result you were expecting?

viral kiteBOT