#flo_best-practices

1 messages ยท Page 1 of 1 (latest)

silent mortarBOT
#

๐Ÿ‘‹ 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.

safe warren
#

Hi, let me help you with this.

#

Could you please share the PaymentIntent ID pi_xxx?

heavy bane
#

What do you mean ?

safe warren
#

I would like to look at an example PaymentIntent to understand what's happening exactly

heavy bane
#

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

Build an integration where you can render the Payment Element prior to creating a PaymentIntent or SetupIntent.

safe warren
#

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.

heavy bane
#

Yeah I know ...
So stripe do not recomand dismissing the PaymentSheet manually without a clientSecret ?

safe warren
#

Well, not if you want your payment to complete.

heavy bane
#

Thanks for your answer, I will try to convince my backend to implement stripe in the right way

safe warren
#

Happy to help. Yes, that would be the best approach.

silent mortarBOT