#zaid_alam_

1 messages · Page 1 of 1 (latest)

knotty basaltBOT
shut sand
#

hi, what's the question?

brave slate
#

after hitting at pay now getting errors

shut sand
#

was there a 3D Secure(authentication) popup shown?

Also, please share your full code so we can have a look, and the PaymentIntent ID pi_xxxx you might be using on that payment form

brave slate
#

yes 3D secure came but its blank

#

shall i zip my code

fading delta
#

Hi! I'm taking over this thread.

#

Can you share the PaymentIntent ID (pi_xxxx) as mentioned earlier?

#

The code you shared is for handling webhook event, so it's unrelated to the error you shared. Can you share your frontend code that use the Payment Element?

brave slate
#

import React, { useState, useEffect } from "react";
import { loadStripe } from "@stripe/stripe-js";
import { Elements } from "@stripe/react-stripe-js";

import CheckoutForm from "./CheckoutForm";
import "./App.css";

// Make sure to call loadStripe outside of a component’s render to avoid
// recreating the Stripe object on every render.
// This is a public sample test API key.
// Don’t submit any personally identifiable information in requests made with this key.
// Sign in to see your own test API key embedded in code samples.
const stripePromise = loadStripe("pk_test_51Lkh0ySCNi2p6XlULbqYoTrcSzThWufaVSvEc2oJP3VABk6rHfDJx69nMldBloQ8vkS1A5BCKELBXs1yvArZrch000Hk0PCh3E");
var amount = null;

export default function App() {
const [clientSecret, setClientSecret] = useState("");

useEffect(() => {
// Create PaymentIntent as soon as the page loads
fetch("/create-payment-intent", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ amount: amount }),
})
.then((res) => res.json())
.then((data) => setClientSecret(data.clientSecret));
}, []);

const appearance = {
theme: 'stripe',
};
const options = {
clientSecret,
appearance,
};

return (
<div className="App">
{clientSecret && (
<Elements options={options} stripe={stripePromise}>
<CheckoutForm />
</Elements>
)}
</div>
);
}

#

where can i found pi_xxxx

fading delta
#

where can i found pi_xxxx
You could log the ID from your backend server, or you could console.log the data.clientSecret on the frontend

brave slate
#

fine ??

fading delta
#

No, I'm looking for a PaymentIntent ID, it looks like this: pi_xxx. But I'll try to find it myself by checking your account.

#

Also I recommend you to delete your sk_test_ key above. You should not share it online.

#

Actually I just deleted it for you.

#

I think I found one: pi_3LmclNSCNi2p6XlU1gIneLqL Looking...

brave slate
#

okk checking it

#

thanks for deleting it

fading delta
#

Happy to help 🙂

brave slate
#

but not getting

#

my client is from USA

#

need to made for them

fading delta
brave slate
#

ok ok

#

if my account is from usa or cannada then creation of customer is needed ??

fading delta
#

For US accounts it's simpler: no need to set description or create a customer.

brave slate
#

okk got u

#

do u have the ready made code

#

now i have to create customer then do the payment intent

#

or any modification ??

fading delta
upper stream
#

Hi there 👋 I'm jumping in as my teammate needs to step away soon. I've read through the thread to get an idea of what you're working on, but if you are still having troubles then please let me know.

brave slate
#

hi @upper stream , then I need to create , update, retrieve customer right ??

#

but i dont want this details of customer , what its the other then ?

upper stream
#

Yes, for this scenario maintaining a Customer object is required. Will you be owning/operating the Stripe account forever, or will your client take over after the development has been completed?

brave slate
#

right now its under me but after implementation my company will purchase it and company will be owning the account

upper stream
#

And is that a US based company?

brave slate
#

yaah mainly cannada

#

but can arrange US account

#

my company name is CGI

upper stream
#

Gotcha, so in that case I would recommend trying to change the country of the Stripe account that you're using to reflect the country of that company. Some regions, India in particular, have different rules and regulations which we must follow that makes implementing for those regions a bit harder. If the account is not going to be an India-based account, then I don't think it makes much sense to go through the hassle of setting your integration up to accept payments for an India-based company.

I don't recall offhand if you can change the country of your account via the Stripe dashboard, but if not, then I would recommend reaching out to our Support team to see if they can assist with that change.
https://support.stripe.com/?contact=true

brave slate
#

ok let me try

#

it means need to create new account ☹️

upper stream
#

Ah, sorry, I was hoping that wasn't the case (we don't know account rules as well as our colleagues on the Support team)

#

I would recommend going ahead and creating a new account then, and basing that account in the country of the company that will eventually own/operate it.

brave slate
#

okk thank you

upper stream
#

Any time!