#a.r.1
1 messages ยท Page 1 of 1 (latest)
Yeah I can't find a request with that ID either
Can you share the request id for creating your session on the backend? Also would help to see client side and server side code snippets for this
Request id: req_kaUcaK4tiBei3T
I can get backend code later, but it works outside of SDK (Frontend is using the same endpoint to create a session)
Talking about iOS, I'm just creating sheet with secret I received from BE.
FinancialConnectionsSheet(financialConnectionsSessionClientSecret: secret)
Got it so the backend is already working with web code?
Then can you share more of your ios code
I have just one single import : import StripeFinancialConnections, not sure if it could matters
import StripeFinancialConnections
import XYZFoundation
class XYZFinancialConnectionsSheet {
static func presentSheet(with secret: String) {
let sheet = FinancialConnectionsSheet(financialConnectionsSessionClientSecret: secret)
if let controller = controllerStackBehavior.topViewController {
sheet.present(from: controller) { result in
print(result)
}
}
}
}
All code I use to present sheet. Secret is clientSecret from created session.
Can you share the part where you actually call your backend?
And how the secret variable is set
let clientSecret = try await viewModel.createFinancialConnectionSession()
if let clientSecret {
WTFinancialConnectionsSheet.presentSheet(with: clientSecret)
}
viewModel.createFinancialConnectionSession is just a simple graphql mutation with just single field in response - secret.
I debugged this, I see secret received and format is correct.
This is how session is created on BE:
params := &stripe.FinancialConnectionsSessionParams{
AccountHolder: &stripe.FinancialConnectionsSessionAccountHolderParams{
Type: stripe.String(
string(stripe.FinancialConnectionsSessionAccountHolderTypeAccount)),
Account: stripe.String(accountID),
},
Filters: &stripe.FinancialConnectionsSessionFiltersParams{
Countries: []*string{stripe.String(models.CountryUS)},
},
Permissions: []*string{
stripe.String(string(stripe.FinancialConnectionsSessionPermissionPaymentMethod)),
stripe.String(string(stripe.FinancialConnectionsSessionPermissionBalances)),
},
}
Account params:
params := &stripe.AccountParams{
// set account type to be custom
Type: stripe.String(string(stripe.AccountTypeCustom)),
// set payout schedule to daily, it can also be configured in dashboard
Settings: &stripe.AccountSettingsParams{
Payouts: &stripe.AccountSettingsPayoutsParams{
DebitNegativeBalances: stripe.Bool(true),
Schedule: &stripe.AccountSettingsPayoutsScheduleParams{
Interval: stripe.String(
string(stripe.AccountSettingsPayoutsScheduleIntervalDaily)),
},
},
},
// set capabilities
Capabilities: &stripe.AccountCapabilitiesParams{
CardPayments: &stripe.AccountCapabilitiesCardPaymentsParams{
Requested: stripe.Bool(true),
},
Transfers: &stripe.AccountCapabilitiesTransfersParams{
Requested: stripe.Bool(true),
},
TaxReportingUS1099K: &stripe.
AccountCapabilitiesTaxReportingUS1099KParams{
Requested: stripe.Bool(true),
},
},
}
I was thinking maybe I missed some of spm packages, but now I'm importing this list and still getting error.
Ok I gotcha. And to confirm the backend code already works with your web integration?
yes
Ok but can you check if there's an extra white space character anywhere
This is a very common way this error presents itself
So I would be extremely sure on this
I don't see any spaces or something
I see apiClient.stripeAccount is nil here, not sure if it could be related.
I don't see anything wrong with key format
As long as you log it on the server and it matches
init in HostController
should I see anything in logs for this presenting error at all? I guess I don't see anything related to financial connections apart from creating session on BE
any chance this secret was badly configured/ missing permissions?
No I think it's a client side issue. Have you tried re-running the request to get a new client secret
Likely you'll get same error
Yes, tried this, same error
Getting a colleague with more ios knowledge to look
I think it's a client side issue. What version of the stripe ios sdk are you using
Any chance it is something related to beta state of the Sdk?
Hi ๐
I'm stepping in as @dawn hound needs to go soon. To be clear, I AM NOT the iOS expert ๐
What SDK are you referring to?
23.13.0
When you say the beta state?
I guess Financial Connections iOS SDK is in beta?
Got it, that could be at play here.
There is a lot of back and forth here so can you please summarize what flow you are trying to do and exactly where the breakdown is?
Mostly what I said in initial message
I'm trying to use Financial Connection iOS SDK to update account we have on file in the app. After receiving client key from backend, I receive a following error when try to present FinancialConnectionsSheet. Error is : This is not a valid Financial Connections Session client_secret.
USing this manual: https://stripe.com/docs/financial-connections/other-data-powered-products?platform=ios#setup
Okay let's break that down further
- you want to update an existing
us_bank_accountpayment method for a Customer? - Are you collecting new bank information?
- Do you want to create a new
us_bank_accountPayment Method?
- correct
- no, I guess this is what this sheet from SDK should do for me
- not right now, but this option is good to have
- So yes, you are collecting new Account and Routing numbers using the FinancialConnectionSheet?
I got an error, so I don't collect anything
The whole conversation is about this issue, I would be happy to use this sheet, but I cannot
I know you just had this conversation but I'm helping multiple people in parallel so it helps if I can get a quick summary.
Can you share an example client_secret ?
fcsess_client_secret_6ZA1zzhQTtBun022sHhdifgW
Okay I think there is some account confusion occurring here.
Your requests to create Financial Account sessions are being made by acct_18PEHfHnen00B3RT
https://dashboard.stripe.com/test/logs/req_kaUcaK4tiBei3T
But the requests coming from your iOS app are for acct_1AuRvhCKg9WpKK5Y
how is it possible? are you sure you checking matching session and request?
These are the requests I am seeing. Can you take the time to verify that both the Secret Key in your back-end and the Publishable Key in your front-end match those for one specific Stripe Account?
If it could help, I use Payment Sheet in my app for customer purchases and don't have any problems there.
Still not sure how could it be different account, if I just use secret key I received from backend? I don't use any other authorization besides secret key and Publishable Key. Checking backend for matching, will keep you posted.
Is it possible that the code you used to create the Financial Connection Session is using a different Secret Key (which would make requests on a different account)?
I'll double check the code to create the Financial Connection Session on backend and come back to you
Great, thanks for looking into it
Ok, I got secret key from BE and publishable key from IOS, they are obviously different, but how can I check if it is affecting my use case?
Well the Secret Key and Publishable Keys should be different, they are different keys. What matters here is whether both keys correspond to the same Stripe Account