#iOS-dev-payment-method
1 messages · Page 1 of 1 (latest)
Hello!!
Are you following a specific set of docs?
yes
It sounds like you aren't passing the client secret from your server to your client and then using that to confirm the PaymentIntent client-side.
I am sending paymentMethodID which i got after adding the card details to server and intentID which i got from my backed
Ah so you are just collecting payment method details client side but trying to complete the payment on your server?
Can you show me how you are creating your PaymentIntent server-side?
Recommend editing the above and removing your test API key
This is a public server so you should not share anything sensitive!
And can you provide the docs you are following for your integration?
Ah okay actually I see
So when you create the PaymentIntent, you aren't actually passing the PaymentMethod nor are you passing confirm: true
So in that server-side request you want to pass the PaymentMethod ID here: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method and set confirm: true here: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm
should I (means from iOS swift front end) or backend developer need to "confirm: true"
Backend
Everything looks fine on the frontend as long as you are passing the PaymentMethod ID to the backend
okay, thank you so much for your help