#jmduke_unexpected

1 messages ¡ Page 1 of 1 (latest)

uneven raftBOT
#

👋 Welcome to your new thread!

⏱️ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime!

🔗 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/1212434437996945470

📝 Have more to share? You can add more detail below, including code, screenshots, videos, etc.

⏲️ 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. Thank you for your patience!

last graniteBOT
#

Hello! We'll be with you shortly. 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.

  • jmduke, 2 days ago, 6 messages
serene fable
#

The specific response I get back within the checkout session:

{
  "error": {
    "message": "Connected account impersonation is not allowed on this endpoint.",
    "request_log_url": "https://dashboard.stripe.com/acct_1FpVWKLQOcKtyOtG/logs/req_a2K2FznIwsEPVu?t=1709137321",
    "type": "invalid_request_error"
  }
}

(Note that that log does not actually appear to exist)

last graniteBOT
coral steppe
#

That request is for a Customer Portal related call. Can you send me the code that you are running when you get this error?

serene fable
#

Yup, it's:

stripe.checkout.Session.create(
            line_items=[
                {
                    "price": price.price_id,
                    "quantity": 1,
                    "dynamic_tax_rates": newsletter.stripe_tax_rate_ids,
                }
            ],
            stripe_account=newsletter.stripe_account.account_id,
            mode="subscription",
            success_url=newsletter.get_absolute_url(),
            cancel_url=newsletter.get_absolute_url(),
            custom_text={
                "submit": {
                    "message": "You're signing up for a paid subscription of {}".format(
                        newsletter.name
                    )
                },
            },
            metadata={
                "referer_url": request.META.get("HTTP_REFERER"),
                "email": request.GET.get("email"),
            },
        )

(Some domain-specific logic there but you get the idea)

#

Note that this actually is not for customer portal, it is a checkout session (though I'm guessing there's some shared logic between the two?)

coral steppe
#

Oh right, because the customer already has a subscription we try to redirect to the customer portal.

#

Apologies didn't get to test on your site before, trying now

#

Thanks for the report. I will file this with our team behind this functionality, unfortunately I do not know if there is a potential workaround here while using this functionality as it exists now

serene fable
#

No worries, thank you for the quick response. It seems like it's pretty problematic if I'm understanding correctly — any connect platform that creates a checkout session for an account with this "only one subscription per customer" setting enabled (which the connect platform cannot set or toggle themselves) has broken functionality.

last graniteBOT
coral steppe
#

Yes that is very bad. Discussing with my colleagues quickly on how to move forward

serene fable
#

❤️ Let me know if there's anything else I can provide!

coral steppe
#

You should be good. We have identified the cause of this error, so I will file a bug report about this and flag to eng team that this is important to fix. Unfortunately I don't have an ETA on a fix, but we are taking this seriously

serene fable
#

Thank you! Can someone email me / DM me once it's fixed?

coral steppe
#

Happy to, can you write an email to our support team about this, mention that you talked to me on discord, and then DM me your email address so I can grab it? I can get back to you through that email

serene fable
#

Yes! I'm at justin@buttondown.email.