#ciri_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1343955247642710056
đ 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.
Hm I wasn't aware of this restriction, but it's possible. You called https://docs.stripe.com/api/customer_portal/configurations/update to attempt to update it and it errored?
This is the error I'm getting:
Request req_xxrEyNNPLv7c7H: You cannot make any changes to a PortalConfiguration that was not created by your application, or to a PortalConfiguration that has is_default: true on a connected account.
And the code to reproduce it:
def test_billing_portal_update():
stripe_account = stripe.Account.create(
type="express",
country="IT",
capabilities={"card_payments": {"requested": True}, "transfers": {"requested": True}},
settings={"branding": {"secondary_color": "#000000"}},
)
cfg = stripe.billing_portal.Configuration.create(
stripe_account=stripe_account.id,
features={
"customer_update": {"allowed_updates": ["address", "name", "phone", "tax_id"], "enabled": True},
"subscription_cancel": {"mode": "at_period_end", "enabled": True},
"invoice_history": {"enabled": True},
"payment_method_update": {"enabled": True},
},
login_page={"enabled": True},
)
cfg = stripe.billing_portal.Configuration.modify(
cfg.id,
stripe_account=stripe_account.id,
features={
"invoice_history": {"enabled": False},
"payment_method_update": {"enabled": False},
},
login_page={"enabled": True},
)
stripe.Account.delete(stripe_account.id)
it will crash at the modify of the billing portal configuration
Ah ok yeah
So the first one you create will be the default
So your workaround does make sense
ok, so this is the only way, can you confirm this?
Yeah there's not a way to make that first configuration not the default