#kelvin_webhooks
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/1406874238773891133
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello, let me take a look at this payment
👍
I seemed you confirmed the paymentIntent from your backend https://dashboard.stripe.com/test/logs/req_auVfiZut1uE8Cp, not frontend.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
yes
Paynow isn't supported in Stripe Android SDK yet, so you'll want o render the next_action.paynow_display_qr_code.hosted_instructions_url in your mobile app and instruct your customer to scan the qr code with their respective banking app
yeah, but this is for iOS tho, also next_action.paynow_display_qr_code.hosted_instructions_url we just place for reference on FE only. On FE (iOS), we call cofirmPaymentSheetPayment and intentCreationCallback to show the paynow webview from Stripe
Then you’ll need to use diffident code to handle iOS and android
problem came after intentCreationCallback finish, sometime awai confirmPaymentSheetPayment return response, and a lot of times it's doesn't
Anyway, for this particular payment, I don’t see you confirm it from front end. Is this the correct payment that we should discuss about?
yes, paynow & on ios
Do you have the id of the payment intent where you encountered the said problem?
let me create another one really quick
client_secret: pi_3RxLydEOhqD74pZ21tZqweSD_secret_yF6i7aZRa5vgp59nAl5uCSS8o
our workflow:
- FE: initPaymentSheet({customFlow: true, intentConfiguration})
- FE: presentPaymentSheet()
- FE: confirmPaymentSheetPayment()
- BE: PaymentIntent.create
- BE: PaymentIntent.confirm
- BE: response handleNextAction with paynow QR code image and timeout
- FE: intentCreationCallback
everything when well, booking confirm on our end, only confirmPaymentSheetPayment doesn't return response so FE cannot proceed to next screen
You don’t need to confirm the payment intent from backend if you already confirm it from front end
so, because the whole flow work for all other type of payment, is there anyway in BE i can know this is a paynow intent, and i can if/else that will not to confirm it?
https://stripe.dev/stripe-react-native/api-reference/types/PaymentSheet.IntentConfiguration.html You can get the paymentMethod from confirmHandler, and retrieve the paymentMethodType from it.
Did you get any error from the result of confirmPaymentSheetPayment ? https://stripe.dev/stripe-react-native/api-reference/types/ConfirmPaymentSheetPaymentResult.html
no, didn't receive anythong from confirmPaymentSheetPayment
from confirmHandler it return us unknown rather than paynow and it's for FE, meanwhile we need to if/else it in BE 🥹
Ok, did you call confirmPaymentSheetPayment with await? Can you share with me the code?
yes, i do call with async/ await, here it's
setLoading(true)
const confirmData = await confirmPaymentSheetPayment()
const {error: confirmError} = confirmData
//... log confirmError here
setLoading(false)
Did you see any errors in your react-native log? because I still don't see any confirmation request initiated from your react-native app
yeah , no error at all, and no log run after await confirmPaymentSheetPayment() also, it's like confirmPaymentSheetPayment never fulfill
can you put some log to confirm if confirmPaymentSheetPayment is called successfully?
yes i also did that, and confirm it runs because it show the paynow webview, technically it's something like this:
// log run here
const confirmData = await confirmPaymentSheetPayment()
// log here also but it doesn't run
Ok, so did you complete the payment in the test paynow webview?
yes, yes it did completed
Did you see a timer countdown after clicking on the "authorize payment" on the test page?
no i didn't, it close the webview asap i tap authorize test payment
Looks like you are using a very old version of Stripe-react-native SDK (i.e., 0.38.3), can you upgrade to the new version and try again?
yeah, which version you recommend? because we really strict in update version 🙁
I'll always recommend the latest version
is there any other ways i can work around this issue?
I'm unable to reproduce this problem. Can you share with me a sample reac-native project that I can run and replciate the issue?
last time we still okay using it, 1/5 confirmPaymentSheetPayment doesn't response, nowaday it's 4/5 doesn't
it requires some BE team effort to create a test probject for you, let me ask them. But if i remove PaymentIntent.confirm from backend, does confirmPaymentSheetPayment will have response ?
I can' reproudce the problem and I haven't found out the root cause yet. Can you test it out?