#techbond_api

1 messages ¡ Page 1 of 1 (latest)

woven sparrowBOT
#

👋 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/1219370611164581960

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

vast cloakBOT
#

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.

vital python
#

Hello, can you tell me what specifically was undefined?

#

And are you following a specific doc of ours, or trying to run one of our samples, or something else?

tacit pond
#

Hi Pompey. Thank you for sending me a message

#

I am working on implementing Stripe payment system on my RN project

#

I am using stripe-react-native package

#

In details, I am working on adding a new payment method feature

#

That's why I am going to create a new PaymentIntent object for each payment

#

I am following this documentation, but after creating the payment intent, the value of clientSecret is undefined on my end

#

Could you please help me to resolve this issue?

vital python
#

Is clientsecret undefined on your server before you try to reply to your client? If so can you send me the ID of the payment intent that you are seeing this with? (pi_123)

tacit pond
#

`const fetchPaymentIntentClientSecret = async () => {
const response = await fetch(config.stripe.createPaymentIntentUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
currency: 'usd',
}),
});
const { clientSecret } = await response.json();

return clientSecret;

};`

#

This is codebase what I am using for creating paymentintent

#

I am doing in right way ?

#

I am new to stripe integration on ReactNative project

vital python
#

It looks like that is your client-side code. That looks fine but it depends on what your server side code does

#

I would recommend debugfing the endpoint that that createPaymentIntentUrl points to

#

To see that your server is correctly creating the payment intent and retrieving its client secret

#

It sounds like something is going wrong that is at least preventing that second part

tacit pond
#

Stripe does not support createPaymentIntentUrl?

#

I need to add this endpoint to my server?

vital python
#

Correct. That URL should point to your server, the server would make a call to Stripe to create the payment intent

tacit pond
#

got it

#

I will try with tat