#kengo_error

1 messages · Page 1 of 1 (latest)

zealous kettleBOT
#

đź‘‹ 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/1372419791641514036

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

graceful junco
#

Hello,

When user try to register card info on the sandbox, it fails and get this error.

Are you referring to your own integration?

upbeat tinsel
#

Yes. I'm making language learning platform. I use stripe for payment. It didn't fail when it is test mode.

graceful junco
#

that script td-perfs_7.3.2.js doesn't look like it's from Stripe . Can you share the link to your site where we can see the Element? Please share the test login credentials (if any) and steps to navigate to the page where the Element is displayed.

upbeat tinsel
graceful junco
#

is that billing.stripe.com link for a customer which I can test with?

upbeat tinsel
#

it is link for production mode.

zealous kettleBOT
cold summit
#

Hi @upbeat tinsel I'm taking over this thread. Give me a sec to catch up

upbeat tinsel
#

I'm making this website with Nextjs.

if (customer) {
// Check if the customer has an active subscription
const portal = await stripe.billingPortal.sessions.create({
customer: customer.id,
return_url: ${process.env.NEXT_PUBLIC_BASE_URL}${langPrefix}/mypage,
});

  return res.status(200).json({ url: portal.url });
} else {
  // Create a new customer if one doesn't exist
  const session = await stripe.checkout.sessions.create({
    mode: 'subscription',
    payment_method_types: ['card'],
    line_items: [
      { price: process.env.STRIPE_PRICE_ID!, quantity: 1 },
    ],
    customer_email: user.email,
    success_url: `${process.env.NEXT_PUBLIC_BASE_URL}${langPrefix}/mypage?success=true`,
    cancel_url: `${process.env.NEXT_PUBLIC_BASE_URL}${langPrefix}/mypage?cancelled=true`,
    subscription_data: {
      trial_period_days: 7,
    },
  });
cold summit
#

Can I confirm that you only get this error when adding a card in live mode? And you don't have this error when doing the same in test mode (aka sandbox).

upbeat tinsel
#

Yes. I tried test payment manytimes on test mode. I didn't get error.

cold summit
#

Does this error prevent you from adding card successfully in live mode?

upbeat tinsel
#

Yes. I can not adding card. I tried some cards. But they failed...

#

I could add card, pay, and cancel on test mode without error.

cold summit
#

Does your browser have any 3rd-party plugin enabled? If you do, can you disable them and try again?

upbeat tinsel
#

I disabled all of then on chrome browser and tried. But it still failes.
When I open the page again, I got this error about cors.

Access to fetch at 'https://r.stripe.com/b' from origin 'https://billing.stripe.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

#

I don't know if it relates to adding card error.

cold summit
#

Ok, I'll test this in my own integraiton and see if I can replciate the same problem.

upbeat tinsel
#

Thank you.

cold summit
#

I tested the same in my billing portal page, and I don't see the error about td-perfs_7.3.2.js:13 Refused to apply inline style

#

Can you share with me your account ID (i.e., acct_xxx) ?

upbeat tinsel
#

acct_1RHkIcEorUYKCJJw 
This is my ID.

cold summit
#

Thanks. I don't see any logs in test mode. Can you share with me the ID of the customer of which you successfully added a card to it in test mode?

upbeat tinsel
#

I think when I started using production mode, Stripe asked me if its olay to delete test mode data.

In production mode, I can see customer on dashboard.

#

customer id is
cus_SJUt4blObV6I7P

cold summit
upbeat tinsel
#

Yes. I did. I tried cards from Japan and Australia.

cold summit
#

Was the 3DS authentication successful?

upbeat tinsel
#

Yes.

cold summit
#

This is not what I saw in in the setupIntent event. I'd recommend you reaching out to your card issuer, or use a different card.

upbeat tinsel
#

I found I can add card now. But I didn't change anythhing.

cold summit
#

Did you use a different card?

upbeat tinsel
#

I used same card.

cold summit
#

Ok, how about the other JP card? Are you able to set it up successfully this time?