#mike_docs
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/1383068623043690578
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
yes! how are you acceping payments? Checkout Session, Payment Element, something else?
we create payment_intents with setup_intents before and we use payment elements
then set application_fee when you create the PaymentIntent, and it will apply regardless of the payment method used.
good to know. can you redirect me to the right docs source how we can allow our sellers to create bank account (with iban, swift, etc.) similar to how they create card payment_method?
how we can allow our sellers to create bank account (with iban, swift, etc.) similar to how they create card payment_method
Can you say a bit more about this so i can help point in the right direction?
(stepping in for soma who needs to step away)
Well we have UI to create card (setupIntent) and store the result in our database so the users can choose among their cards created. Now we would like the connected_account to create same/similar way the bank account on stripe and we receive payment_method_id and store the bank details in our database as well. Next we can display bank details to the customer if they decide to buy the product via bank transfer. does it make sense?
Part of what you're describing are actually about two different payment methods: bank debits and bank transfers. Are you trying to collect bank account info from customers to debit them from your side, or give customer bank account info for them to transfer to, or both?
Both is totally fine, but i want to clarify what you're asking since these are pretty different from one another
๐ค maybe we would need dig deeper in the docs...? the idea was about creating payment_intent (after the order was created) with allowed payment methods: card only or card+bank. In case the bank is allowed to be used for this purchase (not all orders are allowed to do so) there should be opened new page with bank details for the customer so they know where to send the money to (I suppose these are bank account created in stripe domain). Once the payment comes to the stripe bank account (from the customer bank account via wire transfer) we should receive webhook to release the order. To give more context: we use STANDARD connected accounts and direct charges.
Ok, what you're describing is what we call "bank transfers" that lets customer push funds to an account created for them. You can read about that here: https://docs.stripe.com/payments/bank-transfers/accept-a-payment?invoices=without
This requires you to make some integration changes to provide required values for initializing that bank account & payment, as explained in the doc (same as the one you linked)
Notably, with bank transfers, there is no payment method object. Instead there is a cash balance on the customer for reconciling against payments.
I am a little bit confused by the sentence: "The first time you accept a bank transfer payment from a customer, Stripe generates a virtual bank account for them, which you can then share with them directly."
I expected the virtual bank account will be created not for the customer but for the vendor... ๐ค
This is in contrast with bank debits which do create a payment method object, and work more or less out of the box once you enable bank debit payment methods in your settings.
( https://docs.stripe.com/payments/ach-direct-debit for example, for US bank accounts, but other countries are also supported)
Good question!
Who is the "vendor" in your model?
the connected account?
we are b2b and b2c marketplace platform. Customer is customer ๐ vendor = connected_account. the platform currently stores the customers' payment_methods and clone them for every purchase of the customer from the vendor.
we (the platform) should receive our part (application_fee) from every transaction regardless it is via card or bank transfer - that is the whole idea
So for bank transfers, a virtual bank account number (VBAN) is created per customer, per account, so that funds are correctly attributable to that specific customer & account.
(There's also a factor of the country you pick if in the EU, but for this clarification we can mostly ignore that)
we want to be world-wide one day but we are going to start with EU (vendors).
When you create a payment with bank transfers for a given customer on a given connected account, we look for an existing VBAN for that combination or create a new one. Then when the customer transfers funds to that VBAN we can isolate it for them on that specific account.
so "when" the VBAN is created? I thought vendor will create their account (now it looks like it's not that way) and publish the bank info (iban, swift) so the customers can pay to it... ๐คทโโ๏ธ
If you're using direct charges, the VBANs for the same real-world customer (a single person) will be different for each of your connected accounts, so its important to be aware of this if your customer pay multiple vendors, to ensure they send funds to the correct VBAN
Its created when you first create a payment intent or invoice for the customer
good to know
Or you can explicitly pull the "funding instructions" for a customer, even before creating any payments
So you can give customers bank details to use before you have anything to charge them for, if needed
So the customer can transfer funds, which accrue in their cash balance, which you can then reconcile against payments you create
So the VBAN is always unique for VENDOR+CUSTOMER, right?
how long will it last? forever?
or is it discarded after successful payment like virtual cards in Revolut?
It is persisted / re-used, and yes unique/specific to the connected account x customer (and country, as I mentioned)
I'm not aware of any kind of limit on account life or disabling/recycling etc.
As far as i know, it is for that customer forever.
with cards (setup_intent stored in our "platfrom" account) we have to clone them to every payment_intent. is it same with VBANs? we create them in our platform account and clone them for every payment_intent?
No, not the same for VBAN -- since there is no customer information collected there is nothing to share (and there is no payment method object to share anyways).
You can just initialize the VBANs for connected account customers as needed for payments
then tell the customer to use those details (funding instructions) for that vendor/connected account
on which object will the VBAN stored and in which account platform=ours or connected?
Confirmed VBANs don't expire and aren't re-used
how can we access the information anytime the customer asks for the details for a specific payment_intent (even later)?
It's part of the customer, which is why the funding instruction API is under the customer specific path: https://docs.stripe.com/payments/customer-balance/funding-instructions#create-funding-instructions
https://api.stripe.com/v1/customers/cus_123456/funding_instructions
and since the direct charge customer is on each connected account, so is the VBAN
if you have a platform concept of a customer, you'll want to keep track of the mapping from platform to each related connected accont customer, in order to show them the right VBAN per connected account
we store the Customers only in our (platform) account and for every purchase we clone the card (with customer_id in it) and so in the connected_account there are transactions with a Guest customer. To my understanding the customers in the connected_accounts are not created the same way as they are in the platform. They are created via those transactions. Can you please say it simply (we'll read docs for more details of course) what will be the api flow?
So you don't currently create customer objects on the connected accounts and attach the shared card there to persist it? You clone again for each payment and pay without a customer on the connected account?
Assuming I understood correctly, you will need to adjust things a bit for bank transfers, since they do require an actual customer object.
To my understanding the customers in the connected_accounts are not created the same way as they are in the platform.
I'm not sure what you mean by "the same way" here, can you elaborate?
yes, this was suggested by the support. clone for every purchase
That's perfectly fine for cards, but won't work for what you've described for bank transfers. You'll need the actual customer object to be created on each connected account in order to get the VBAN
so if you have some customer A on your platform, and connected accounts C1 and C2, you need to create customers A1 and A2 on each connected account, respectively
so we cannot use the guest customer for that?
then keep track of your link from A to A1 and A2
no
then you'd have VBAN1 and VBAN2, both for customer A, but tied to each connected account/vendor via customers A1 and A2
ok, so we can keep the card implementation as it is and for the VBANs we need to clone (create/copy whatever) the customer to each connected_account before creating the payment_intent. am I correct?
When customer A sends money to VBAN1 it lands in the cash balance for A1 on C1, if they send money to VBAN2 is lands in the cash balance for A2 on C2, etc
that's crystal clear for now
Yes, you'll need to replicate at least some customer info, like email & name, to a new customer object directly on each connected account you want them to be able to pay with bank transfer
that's doable but I see one issue here. If you say we have to clone the customer to the connected_account to have the VBAN we cannot allow card or bank for the payment_intent as we clone the payment_method with customer_id (stored in our platfrom account). would it work? if the customer_id on the payment_intent (for the VBAN) will be different from the customer_id used in the cloned payment_method for the card? Will not happen the error we've met before: this payment_method has been associated with another customer...?
If you want you can also attach your cloned cards to the cloned customer object, but thats entirely optional
You can keep doing your card payments as you have them, the payments intents wouldn't have any customer at all
but yes the bank transfer payments will all have a customer id, they have to in order to get the VBAN
to our understanding cloned payment_methods cannot be reused for more transactions... ๐คทโโ๏ธ
Will not happen the error we've met before: this payment_method has been associated with another customer...?
This doesn't apply to bank transfers, since there is no payment method, and the VBANs are inherently already tied to a specific customer
even after 3 years with stripe we often feel lost ๐คฏ
Only if use without being attached. If you attach them to a customer on the connected account before creating the payment then they can absolutely be re-used.
does stripe support provide some implementation review (even as paid service) before launching the product? we are quite uncertain of the implementation we had to changed it few times already due to misunderstanding of documentation or not precise information provided. The docs are huge and even we implement just a part of your features it is sometimes like a Sisyphus's work
Hi, taking over as my teammate needs to step away. Let me catch up.
yes, but as we store the payment_method in the platform account and clone it for every payment_intent to be able to use it in connect_account it will fail with an error as we reuse one payment_method for all the connected_accounts. for now it looks like the best match for our UX
Hi, nice to meet you
We do have professional services that are certified, you can explore our list here:
https://stripe.com/professional-services and https://stripe.partners
great, we will definitely do that. for now. can you suggest the best way how to implement VBAN along with existing implementation of payment_method cloning? We don't want to change implementation of this part due to limitations of VBAN.
You can continue to use the existing VBAN for those existing customers. Then, you'd want to collect new details to create a payment method to clone
I checked the page and the professional-services is the sales team. honestly we've tried this many times with businesswise questions and the result was useless. the only high quality support is here... sorry to say that
I'm sorry to hear that. If you need professional services, you will need to go through that link.
Otherwise, we are here if you are a developer and working on your integration directly with Stripe.
I am definitely developer ๐ฅฐ and I've spent last 4 years in leading developers to achieve successfull integration with Stripe
Great, we're here to unblock you while you work on your integration if you do not choose to go through the professional services and intend to code on your own.
we are going around this issue here. I try to summarize again what we have and how I understand we should do the VBAN. please confirm or suggest something else:
-
card - we create payment_method in our (platform) account and reuse (clone) it for every purchase (customer purchased from us as a platform or from the 3rd party provider = connected_account). The reason is we want to simplify UX - the customer would create the payment_method only once and they can manage the cards in our platform environment. When we clone the payment_method for the payment_intent we always include the customer_id to avoid misusing payment_method for two different customers. This was suggested by this support here and this works as we wanted and expected. To my understanding we cannot clone the customer itself and assign it to the cloned the payment method because this would produce the
error: this card belongs to another customer. -
vban - as I understand correctly we MUST create a customer in connect_account to be able to create unique vban for the customer+vendor. Considering existing implementation there can (not have to) be the customer created already via the cloned method. It marked as
Guestwhich we are not sure what it means or any consequences it can have. ๐คทโโ๏ธ if we need to create the customer to assign VBAN to them there could be duplicity (one from the card cloning and second created directly). am I correct?
I need some way out from this...
To clone card payment methods, here is how the logic would be and order of operations:
1/ Create the customer on the Platform Account
2/ Create the Payment Method on the Platform Account using SetupIntents by passing the customer id on the SetupIntents
3/ Create a Payment Method (via /v1/payment_methods endpoint) using the Stripe Account Header and by passing the above object ids both the customer id and the payment method id. It creates a new payment method id on the Connected Account
4/ Create a charge using that payment method from 4.
This way, you won't get that error you noticed. We document part of the flow here: https://docs.stripe.com/connect/direct-charges-multiple-accounts#clone-and-create-direct-charges
As for VBAN, let me confirm on my end
I was under the impression that you could not clone Bank Transfers
For VBAN - yes, you need to create a customer on the Connencted Account but you cannot cloned like it exaplins above for Card payment methods. You will need to create a customer object for VBAN for work. Yes, it will be dupicate as each customer will have their own VBAN. You will need to come up with a way to track them on your end to link them
ok, thank you for now. I am afraid I will definitely come back with this issue in the near future... ๐