#nsad_api

1 messages ¡ Page 1 of 1 (latest)

rugged tinselBOT
#

👋 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/1310969420172234835

📝 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.

amber fulcrum
#

What's the problem exactly?

ashen wren
#

Hello, i am create configuration using code, example;

        configuration_portal = stripe.billing_portal.Configuration.create(
            features={
                "customer_update": {"enabled": False},
                "invoice_history": {"enabled": True},
                "payment_method_update": {"enabled": True},
                "subscription_cancel": {
                    "mode": "immediately",
                    "enabled": True
                },               
                "subscription_update": {
                    "enabled": True,
                    "default_allowed_updates": ["price"],
                    "products": {
                        "prices": ["price_1QPP7cLD7F1SKXUOvtFh8eBL"],
                        "product": "prod_RHz5wYvUOFhcC2"
                    }
                }
            },
        )
#

This subscription cannot be updated because the subscription update feature in the portal configuration is disabled

amber fulcrum
#

Or where do you see the error?

ashen wren
#

req_gH7304lNNmK2Vz

amber fulcrum
#

You create the configuration, then create a session with the configuration ID

ashen wren
#
        configuration_portal = stripe.billing_portal.Configuration.create(
            features={
                "customer_update": {"enabled": False},
                "invoice_history": {"enabled": True},
                "payment_method_update": {"enabled": True},
                "subscription_cancel": {
                    "mode": "immediately",
                    "enabled": True
                },               
                "subscription_update": {
                    "enabled": True,
                    "default_allowed_updates": ["price"],
                    "products": {
                        "prices": ["price_1QPP7cLD7F1SKXUOvtFh8eBL"],
                        "product": "prod_RHz5wYvUOFhcC2"
                    }
                }
            },
        )
        portal_session = stripe.billing_portal.Session.create(
            configuration=configuration_portal.id,
            customer=stripe_customer_id,
            return_url=return_url,
            locale='pt-BR',
        )
#

its correctly, but show the same error

amber fulcrum
#

Could you please share the new Request ID?

ashen wren
#

req_CgIYgqNFLiobvC

amber fulcrum
#

I don't see that you're providing the configuration ID here. This seems to have a different set of parameters than the code above.

ashen wren
#

its correctly. i was pass wrong parameter

#

sorry, i can fix that.

#

thanks so much, have a nice day!