Closed omaSpencer closed 5 months ago
+1, this is only happening with Paypal right now.
I am facing this issue for iDeal & Paypal. On test environments, payments were working fine. On production environment I am facing this issue.
I have the same issue. In development mode, the integration works fine. However, when switching to the live mode, I face the issue.
@iranaahsanali I was able to get it working. After connecting PayPal as a payment method to your Stripe account, it is mandatory to configure recurring payments for it. The following link explains how to do that. You typically get feedback within 5 days. I got feedback, and everything is working fine now.
@dtn1999 Thanks for detailed steps, I did the same thing and everything worked for me as well.
I am facing the same issue when trying to confirm a SetupIntent with the PayPal payment method. The problem occurs in both the test and production environments, even though I have enabled PayPal recurring payments.
Here's the code snippets I am using:
server side:
const paymentIntent = await stripe.setupIntents.create({
usage: "off_session",
payment_method_types: ["paypal"],
payment_method_data: {
type: "paypal",
},
customer: "cus_P8h2aYiovSpx4Y",
confirm: true,
return_url: "https://yourdomain.com/return-url",
mandate_data: {
customer_acceptance: {
type: "online",
online: {
ip_address: ipAddress,
user_agent: userAgent,
},
},
},
});
client side:
await confirmSetupIntent(clientSecret,
{
paymentMethodType: "PayPal",
},
{
setupFutureUsage: "OffSession",
}
);
I am consistently getting the following error message:
{"code": "Failed", "declineCode": null, "localizedMessage": "There was an unexpected error -- try again in a few seconds", "message": "To confirm the SetupIntent with the PayPal payment method type, you need to provide a 'return_url' address.", "stripeErrorCode": "", "type": "invalid_request_error"}
Additional Information Stripe API Version: 16.6.0 React Native SDK Version: ^0.38.3 Environment: Both Test and Production
Describe the bug I created a SetupIntent on the server side for off-session usage with the PayPal payment method and encountered an error when attempting to confirm the intent. My goal is to collect customer details from PayPal (payer_id, payer_email) similar to the confirmPlatformPaySetupIntent.
To Reproduce server side:
client side:
I encountered an error while attempting to confirm the SetupIntent:
{"code": "Failed", "declineCode": null, "localizedMessage": "There was an unexpected error -- try again in a few seconds", "message": "To confirm the SetupIntent with the PayPal payment method type, you need to provide a 'return_url' address.", "stripeErrorCode": "", "type": "invalid_request_error"}
Expected behavior I want to confirm the SetupIntent and retrieve customer PayPal details for future use as a PaymentMethod.
Smartphone (please complete the following information):
Additional context This is simply a mock app for a proof of concept, hence the use of 'any' in various places.