#kelvin_unexpected

1 messages · Page 1 of 1 (latest)

keen dewBOT
#

👋 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/1377526048673239081

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

mild talon
#

Hi there, can you share with us the stacktrace?

sleek ocean
#

hi Jack, i run it with xcode.workspace, look like the problem coming from here

mild talon
sleek ocean
#

yes, if i pass returnURL to handleNextAction, it will error like this

#

my code:

const returnUrl = 'sample://checkout/bookingId'
        const nextActionResponse = await handleNextAction(
          paymentData?.piTransactionId,
          returnUrl,
        )
mild talon
#

You should pass returnURL to initPaymentSheet. Did you get a chance to review the doc that I shared earlier?

sleek ocean
#

my paymentSheet setup:

      await initPaymentSheet({
        merchantDisplayName: 'Company',
        appearance: customAppearance,
        customerId,
        primaryButtonLabel: payLabel,
        allowsDelayedPaymentMethods: true,
        returnURL: returnUrl,
        customFlow: true,
        defaultBillingDetails: {
          address: {
            country: getCountry() ?? 'SG',
          },
        },
        intentConfiguration: {
          mode: {
            amount: price * 100,
            currencyCode: currentCurrencyId ?? FALLBACK_CURRENCY,
            captureMethod: PaymentSheet.CaptureMethod.Manual,
          },
          confirmHandler: confirmHandler,
        },
      })
#

is that customFlow: true affect?

mild talon
#

Hmm, can you try with customFlow: false?

sleek ocean
#

yeah, let me

#

same Jack

mild talon
#

Can you share with me the PaymentIntent ID?

sleek ocean
#

transactionId i got from my BE team pi_temp_f6ff89a4ca0b423d9ec78dbcec7469c4_secret

#

payment method id: pm_1RU01kEOhqD74pZ2p02fRgPC

#

payment intent id: pi_3RU01lEOhqD74pZ20V4NftBt_secret_huXe1bff0naZeEvyskOCs1mSD

mild talon
#

Let me check the paymentIntent. one sec

#

OK, looks like your backend created and confirmed the paymentIntent.

#

Instead, you should confirm the paymentIntent at the client side. can you ask your BE to not confirm the PaymentIntent ?