#robin_best-practices
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1232285817112629310
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- robin_code, 1 day ago, 12 messages
- robin_code, 1 day ago, 19 messages
- robin_best-practices, 3 days ago, 20 messages
- robin_best-practices, 3 days ago, 7 messages
hi! sounds good, what's your question, what difficulty are you running into?
Since I lack knowledge of iOS, how can I generate the payment method ID? On the backend, I receive the payment method within the payment intent and confirm the payment
I'm not sure I understand. You can't do this without knowledge of iOS. The PaymentIntent is passed to the frontend (the iOS app) and is confirmed there to process the payment.
see right now i am doing like this accepting the payment_method from the request
could please guide me
yes. Generally it's recommended to not do that, and instead confirm the PaymentIntent on the frontend, so that actions like 3D Secure can be handled there. That's what the guide you linked in your question does.
if you want to do it that way though, https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=ios is the approach
So, you're saying that everything is handled on the frontend, like confirming the payment within the iOS app?
yes
then what should do on the backend ?
create the PaymentIntent and return it to the frontend. See the guide you linked in your question.
Do you mean to say that this code isn't necessary?
I'm not really saying that no. I'm explaining that the approach that code uses of creating-and-confirming the PaymentIntent on the backend is usually not recommended and the recommended approach is to confirm on the frontend.
If you do want to use that approach though, see https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=ios for docs on how to do it.
okay thanks
Also, could you provide one more piece of information regarding the setup of Apple Pay and PayPal with Stripe?
what's your exact question?
Is it correct to say that Apple Pay and PayPal are payment methods provided by Stripe?
yes
By default, the card approach is used in Stripe for payments. I want to integrate these two additional methods, Apple Pay and PayPal, alongside the card option.
sounds good, you'll find all the information in the docs really, have you run into some specific difficulty?
Could you please verify the screenshot to confirm that Apple Pay is activated in the account? https://prnt.sc/vwzTOXcK285k
I can't tell from just a screenshot of that page no
https://docs.stripe.com/payments/accept-a-payment?platform=ios&mobile-ui=payment-element#ios-apple-pay are the instructions. Did you follow those?
Yes, I have experience working with PayPal; it's connected to the Stripe Connect service. What's the best method to set it up?
Yes, that's correct. Right now, I'm following this process.
have you already enabled it on your Stripe account and connected Paypal account to your Stripe account?
so is there a specific problem you're seeing?
The PayPal option is not appearing in the payment method section. Please see the screenshot: https://prnt.sc/oExTyPmBe0lU. How can I enable it?
probably a question for our support team at https://support.stripe.com/?contact=true
I can't really help with just screenshots, they would have access to your account and you could explain more of the context
Is it not supported in the US? See the screenshot: https://prnt.sc/0z1VrHteHsqg
no it's not supported in the US
okay thank you
Could you please let me know one last thing? I'm following this approach. Should I do the same with the subscription as well?
hi! I'm taking over this thread.
for Subscription to flow is similar:
- create the Subscription on the backend
- retrieve the PaymentIntent created by the Subsciption
- then use the PaymentIntent client secret on the frontend to collect the payment details
So what should i get from the client side?
what do you mean?
like for one-time payment everything is done on the ios app right ?
what do you mean by "everything"?
like payment acceptance on the frontend (fill the amount with the card details)
Again, a PaymentIntent is created on iOS for the subscription. Should I then use that intent ID in the subscription, or is there another scenario?
I'm confused by your questions, sorry.
For one time payment: create the PaymentIntent on the backend, then use the PaymentSheet on your iOS device using the PaymentIntent client secret.
For subscriptions: create a Subscription on the backend, retrieve the PaymentIntent created by the Subscription, then use the PaymentSheet on your iOS device using the PaymentIntent client secret.
I've already integrated Stripe payments in React with a Python backend. In this setup, I create the payment method on the frontend and then use that payment method ID to create the payment intent on the backend to confirm the payment. Right now, I'm a bit confused about how to proceed with iOS.
as mentionned previously:
Generally it's recommended to not do that, and instead confirm the PaymentIntent on the frontend, so that actions like 3D Secure can be handled there.
if you want to do it that way though, https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=ios is the approach
To create the PaymentIntent on the backend, I need the payment method ID, correct?
absolutely not. the recommend way to implement Stripe:
- Start by creating the PaymentIntent on the backend (no payment method needed)
- Use the PaymentSheet on your iOS device with the client secret of the PaymentIntent to collect the payment method
- Confirm the PaymentIntent on the frontend
and that's it. this is covered in details here:
see the screenshot
I recommend reading the link I shared above in details
yes the request you shared doesn't make any sense. please start by reading the doc I shared above.
okay