#yamith_customer-portal-subscription-updates

1 messages ยท Page 1 of 1 (latest)

trail lintelBOT
#

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

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

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.

zenith oxide
ripe niche
#

I have four products but I don't see the option to choose which is suitable for downgrade or upgrade

zenith oxide
#

Can you give me the IDs of the four Products so I can take a look? It's the IDs starting with prod_

ripe niche
#

prod_RTcpAHMUS5DiUh
prod_QZ3VF4fNpKmPXV
prod_QXVP1Ri5uLAVsA
prod_QWrgaNwVCGvAdj
version test

zenith oxide
ripe niche
zenith oxide
#

Sorry, I can't read that. What's below that part of the screenshot, though?

#

There should be list of options for people to switch between.

ripe niche
#

Do you want you to put a ss of the entire screen?

zenith oxide
#

Just the Subscriptions section you expanded.

ripe niche
zenith oxide
#

Yeah, so you have several options listed there for people to switch between. You're saying they can't switch between the options you've specified there?

ripe niche
#

Moment please

#

It already lets me select the plan but if I select a lower one, it makes the change after a month and not when the billing period ends

#

It is as if it does not take into account the configuration that I am sending to it by the API

zenith oxide
#

That's because you're setting this:

features[subscription_update[schedule_at_period_end] value true

ripe niche
#

But if I put a higher sub if you make the change when the billing period ends

ripe niche
#

The sub that is active in this case is three months, it should last until April

#

In other words, what I want to do is that when it is a downgrade, it is done at the end of the active subscription, the upgrade is done immediately

#

Sorry if I don't know how to explain, you can ask whatever you want.

zenith oxide
#

Give that a try and let me know if that works to do what you want.

ripe niche
#

Okay please don't close the conversation

zenith oxide
#

We close idle threads after a bit, but you can always use the buttons in #help to ask another question if you need more help and this thread is closed when you come back.

ripe niche
#

Use decreasing_item_amount condition but still the same

#

features[subscription_update][schedule_at_period_end][conditions][decreasing_item_amount] value true

zenith oxide
#

Those are the only options, I'm afraid. If those conditions don't give you the behavior you want you'll either need to live with it the way it is or not use the Customer Portal and handle upgrades and downgrades yourself.

ripe niche
#

I don't understand, because it works the other way around, when upgrading it is done at the end of the active sub and the downgrade is done after a month

zenith oxide
#

It sounds like you want an "increasing item amount" option for a condition, but that doesn't exist currently.

trail lintelBOT
#

yamith_customer-portal-subscription-updates

ripe niche
#

I just want that when downgrading a sub it is done at the end of the current sub's period, when upgrading the sub it is done immediately, as it says on the portal ๐Ÿ˜ฆ

zenith oxide
#

Can you share the request ID for the request where you created the configuration with decreasing_item_amount set to true?

ripe niche
#

req_4aN9baUnSJOFiT

zenith oxide
#

You didn't set decreasing_item_amount in that request.

#

In fact, you didn't set anything regarding schedule_at_period_end in that request.

ripe niche
#

If that was what I was seeing, it is empty, nor is the condition

zenith oxide
ripe niche
#

i'm sending it like this, should I put something else? features[subscription_update][schedule_at_period_end][conditions][decreasing_item_amount] value true

chilly remnant
#

Hi there ๐Ÿ‘‹ jumping in as my teammate needs to step away. One thing I do want to point out, is that Bubble.io is a third-party platform offering Stripe integration functionality. We can't guarantee that what they offer aligns with the current state of our API. I wanted to call this out in case that's what is happening here, that Bubble.io hasn't add the necessary parameters for you to use this.

I'm taking a look at the request you shared and catching up on that.

ripe niche
#

Ok toby

chilly remnant
ripe niche
#

This is how I am passing the parameter
features[subscription_update][schedule_at_period_end] value true

#

But it does it for high subscriptions and not for low ones, I need to invest it

chilly remnant
ripe niche
chilly remnant
#

Can you share the request ID?

ripe niche
#

The last feature is that features[subscription_update][schedule_at_period_end][conditions][type][decreasing_item_amount] value true

chilly remnant
#

I don't know the Bubble side of this, so I'll always need the ID of the request you made to see what we received on our end.

ripe niche
#

req_czu4vVR1EsPMZj

#

Does not take it, sends the empty parameter of the condition type

#

It's like it didn't send the condition

chilly remnant
#

Agreed. There are multiple parameters in that screenshot that aren't making it to us based on the request ID you shared.

Unfortunately, I don't know Bubble's flows well enough to speculate on why that is, but I would recommend first focusing on figuring out why not all the parameters are coming through. Then once that is solved shift your focus to figuring out the exact syntax for the parameters.

Like I don't see the tax_id value in the request you shared either.

ripe niche
#

You're right

#

Do you know someone on your team who can help us?

chilly remnant
#

No, none of us know the Bubble side of things. If there are questions on that, I'd suggest reaching out to Bubble's support team.

I'm happy to help further if you can get all of the parameters coming through to us, but I don't know enough about the pieces outside of our system that you're using to help troubleshoot those.

ripe niche
#

I will do what you suggest, when I send all the parameters correctly I will let you know

#

I'm sending it now like this
features[customer_update[allowed_updates][]=email&
features[customer_update[allowed_updates][]=tax_id&
features[customer_update[enabled]=tru&
features[invoice_history][enabled]=true&
features[subscription_update[enabled]=true&
features[subscription_update][schedule_at_period_end]=true&
features[subscription_update][schedule_at_period_end][conditions][decreasing_item_amount]=true

#

And so it sends me the tax id, but subscription_update gives me an error

chilly remnant
#

Ah ha! Okay, closer then, let me double check the structure of that parameter.

#

(If you have the request ID from when that error was thrown can you share it? So I can see exactly how things came through to us)

ripe niche
#

I don't understand, the value should be a number or the decreasing_item_amount parameter

chilly remnant
#

No it shouldn't. decreasing_item_amount is a possible enum value that you provide to the ...conditions.type parameter, indicating to us what type of conditions should trigger the subscription update happening at the end of the billing period rather than immediately.

shortening_interval is the other supported type of condition for this behavior.

ripe niche
#

Umm ok let me try

ripe niche
#

I'm trying to send request with postman and look

chilly remnant
#

Do you have the request ID, so I can see what is coming through to us?

ripe niche
#

req_pTKdpdvzTmNyLn

#

req_3y1FviLe9eZvuc or this

chilly remnant
ripe niche
#

The requests I make through postman should appear there too, right?

chilly remnant
#

Yes, the requests you make with Postman will still show up in your logs, as long as you're using the API key that belongs to your account when you make them.

ripe niche
#

req_Re7mpRTxQJMRnY

chilly remnant
#

I don't understand. The parameters in your Postman screenshot aren't aligning with the parameters in the requests you're sharing. Are you sure you're sharing the correct request IDs?

Also, the Postman screenshot is including a features.subscription_update.schedule_at_period_end parameter, which isn't a valid parameter. Did you uncheck or delete that one, and only use the one below it?

ripe niche
chilly remnant
#

Oh, and sorry, I should have explicitly pointed out sooner that our APi ref shows that features.subscription_update.schedule_at_period_end.conditions is expecting an array of objects.

chilly remnant
# ripe niche

You unchecked the opposite of the one I suggested.

ripe niche
#

I have not given send yet

#

Error invalid array

chilly remnant
#

Well you're still passing true as the value there. so I expect errors to persist. And you aren't passing an array to ...conditions, so it seems expected that you hit an error there too.

You'll need to include a reference to the specific array location in the parameter name. Like:
features[subscription_update][schedule_at_period_end][conditions][0][type] with a value of decreasing_item_amount.

ripe niche
#

req_UG0Dvnvc3nI4kk

#

Something like that with this?

#

What would be a valid value for decreasing_item_amount?

chilly remnant
#

No, the value is not a number, the value will be decreasing_item_amount. The key will be what I shared in the previous message.

ripe niche
#

req_0fvVM1SgJu0orI

chilly remnant
#

Seems like you resolved the errors with that parameter. Now, as the error indicates, you need to add the features[subscription_update][products] parameter.

That parameter is expecting an array of objects, where the contents of that object are either a prices key with an array of strings of the Price IDs, or the product key with a string containing the Product ID.
https://docs.stripe.com/api/customer_portal/configurations/create#create_portal_configuration-features-subscription_update-products

ripe niche
#

req_TZDCUIu7nrb7dT

chilly remnant
#

You need to put the number of the array position, the way you did for the parameter we were working on previously, along with the key for the specific field in the array you're providing.

#

features[subscription_update][products][0][product]

#

You'll need to increment the number when you use it the second time in the same request.

ripe niche
#

req_Mut9Xl7opjq77q

chilly remnant
#

The error explains what is missing

ripe niche
#

Price but adding the price gives an error

chilly remnant
#

What is that error?

ripe niche
#

w8

#

req_AlBtxPWSOKQCOM

#

I think so but I don't know if the data is correct.

chilly remnant
#

You got a successful response, and the values you set are being reflected within the response body. So it seems like it's time to test the behavior of this configuration and see if it does what you're hoping.

ripe niche
#

Okay, I'm going to try it in bubble and I'll tell you.

#

This request is from bubble.io and does not send all the complete information

#

req_Kzjl8Lo3hRxFjF

chilly remnant
#

As mentioned before, that isn't something we're able to assist with. I'd recommend reaching out to Bubble's support team to troubleshoot why their platform isn't sending all the parameters you're setting within it.

ripe niche
#

thanks! toby!

trail lintelBOT
ripe niche
#

Question

lusty anvil
#

Hi! Go ahead. ๐Ÿ™‚

ripe niche
#

I already have an active subscription, and I am going to change it to a more expensive and longer one, it tells me that it will be effective until the current one ends, and I do not have it configured like that, it should be changed at once

lusty anvil
#

Is that your question? Are you still trying to do this via the Customer Portal, or is the Subscription change being done via Stripe's API?

ripe niche
#

Portal customer

lusty anvil
#

Can you share a Request ID for your latest attempt?

ripe niche
#

What happens, when I activate the portal with the configuration ID, it doesn't let me update, but, if not that implementation is "Activated", it does let me update, but with those conditions

#

req_INPhXMhRf3LqrR

#

And this is from the latest configuration req_wdnG6fCminnjAA

lusty anvil
ripe niche
#

Exactly what should you specify when creating the portal?

#

Ok, I added features[subscription_update][enabled] to the portal and it allows me to edit it, but it still appears the same, the upgrade until the end of the current period, and the downgrade "immediately"

lusty anvil
#

Yes, but you're not using that Customer Portal Configuration so those changes won't apply.

ripe niche
#

Why?

lusty anvil
#

I don't know - why aren't you including your Customer Portal Configuration ID when you create the Customer Portal Session?

ripe niche
lusty anvil
#

Cool. Can you show me a Request ID for a Portal Session where that configuration was used?

ripe niche
#

req_G3JQA3sLZar537

lusty anvil
ripe niche
#

In fact, not only did I notice that the configuration ID was there, but the parameters were not there.

lusty anvil
#

The Configuration ID that you are providing is not in the Request parameters; a different Configuration ID is present in the Session object.

ripe niche
#

let me see

lusty anvil
#

Cool. Also your Body type could be changed to form-data.

ripe niche
#

If I pass it to form-data this happens

lusty anvil
#

Well, that's a new error at least - we're moving forward!

#

Can you please share that Request ID?

ripe niche
#

If I create the portal with that parameter in postman it gives me this error

#

features[subscription_update][enabled]this

ripe niche
lusty anvil
#

Did you look at that Request in the Dashboard?

ripe niche
lusty anvil
#

But the goal is to get this working in Bubble, right?

ripe niche
#

Yeap!

#

But, well, trying to understand what is not useful, because in bubble sometimes it does not show the error like in postman

lusty anvil
#

I think that's because it's failing spectacularly.

#

This is ~what you want to be using: set the Content-Type to application/x-www-form-urlencoded and put the parameters in the raw body box, with each parameter separate by an &.

ripe niche
#

Let me try

trail lintelBOT
ripe niche
#

I have already set the creation of the portal and the portal configured

dapper sorrel
#

Hi ๐Ÿ‘‹

I'm taking over as my colleagues have to go. I understand you are having trouble creating the customer portal with the features you want. Is that correct? Could you give me a summary of what the issue is?

ripe niche
#

Hi Snufkin,
Yes, I am creating the client portal, but the problem is that I need that when a downgrade is made it takes effect when the period that is active ends, and when it is upgraded it takes effect immediately. and this right now is backwards

dapper sorrel
#

Okay and have you identified what parameters in the Customer Portal configuration would allow for this?

ripe niche
#

These are supposed to be features[customer_update][allowed_updates][]=email&
features[customer_update][allowed_updates][]=tax_id&
features[customer_update][enabled]=true&
features[invoice_history][enabled]=true&
features[subscription_update][enabled]=true&
features[subscription_update][schedule_at_period_end][conditions][0][type]=decreasing_item_amount&
features[subscription_update][products][0][product]=prod_RTcpAHMUS5DiUh&
features[subscription_update][products][0][prices][]=price_1QafaH09LC4lNyTLVzHHOAvL&
features[subscription_update][default_allowed_updates][0]=price&
features[subscription_update][enabled]=true&
features[payment_method_update][enabled]=true

#

But right now I create the portal and it won't let me do anything

dapper sorrel
#

Can you share the request ID for the API request to set the configuration?

ripe niche
#

Sessions req_hUyrEU74DSwp4S
Configuration req_2IVgA1WBCE2zp9

dapper sorrel
#

Thanks, taking a look

ripe niche
#

๐Ÿ™‚

dapper sorrel
#

Okay so you are using the schedule_at_period_end.conditions.type to specify that any change which decreases the subscription item amount will result in a change that occurs at the end of the billing period.

ripe niche
#

Yes sir!

dapper sorrel
#

And you are not seeing that behavior? I notice you are only allowing a change to 1 price

#

Which makes sense, since your subscription only has 1 item

#

Have you tested making these changes through the portal?

ripe niche
#

No, I'm going to put the other prices and you'll see that the update button doesn't even appear

dapper sorrel
#

OH you mean you can't update the Subscription?

#

Okay that might be an entirely different kind of error

#

Do you have the ability to Cancel the subscription?

ripe niche
#

No any button

dapper sorrel
#

Okay it seems like you are running into a limitation of the customer portal. There are quite a few and honestly we don't do a good job of surfacing them in the UI (we don't surface them at all). You can read about them here: https://docs.stripe.com/customer-management#customer-portal-limitations

I'm still looking at your Customer and Subscription to try and understand what the exact problem is

ripe niche
#

Ok, Ok, I already added the other product, and it does let me update, but not until the date of the one that is already active ends, which is in 3 months

dapper sorrel
#

Okay I think there is an issue with the unspecified tax behavior of the original Price that might be causing an issue

#

Customers can only modify subscriptions if the new price has the same tax behavior as the initial price. Additionally, no modifications are allowed if the tax behavior is unspecified, even if the tax behavior of the new price is unspecified.

ripe niche
#

I already added all the products, but the same behavior continues. Upgrade is carried out at the end of the current version and downgrade is carried out immediately

#

Is there an internal setting in Stripe that is reversing this setting for us?

dapper sorrel
#

Is there an internal setting in Stripe that is reversing this setting for us?

No there is not.

Are you actually completing these updates? Can you share a Subscription ID where these updates are taking place

ripe niche
#

It doesn't give me a record, it was only changed in stripe, but I assume the will be updated on the date it said

#

req_JpFjaLODYDioIO

dapper sorrel
#

Unfortunately I can only provide support in English

ripe niche
#

Sorry

dapper sorrel
#

That request ID is for an update to a test clock. Not the subscription itself

ripe niche
#

When I changed my subscription it did not give me a registration

#

I'm going to create a new one and change subs

dapper sorrel
#

Just the subscription ID will be sufficient. I can see the changed made to it

ripe niche
#

req_OrZ7BvOpf4slGI

#

Ok something changed, I can now make the change at the end of the current period, but I can also upgrade them

dapper sorrel
#

I think this is related to the restrictions I shared with you earlier.

#

I recommend you review them carefully so you understand what Subscription parameters will prevent your customers from being to use the Customer Portal to make changes.

#

If that is going to occur often with your integration, I recommend you build your own Subscription update UI.

ripe niche
#

I already have it, except that when doing it with the schedule it gave me a lot of errors, so they told me to implement the customer portal which was "easier"

dapper sorrel
#

"Easier" - only if your subscription & customer set up is configured in a very specific way

ripe niche
#

I'm realizing this, because when I buy the 3 month sub the problem comes back, but I don't know how to configure that in stripe

dapper sorrel
ripe niche
#

From the API or in the Stripe interface

#

Is there any call that will bring us all the information related to the products I have?

dapper sorrel
#

Sorry what kind of information are you looking for?

ripe niche
#

All the configuration that each of the products could have

dapper sorrel
#

I don't know what you mean by "all the configuration"

ripe niche
#

Ok ok thanks

dapper sorrel
#

Sure thing! Happy to shed what ๐Ÿ’ก I can ๐Ÿ™‚

ripe niche
#

Have quest

#

Question

#

This was how I was trying to request the issue of downgrades at the end of the period before messing with the customer portal

#

Here I make the schedule, but two phases are created plus the one that is active, when it is assumed that 0 is the current one and 1 would be the phase to which it should go when the time of the current subscription ends

dapper sorrel
#

Can you send the ID of the schedule that was created?

ripe niche
#

w8

#

evt_1QkbBD09LC4lNyTL4A3wU567

dapper sorrel
#

The start date is pretty far in the future though

ripe niche
#

Yes, that's what I mean by creating two phases.

trail lintelBOT
ripe niche
#

The current one should end on April 23, 2025 and the monthly sub will begin that same day, when the current one ends

dapper sorrel
#

What "current one". This schedule has no relationship to any "current" billing period

ripe niche
#

How could I make the proper request to be able to fix this?

dapper sorrel
#

What do you want do?

#

I have to step away but my colleage @green willow will be available to answer further questions.

๐Ÿ‘‹

ripe niche
#

What I want to do is that if I have an active subscription and I want to do a downgrade it is done when the active one runs out, but if I want to do an upgrade it is done immediately

green willow
#

๐Ÿ‘‹ gimme a while to catch up!

ripe niche
#

No prob!

green willow
#

What I want to do is that if I have an active subscription and I want to do a downgrade it is done when the active one runs out, but if I want to do an upgrade it is done immediately

I'm going to put aside the previous request that you made for now.

Assuming you have an existing subscription, the immediate upgrade should be fairly straightforward since you don't need a subscription schedule for that.

If you do an downgrade, you create a subscription schedule from an existing schedule, then you update the subscription schedule.

Which of the above have you tried and are having issues with?

ripe niche
#

At this moment, the one that had already been sent to you creates two subscriptions, now only send one, the one you create remains on the dashboard, but when you advance the clock it does not become effective and the one that is already there continues, or both remain active

trail lintelBOT
pulsar radish
#

Hi @ripe niche I'm taking over this thread.

#

Let me know if you have any follow-up questions

ripe niche
#

Hi Jack!

#

Everyone, I really haven't resolved anything since 2pm today that I've been in contact with you, and I appreciate that.

#

In conclusion, I am looking for a solution for my problem, and that is to be able to downgrade an active subscription at the end of it, and the upgrade to be done immediately,

#

I tried through the client portal, making a schedule for the subscription and nothing was achieved ๐Ÿ˜ฆ

pulsar radish
ripe niche
#

Yes and it doesn't work

pulsar radish
#

What's the portal configuration ID?

ripe niche
#

It works for certain Prices, and also for all grades, you are on a three-month subscription and you upgrade when the current one ends, it is working the other way around

pulsar radish
#

Can you share with me the ID so that I can check?

ripe niche
#

bpc_1QkaJD09LC4lNyTLFh6TxALZ

pulsar radish
#

And does the price that you downgrade to belongs to the same product that associated with the existing price?

ripe niche
#

No

ripe niche
# ripe niche

Here the price id and product id are well defined.

pulsar radish
#

I see, I think that's why it's not working.

#

https://github.com/stripe/stripe-node/issues/2251
The price you wish for your customer to update must be associated with the same product to which the customer is currently subscribed.

The same issue was discribed here, and you can find details in this ticket.

ripe niche
#

Ok thanks

#

Do you know how I can do the thing of having two prices on the same product?

#

Would I have to put the four prices that I have on the same product for it to work on all of them?

pulsar radish
ripe niche
#

I'll try, but it will be tomorrow and my head doesn't give me

#

Thanks for the help I will be writing to you tomorrow for more help