#zero0000

1 messages · Page 1 of 1 (latest)

wild turtleBOT
sudden jolt
#

What problem are you facing?

kindred hinge
#

Hi, right now iam trying to do a proof, and is failing, and also i must integrate after stripe in my checkout, appear in the api intent but not generate the charge

sudden jolt
#

What is failing? Do you have the error details?

kindred hinge
#

I dont know if i must configurate something more in my stripe account, iam in mode test

#

The response is failing not is generating the charge i think if (error) {
console.log('[error]', error);
} else {
const response = await fetch('/API/serverstripe', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
payment_method: paymentMethod.id,
amount: 1000, // Monto a cobrar en centavos
currency: 'usd', // Moneda
}),
});

 const data = await response.text();

 if (data.success) {
   console.log('Payment succeeded');
 } else {
   console.log('Payment failed');
 }

}
};
, the response is giving a fail

sudden jolt
#

I don't see Stripe code here. The code here are simply the request made by your client to your own server

kindred hinge
sudden jolt
#

There is no error with Stripe since all the response returned are 200 (successful)

#

The error is likely thrown from your own server

#

I'd recommend adding logs to your server and check why the error is thrown

kindred hinge
#

Do yo have some page to add stripe logs, in the code to know what is happening, or i want to ask if maybe can be a configuration in the dashboard of stripe, i want to generate a charge of test

sudden jolt
#

https://dashboard.stripe.com/logs is all log history with Stripe from your system. If the error logs can't be found here, the issue is likely within your own system.

The logs should be added in your system, not with Stripe as we do not how your system works.

kindred hinge
#

Iam doing well the proof in my code to generate charge like this, in all the proofs iam pass the api send but not generate a charge, iam in test mode because the page still not have the ssl

sudden jolt
#

In any case, we'd need the error message and its details to understand what is the cause of the failure

#

Payment failed doesn't help as the error was thrown from your server, not Stripe

wild turtleBOT