#flo_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1260146581143949374
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
What do you mean ?
I would like to look at an example PaymentIntent to understand what's happening exactly
Ah ok, I don't have an example, I don't have implemented it yet.
I am asking this question before the implementation in order to see the potential impacts.
Sorry if I was not clear in my question, I will try to reformulate it ๐ :
As I say I am using this "payment flow" ( https://docs.stripe.com/payments/accept-a-payment-deferred?platform=android&type=payment#android-submit-payment).
The documentation says that I need to call my back-end so that it can create a payment intent with the Stripe API, and returns me a "client secret" (In the documentation it is : val response = myNetworkClient.createIntent)
The thing is, my backend cannot return a client secret (they can't change their current implementation), so in the createIntentCallback in the PaymentSheet I cannot return a CreateIntentResult.Success(response.clientSecret). But my backend can send me a boolean that indicate if the payment was successfull or not.
My question is, what are the impacts of not returning CreateIntentResult.Success(response.clientSecret) in the callback of the PaymentSheet, and manually hide the PaymentSheet and tell the user that the payment is successfull using the boolean send by my back-end
The PaymentIntent needs a Payment Method to succeed. You must send the PaymentIntent's client_secret to the frontend to be able to confirm it with the payment details collected there.
It's going to be difficult to implement any flow if you don't have control over your backend.
This might help - creating a Payment Method on the frontend first and then sending it to your backend, but you will still need a client secret to handle any next steps, e.g. 3DSecure: https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=android&type=payment
Yeah I know ...
So stripe do not recomand dismissing the PaymentSheet manually without a clientSecret ?
Well, not if you want your payment to complete.
Thanks for your answer, I will try to convince my backend to implement stripe in the right way
Happy to help. Yes, that would be the best approach.