#txx_developer
1 messages · Page 1 of 1 (latest)
👋 happy to help
I've read the documentation but can't figure out how to implement and test. On this link https://stripe.com/docs/payments/accept-a-payment use the session for example. But for Paypal am I obliged or can I safely use PaymentIntent?
on that same page you have multiple integrations
the one you need is https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
Ah ok, following this guide with cards it works correctly for me, but with paypal no: No such PaymentMethod: 'paypal'
did you follow the Get Started portion of the doc I sent you first?
Yes, in Test Mode i have turn on the paypal...
Do I also have to enable it to run the tests?
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
Thank you
Could you please share the Request ID req_xxx? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Where you see the error.
Yes: req_XR1q9fSQmqtP3n
I see. payment_method parameter is used to add an ID of a specific saved Payment Method: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method
Instead, if you want to specify payment method types that you want to give your customer to choose from you will need payment_method_types: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_types
However, I see you are using automatic_payment_methods already, that allows Stripe to choose the most appropriate payment method types for this PaymentIntent.
Is PayPal not showing on your page?
If it's enabled, you should see it when you use automatic_payment_methods
Oh ok thanks! Currently I'm only working with the server part I don't have the front end part... But if I want to test a card payment I can use .setPaymentMethod("pm_card_visa"). But if I want to test paypal is there a way?
You will need to have a frontend to test other payment method types.
Ok thank you. By enabling .setAutomaticPaymentMethods will I also need to specify a return url?
It's good to have it in case some PM types redirect the customer elsewhere to complete the payment.
If you don't provide it some Payment Method types might be unavailable.
Ok. thanks a lot
Happy to help!