#Jad_B

1 messages · Page 1 of 1 (latest)

hollow pathBOT
smoky grotto
#

Hi there

#

So looks like you are trying to add PlatformPay to your React Native app, correct?

silent narwhal
#

Hi, it is correct

#

The documentation is clear for me but regarding the client side, but for server side, since I am not used to back end I don't how to set up a correct endpoint. const fetchPaymentIntentClientSecret = async () => {
// Fetch payment intent created on the server, see above
const response = await fetch(${API_URL}/create-payment-intent, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
currency: 'usd',
}),
});
const { clientSecret } = await response.json();

return clientSecret;

};

#

Here I don't know what should be API_URL

smoky grotto
#

Yeah so have you set up a server yet?

silent narwhal
#

I have set up firebase cloud function as back end

#

so I can use node.js

#

at runtime