#parisholley - create source
1 messages ยท Page 1 of 1 (latest)
Why are you calling createSource with the Payment Element? If you use the integration guide, a payment method will be created for you
We may have spoke before ๐ Trying to work around use case where I have to have two customers and I want to collect bank info once
If I can generate two sources/tokens/payment methods using the same PaymentsElement, would be more intuitive to user than going through connection flow twice
collectFinancialConnectionsAccounts: A session must be tied to a customer, so I cannot save bank info across two accounts without user connecting twice
collectBankAccountForSetup: Automatically creates a payment method, which cannot be attached to more than one customer
recap: I need to have two customers, one for prepaid charges and another for saas (i don't want prepaid credits to cover saas fee, hence the two accounts)
event id (elements.create_source_with_element) from browser = 7df4732b-10bf-4963-b8c4-a6e4a00fa38e
event id (elements.fatal.uncaught_error) = 26b5c44a-ec2b-4c26-a8cd-04d6527bb41b
Ah ok yeah I remember this convo
To be honest I'm not sure off the top of my head. Do you have a request ID I can take a look at?
where would i find request id?
Find help and support for Stripe. Our support center 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.
no entry in log, this seems like a stripe.js error
if it helps, i'm debugging through the stripe.js code, it appears to be an error with communication with the iframe
{
"message": {
"action": "stripe-controller-action-request",
"payload": {
"nonce": "createSourceWithElement25026",
"actionName": "createSourceWithElement",
"request": {
"frameId": "__privateStripeFrame2507",
"elementName": "payment",
"type": "ach_debit",
"sourceData": {},
"mids": {
"guid": "bade3523-e547-4ac8-9fe4-91f91aa455394c66e4",
"muid": "229e99da-30f9-49c7-b4fb-655c15a2c960df3fa6",
"sid": "af54c02e-75b4-4b75-9112-50da490a7a06318637"
}
}
}
},
"type": "outer",
"frameId": "__privateStripeController2501",
"controllerId": "__privateStripeController2501"
}
here is the reply from post message
{
"message": {
"action": "stripe-controller-action-error",
"payload": {
"nonce": "createSourceWithElement25026",
"actionName": "createSourceWithElement",
"error": {}
}
},
"type": "inner",
"frameId": "__privateStripeController2501",
"controllerId": "__privateStripeController2501",
"__stripeJsV3": true
}
Can you send your Stripe.js code here for when you try to create a source like this?
As far as I know, the payment element can only be used to confirm payment intents and setup intents
const element = elements.getElement(PaymentElement);
await stripe.createSource(element, { type: 'ach_debit' });
(react)
Thanks, still checking in to if this is possible. Are you following a specific doc from us on this that says that PaymentElement can create sources?
Ah okay, that doc doesn't specify it but that call does not support the payment element
If you want the same bank account on two different accounts, you can create it with a setup intent and then copy it down to both of them
Or are you talking about making this the account that payouts go to on both accounts?
no, i need two "Customers" in same stripe account to use the same bank account
As a payment method?
yes
Checking if copying like that is possible...
Are you using Connect here? It is looking like this is currently not possible across Customers on the same account, but something like this might be possible on connect though I am still checking that out
no not using connect, i've seen that it is supported via connect though
but i'd assume that means connecting ourselves :p
think only solution is to use a service like Plaid which can generate bank tokens
If you are using the process from this guide, those tokens would be single use too unfortunately. https://stripe.com/docs/ach-deprecated#verifying
right, but Plaid can generate multiple tokens for same account
Taking a step back, can you talk about the need to separate the prepaid and saas fees here?
invoice credits apply to saas charge when on the same customer account
if someone pays 1K/m in subscription, and deposits 10K in ad credits, and then spends 8K the first month, i don't want to use the 2K in their balance to pay for subscription
stripe doesn't allow me to control when credit balance is applied
๐ stepping in here as Pompey had to step away
Can you summarize how I can help here?
don't think you can