#hitesh1995_error

1 messages · Page 1 of 1 (latest)

ripe laurelBOT
#

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

📝 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.

bronze dust
magic dust
#

Hi @bronze dust

I am backend developer and working with Hitesh

Here is the rerefeence issue you can checkout.. We are doing exactly same thing which is described in this issue

https://github.com/stripe/stripe-ios/issues/4195

GitHub

Summary We are migrating from Basic Integration to new Payment Sheet, using iOS and backend with payment intents. We use Stripe connect where we save the payment methods on the main platform accoun...

bronze dust
#

I don't think that's relevant no, see the link I shared. Explains how to do direct charges with the iOS SDK which is what you're doing – where the payment method and payment exist on a connected account and you're using the API keys of the platform

magic dust
#

In this link it is describing that it is showing error in confirming intent.. We updated the version and that error is now fixed

But when we open payment sheet for the second time then we are getting error for no such payment method because of card list.. we are not using anything custom this error comes from the stripe SDK

bronze dust
#
  • acct_156QLzFbOwMhIcpi is the platform, you're using the API key from that account to initialise the Payment Sheet
  • pm_1QHk0tG8Thp5LtcOe8gic7X7 exists on acct_1JhBGBG8Thp5LtcO which is an account connected to acct_156QLzFbOwMhIcpi
  • That aligns with a direct charge Connect scenario, which the guide above explains how to do
magic dust
#

we are not using connect account while presenting payment sheet.. That's the case

bronze dust
#

Yes, exactly. And the pm_xxx object exists on the conncted account hence the error

#

Right now your integration is looking for that pm_xxx ID on acct_156QLzFbOwMhIcpi, and it doesn't exist

magic dust
#

But how we get that pm_xxx ? while presenting payment sheet ?

bronze dust
#

Read the guide, it explains how

magic dust
#

Could you please listen again.. You are not reading my messages you are only looking into the error message

as i said.. in IOS sdk when we are trying to show UI of stripe where user can choose or add new payment method.. It is throwing error for no such payment method.. What i mean is the user didn't choose the card as the UI does't load

So ios sdk it self retrieving payment method which does not exist in platform account

It is the SDK which is creating problem

bronze dust
#

I've read all your messages. Share your code where you initialise the Payment Sheet please

magic dust
#

Yes.. Thank you

Hitesh will share the code here

steady hearth
#

func presentPaymentSheet(from vc: UIViewController, amount: Int, currency: String) {
let intentConfig = PaymentSheet.IntentConfiguration(
mode: .payment(amount: amount, currency: currency, captureMethod: .manual)
) { [weak self] paymentMethod, shouldSavePaymentMethod, intentCreationCallback in
self?.handleConfirm(paymentMethod, shouldSavePaymentMethod, intentCreationCallback)
}

    var configuration = PaymentSheet.Configuration()
    if let ephemeralKeySecret {
        configuration.customer = .init(id: stripeCustomerCode, ephemeralKeySecret: ephemeralKeySecret)
    }
    configuration.returnURL = “AppName://stripe-redirect"
    configuration.merchantDisplayName = AppName
    configuration.applePay = .init(merchantId: appleMerchantID, merchantCountryCode: countryCode)
    configuration.allowsDelayedPaymentMethods = true
    
    let paymentSheet = PaymentSheet(intentConfiguration: intentConfig, configuration: configuration)
    
    paymentSheet.present(from: vc) { result in
        switch result {
        case .completed:
            // Payment completed - show a confirmation screen.
            print("paymentSheet result: completed")
        case .failed(let error):
            print(error)
            // PaymentSheet encountered an unrecoverable error. You can display the error to the user, log it, etc.
            print("paymentSheet result: Error", error)
        case .canceled:
            // Customer canceled - you should probably do nothing.
        }
    }

}

bronze dust
#

It's probably because of the configuration.customer value. What's an example cus_xxx that you pass there?

steady hearth
#

cus_RA45wSEfDjb60K

bronze dust
#

OK, what about an ephemeralKeySecret?

steady hearth
#

ek_test_YWNjdF8xNTZRTHpGYk93TWhJY3BpLFpFUDRLTHMzY0VxQkQ2RGpoY0JZOUhWaWxMWkU5ZVY_000Icyaivp

bronze dust
#

Hmmm, can you share the API request you use to make that? req_xxx ID

steady hearth
#

req_VZf6RZFua5Ytxp is the one related to our issue

bronze dust
#

To confirm you've updated to 24.0.0 of the iOS SDK?

steady hearth
#

yes it is

bronze dust
#

OK, then I'd recommend you file an issue on the iOS SDK repo, or comment on the existing repo you shared. Something does indeed seem non-functional here as it's not clear where that pm_xxx ID is being pulled from

Or you can write in to my team and we can take a deeper look and raise this internally: https://support.stripe.com/contact/email?topic=api_integration

steady hearth
#

What is the response time we should expect to get answered on the raised issue?