#Naveed
1 messages · Page 1 of 1 (latest)
👋 how may I help?
@misty vortex please use this thread
for your subsequent messages
@misty vortex please move your message here
https://api.stripe.com/v1/ephemeral_keys
this api is working fine at postmen when I tried to call from my code it's returning an error
Error:
message
:
"Must provide exactly one of these parameters: [:customer, :issuing_card]."
request_log_url
:
"https://dashboard.stripe.com/test/logs/req_N8KKxS9aywMINY?t=1696594597"
type
:
"invalid_request_error"
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
lemme know if you are confused to anywhere?
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
myHeaders.append("Stripe-Version", "2023-08-16");
myHeaders.append("Authorization", "Bearer sk_test_51NqFvOEOIiSwB6cJFXvBtLbH0yZuGambZ9LZ2sCHgDD8GhZ9yfzPYONUJaKw1cwkUPLc7KZ3QtWPOkDBcmOd2pLm00VhQAdPTF");
var urlencoded = new URLSearchParams();
urlencoded.append("customer", "cus_OlNlWDfaNsmyTj");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: urlencoded,
redirect: 'follow'
};
fetch("https://api.stripe.com/v1/ephemeral_keys", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
this is the above request code
which is working fine on postmen but not works at the component
would you mind trying again?
at where??
in your code
why aren't you just using stripe-node SDK?
the because I only have access to react native project and backend is developed in php
that's why I am trying to integrate to be in react native side
so is there any way to create on the front end
actually, I need solution for that
you need to create them in your PHP code then
i dont have acces of the php code. this is the major issue
there's nothing we can do about it
is there any other way to integrate it at the front end I already spend two days on that,... Now I wanted to fix it asap.
unfortunately no
understood...
ok really appreciate your help. much thanks