#hitesh1995_error
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/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.
- hitesh1995_code, 2 hours ago, 18 messages
- hitesh1995_error, 23 hours ago, 39 messages
- hitesh1995_api, 6 days ago, 11 messages
The payment method you're trying to pay with (pm_1QHk0tG8Thp5LtcOe8gic7X7) exists on a different account to the account you're initialising the Payment Sheet with. I'd guess this is a Connect integration? If that is the case, you're likely not passing the stripeAccount param: https://docs.stripe.com/connect/direct-charges?platform=ios#integrate-payment-sheet
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
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...
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
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
acct_156QLzFbOwMhIcpiis the platform, you're using the API key from that account to initialise the Payment Sheetpm_1QHk0tG8Thp5LtcOe8gic7X7exists onacct_1JhBGBG8Thp5LtcOwhich is an account connected toacct_156QLzFbOwMhIcpi- That aligns with a direct charge Connect scenario, which the guide above explains how to do
we are not using connect account while presenting payment sheet.. That's the case
Yes, exactly. And the pm_xxx object exists on the conncted account hence the error
You can't just use the platform keys and access objects on the connected account, you also need to pass the Stripe-Account header. See: https://docs.stripe.com/connect/authentication
Right now your integration is looking for that pm_xxx ID on acct_156QLzFbOwMhIcpi, and it doesn't exist
But how we get that pm_xxx ? while presenting payment sheet ?
I already showed you how
Read the guide, it explains how
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
I've read all your messages. Share your code where you initialise the Payment Sheet please
Yes.. Thank you
Hitesh will share the code here
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.
}
}
}
It's probably because of the configuration.customer value. What's an example cus_xxx that you pass there?
cus_RA45wSEfDjb60K
OK, what about an ephemeralKeySecret?
ek_test_YWNjdF8xNTZRTHpGYk93TWhJY3BpLFpFUDRLTHMzY0VxQkQ2RGpoY0JZOUhWaWxMWkU5ZVY_000Icyaivp
Hmmm, can you share the API request you use to make that? req_xxx ID
req_VZf6RZFua5Ytxp is the one related to our issue
To confirm you've updated to 24.0.0 of the iOS SDK?
yes it is
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
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
What is the response time we should expect to get answered on the raised issue?