#samip_best-practices

1 messages Ā· Page 1 of 1 (latest)

west pineBOT
#

šŸ‘‹ 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/1293778789364535357

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

opal slate
#

your customers can upgrade the subscription through the customer portal

vast matrix
#

Thank you for the prompt reply

#

How do I supply the price ?

https://docs.stripe.com/api/customer_portal/configurations/create#create_portal_configuration-features-subscription_update-products-prices

I tried to supply it inside features.subscription.update.products.prices but I am getting a TS error saying prices does not exists ?

        subscription_update: {
          enabled: true,
          default_allowed_updates: ['promotion_code', 'price'],
          products: {
            prices: [priceId],
            product: productId,
          },
        },
#

Sorry, I misread

#

it's an array of objects šŸ¤¦ā€ā™‚ļø

opal slate
#

np!

vast matrix
#

Thank you, this is what I was looking for

#

One more question though, once the customer updates. Is there a way I can redirect them to my application without them having to click on return ?

#

I populated return_url but it only redirects after I've clicked on Return to <My Application>

opal slate
#

there's no other way unfortunately, they'll need to click on the Return to....

vast matrix
#

And if the customer has a underlying discount, I can't remove it from the portal session right ?

opal slate
#

do you mean you don't want to allow the customer to remove an underlying discount?

vast matrix
#

Can you please take a look at this invoice ID ? : in_1Q8Dq6Gei7MrDZaxx4eQ9Uvq

I have a customer who subscribed to Product X that has 4 different prices and had a 10$ discount, when the customer upgraded to a different priceID in the same Product X , the 10$ discount got applied.

I don't want it to apply on upgrade because I've already offered it once

opal slate
vast matrix
#

Yes

#

It is applicable to the same product, I am aware of that. However, I want to offer it only when they are on a smaller value plan and not when upgrading

opal slate
#

that level of customization isn't possible right now. Since the coupon itself applies to the same product and over a duration of 12 months, it'll still apply in the situation you mentioned