#Gyan

1 messages · Page 1 of 1 (latest)

worthy reefBOT
remote wagon
#

Are you expecting to get that from present payment sheet, or what do you get?

#

YOu should be able to get these details from the Payment Intent by expanding the payment_method

#

Can you share more detail about what you're trying to do and what's not working like you expect?

jovial pier
#

okay i see

#

i was expecting PresentPaymentSheet() to return some response after a successful payment. but i am just getting this:

{"paymentOption": undefined}

#

Is it not possible to know from here?

remote wagon
#

paymentOption is only returned when customFlow is set true. Otherwise it is expected to be undefined, and fetching the payment method details from your server will be the way to go.

jovial pier
#

okay, where can i pass customFlow ?

#

inside initPaymentSheet() ?

remote wagon
#

I don't think you want to switch to that unless its appropriate for your integration, instead id suggested retrieving the payment intent with the payment details from your own backend

#

But yes I believe thats where that would be configured

jovial pier
#

okay, so do you mean to make another API call after successful payment to know the payment details using the payment_intent?

remote wagon
#

Yes, thats right, or if you store certain details from webhook events you might be able to retrieve from your own systems

jovial pier
#

webhook events is something that comes up at a later phase, i need to show a receipt to the customer immediately after the payment with the payment_method used on the PaymentSheet UI by the customer.

remote wagon
#

Ok, then yes you should retrieve that from the API