#niceone_api

1 messages ¡ Page 1 of 1 (latest)

somber steepleBOT
vestal flintBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

somber steepleBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1255568407454154853

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

molten wren
#

Hello! The error message is accurate, you can't add a coupon to a Subscription in this scenario. You would need to change the payment_behavior to something other than pending_if_incomplete and then separately add the coupon after that.

cold sorrel
#

but if I add it separately then it won't be used in proration calculation right?

molten wren
#

Can you tell me more about exactly what you're trying to do?

cold sorrel
#

so let's suppose the user has subscription plan for 10$, is in the middle of period (so used 5$) and want to change to 20$ plan, so he would need to pay 5$ when switching to new plan; but I wanted to support adding the coupon so applying e.g. coupon with discount 2$ and use this coupon already during update (so he would need to pay 3$ not 5$)

molten wren
#

That makes sense, but how does the pending part factor in?

cold sorrel
#

pending part we use to support the case when during the update you cannot charge him for proraion (ProrationBehavior.ALWAYS_INVOICE) because some action is required like 3ds

molten wren
#

Oh, wait, I see...

#

This is unfortunately something we don't support. You would need to work around it another way, like adding a credit as a negative line item, or adding funds to the Customer's balance instead of using a coupon.

cold sorrel
#

I see, and then after update is done apply the coupon for further use?

molten wren
#

Yep. You can try it all in test mode to make sure it works the way you want/expect.

cold sorrel
#

a how to do this? " like adding a credit as a negative line item, or adding funds to the Customer's balance"

molten wren
#

We have a feature request internally for supporting coupons on pending updates, and I added a link to this conversation to it, but I can't say when or if it will ever be supported.

cold sorrel
#

I assume I should do this before the update?

molten wren
#

I'm not sure if there's a good way to get a negative line item in there for a pending update.

cold sorrel
#

so I do customer balance adjustment and then (as a separate step) the subscription update?

molten wren
#

Yep, and then reverse the balance adjustment if the pending update doesn't pan out/gets canceled.

cold sorrel
#

got it

#

will try it out

#

thanks for the help

molten wren
#

No problem, good luck with it!

cold sorrel
#

thanks a lot