#mudassir.dev
1 messages · Page 1 of 1 (latest)
Hi there 👋 can you tell me more about what you're experiencing? Are you referring to client secrets (secret keys are something different)?
customer: user["stripeCustomerId"],
payment_method_types: ["card"],
});
const clientSecret = setupIntent.client_secret;
// create ephermal key
const ephemeralKey = await stripe.ephemeralKeys.create(
{ customer: user["stripeCustomerId"] },
{ apiVersion: "2020-03-02" }
);
res.status(200).json({
status: true,
setupIntent: true,
clientSecret,
ephemeralKey: ephemeralKey.secret,
customer: user["stripeCustomerId"],
});```
This is my code
and this is the response I get
When I initilize the payment sheet I get an error saying key format is incorrect. And previously when I was working with setupintents the key didn't start with pi
so I think that's the issue but I can't figure out what's causing it
Can you share the ID of a request where you're seeing that? The code you have written should definitely create a Setup Intent. Are you sure you're hitting the right endpoint on your end?
Can you elaborate more on what ID
And yes I am sure
This is the error I get when I initialize onResponse: Payment Failed java.lang.IllegalArgumentException: Invalid Setup Intent client secret: pi_3NTmTNJDsF3FhY2a1LfW6aD1_secret_vQLG8FT56sAOT67LEnFjnfEut
This article walks through finding the ID of your requests:
https://support.stripe.com/questions/finding-the-id-for-an-api-request
If that is the response you're getting, then the endpoint you're calling from Postman is hitting an endpoint that is creating a Payment Intent.