#bernardpaulet
1 messages ยท Page 1 of 1 (latest)
I also try to make the opposite, to copy a payment method from a connected account customer to a platform account customer.
Not possible I'm afraid, only the inverse (platform -> connectted account)
Oh...
My objective was to keep platform accounts and connected accounts synchronized for the same customer (in order to avoid re-entring the card info each time he pays another merchant of the platform). Do you see another way to do this?
I use standard accounts
Well, the platform would act as the primary source for payment methods. So whenever a customer of your connected account(s) adds a new payment method, the recommendation is to add it at the platform level and then clone to the necessary connected account(s)
OK, I see... ๐
I will have to rewrite a bit of my code then.
But... To had a new payment method to a platform customer, I will have to use the same code, no?
const paymentMethodComptePlateforme = await stripe.paymentMethods.create({ customer: listeClientsConnectes.data[0].id, payment_method: paymentMethodsConnecte.id, }, );
Well you'd use a Setup Intent ideally
Which will handle any SCA/3DS requirements for the card, and ensure its correctly saved on the Customer object. That will return a pm_xxx ID that you can then clone
I know you're not there to give a tutorial but after reading some docs about Setup Intent, I don't clearly see how it works...
I see how to create a setupintent for a customer
const setupIntent = await stripe.setupIntents.create({
customer: '{{CUSTOMER_ID}}',
payment_method_types: ['bancontact', 'card', 'ideal'],
});
But I still don't have the card infos. I am a bit lost...
For your information, I use Flutter (flutter_stripe plugin).
Thanks !
Hi there ๐ jumping in as my teammate needed to step away. The flutter_stripe plugin is a third-party extension, so we aren't familiar with how it works or how to implement it, in this forum we primarily assist developers who are working with our first-party libraries.
Setup Intents are the object that are used to collect payment method details, but you will need to present your cusotmer with a UI to collect those details.
Our guide for collecting payment method details for future use is shown here, and walks through the entire process of using a Setup Intent:
https://stripe.com/docs/payments/save-and-reuse?platform=web&ui=elements
Yes, I saw this.
But it seems that it needs Stripe.js or a mobile Stripe SDK and I don't see what's behind.
I can make a form in Flutter to collect the card info (number, owner, expiry date, ccv) and send the info to my server (firebase function). What I don't see it's how to link that info to a payment method for a platform customer.
For your information, the flutter_stripe plugin offer a PaymentSheet that receives the PaymentIntent and then collect the payment info. If I add a new card in that payment sheet, the card (payment method) will be saved to the customer that I pay.
I don't know how to use the flutter_stripe package to collect payment method details, you will likely want to reach out to the team that built and maintains that integration for assistance implementing it.
I'm a bit confused as these statements seem to contradict each other:
What I don't see it's how to link that info to a payment method for a platform customer.
the card (payment method) will be saved to the customer that I pay.
If the card is getting saved to a customer, then why is that not what you're trying to accomplish? (I feel like I'm missing something here and am trying to piece that together)
Sorry, for not being clear.
What I want to do is keeping the payment method of the customer on the platform account and the customer on the connected accounts synchronized.
I succeeded to clone the payment methods of customer on the platform account to the customer on the connected account. I try to do the opposite but according to your colleague it is not possible.
So, I try to find a workaround...
As I work with connected accounts, the payments will arrive on the connected account (depending on the merchant paid). This will be done via the PaymentSheet of the flutter_stripe plugin (that receives the payment intent). So it doesn't pay the platform account and the payment method for that payment will not been linked to the customer of the platform.
What I could do, it is collect the card infos (via a form) and then send that to my firebase function. But I don't see how to send that card info to the customer platform account.
I hope I have been clearer.
You can't send Payment Method details up from a Connected Account to the Platform Account, only the other way around. So if you want to share a customer's payment method across your Connected Accounts, you will need to always collect those details on your Platform account and then share them to the Connected Account that needs to use them.
You won't process a Payment on a Connected Account to save Payment Method details, you will want to:
- Use a Setup Intent on the Platform account to collect payment method details and create a Payment Method
- Clone the created Payment Method to the necessary Connected Accounts
- Create a Payment Intent on the Connected Account and provide it the ID of the newly created Payment Method.
Thanks ! ๐
Step 2 and 3 are already done but it's the first one that cause me problem.
Reading the setup intent doc, I don't see how to collect the payment method details with the setup intent
Same way as with a Payment Intent, you use the client_secret from the intent to initialize the frontend so it can collect payment method details.
Yes, but it's there that a Stripe SDK enters in the game, SDK that doesn't exist for flutter.
So I try to figure out what is this SDK doing...
On my frontend I have the form with the payment method details but how to send them to the customer and how to use the client_secret generated by the setup intent?
Sorry,
I have an appointment, I have to leave.
Is it possible to continue later or on Monday?
We won't know how to implement this in flutter_stripe specifically. If your current flow is working with Payment Intents, then I think you'd be able to dissect where you're creating a Payment Intent and providing its client_secret to your frontend, then edit that flow so it creates a Setup Intent instead.