#max_code
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/1438491293037756426
π Have more to share? Add more details, code, screenshots, videos, etc. below.
hey there! do you have an example ID (pi_xxxx) for a payment this happened with?
Hello π
Sure, pi_3SSyeGBXlndlEFq41zZRzePJ
But then a different paymentintent is showing in the console logs
<EmbeddedCheckoutProvider
stripe={stripePromise}
options={{
clientSecret,
// Enhanced 3D Secure and error handling
onComplete: () => {
console.log('β
Payment completed successfully');
},
}}
>
<div className="mx-auto w-full max-w-xs sm:max-w-2xl">
<EmbeddedCheckout />
</div>
</EmbeddedCheckoutProvider>
@staticmethod
def create_checkout_session_embedded(
member_id: str, customer_id: str, source: str = "form"
) -> Optional[str]:
"""Create checkout session and return shortened URL"""
try:
if source == "form":
return_url = settings.stripe_form_return_url
else:
return_url = settings.stripe_member_portal_return_url
session = stripe.checkout.Session.create(
payment_method_types=["card"],
mode="subscription",
ui_mode="embedded",
line_items=[
{
"price": settings.stripe_subscription_price_id,
"quantity": 1,
},
],
metadata={"member_id": member_id},
customer=customer_id,
subscription_data={"metadata": {"member_id": member_id}},
locale="en",
return_url=return_url,
)
return session
except Exception as e:
logger.error(f"Error creating checkout session: {e}")
return None
Sure π
thanks for your patience so far
generally, these 'No such XYZ' errors are caused by an API key mismatch (i.e. you try to make a request related to an object, but it doesn't exist on the account of the key being used)
but I think this may actually be an issue on our end in this case
do you have the request ID (req_xxxx) associated with these 'No such XYZ' errors?
I'm not seeing a requestId on client, would it be backend?
it would be in the response headers, although it might not have been included on the client
ah perfect, thanks a lot
The first is for 'POST https://api.stripe.com/v1/3ds2/authenticate'
yep, this is a bug on our end - we have a fix in the works but I don't have more context or a timeline to share right now
I'd recommend opening a case with our team so we can follow-up with you directly
Hello @inner willow, we have sent you a direct message, please check it at https://discord.com/channels/@me/1438497956645830710
- πThe message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
The second is for 'GET https://api.stripe.com/v1/payment_intents'
Ah I see. Do you know roughly how long these issues take to resolve?
is the second request being made by your code? the first one is an internal request (which is why I can see it's a bug), but I'm not sure about the second one
is your front-end code retrieving the PaymentIntent?
I'm assuming so as it's included in the second request but with message:
"No such payment_intent: 'pi_3SSz5GBXlndlEFq41hajPzGD'"
hi! I'm taking over this thread.
Hi! π
one possible reason for the error you see is that you are intializing Stripe twice, and with different API keys. So can you double check your code to see is this could be the issue?
Ok I'll take a look quickly now
I'm not initializing twice, checking keys now
If it helps, it works when not attempting 3D secure, just doesn't when I use a test card which requires it
and can you double check you are using the correct pk_xxx key on your frontend?
cs_test_a1uBqG7JHYTIvKq5JocSGmXgNJzg7VhtUz7u28eh7psutIwv0djN1Yi34h belongs to account acct_1SFBSxBXlndlEFq4. And its publishable key ends with qKpL.
no worries, I think the error message could have been clearer about this