#[LBG] India-clone
1 messages ยท Page 1 of 1 (latest)
Hi! You cannot directly clone a customer, but you can re-create it on the connected account.
And to clone the PaymentMethod of the customer, you should use this: https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods
Hi, than you for you response. I am able to clone a payment method. My problem is the action to create the customer on the connected account. If I use this API call : https://stripe.com/docs/api/customers/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
A new customer object is created with a new customer_id
How do I know the platform customer = connect_account customer ?
Yes, a new customer will be created with a different ID. To keep track of them, you could use the metadata field of the customer
Can we filter on metadata when listing customers ?
I guess it is the only way to find the good connected_account customer id
Or to keep track of correspondance in our backend, which we would like to avoisd
Well first of all, can we list the customers of a connected account ?
Well first of all, can we list the customers of a connected account ?
If you use theStripe-Accountheader, yes.
Yep, just done it ๐
Can we filter on metadata when listing customers ?
Not via the API.
Or to keep track of correspondance in our backend, which we would like to avoisd
Yes that's also an option.
How do we find the good connected_account customer_id then ? We have to list all connect_account customers and go through all of them to find the good one ? And create it if we don't find it ?
Hello ๐
taking over for soma here
When you say "good" customer_id, do you mean the new customer ID?
Can you provide an example
Hi !
Imagine I have a platform customer with the following metadata : dealer_id:155. Imagine it's customer_id is "cus_LFNeQXRuidkTDW". We associate a payment_method (SCA compliant) to this customer. Now, this customer needs to pay the connected account "acct_1KYshMPtrvFApXUx" with direct charge. The platform customer object (cus_LFNeQXRuidkTDW) has to be recreated on the connected_account (acct_1KYshMPtrvFApXUx). Once recreated, I have a new connected_account customer_id, imagine it is this one : cus_LFl4uZZNnPctfi
My question is, how do I can know, using Stripe, that the platform customer "cus_LFNeQXRuidkTDW" = the connect_account customer "cus_LFl4uZZNnPctfi"
The platform customer object (cus_LFNeQXRuidkTDW) has to be recreated on the connected_account
I don't think you need to re-create the customer on the connected account to create a direct charge
In order to create a direct charge,
You can create a paymentIntent using your platform key and pass stripeAccount header (connected account ID)
I've already try this ..........
what error are you getting?
You can't create a direct charge without a customer_id associated to the conneced_accont
Ressource missing
Let me take a quick look
If you try to create a direct charge to the connected_account with a platform customer_id, you'll have the error missing ressource:customer_id
If you try with a platform customer payment method, you'll have this error
ah gotcha apologies. I was thinking about something else entirely.
let me test something quickly
Yeah so one way to do this is to use the metadata on the customer to store this info i.e. when you create a customer on the connected account, you can update the metadata on the platform for the customer to include that new customer ID
The other is to handle it on application level (on your backend)
There is a Search API which allows you to filter objects based on metadata but it is currently in beta
https://stripe.com/docs/search-api
You can write in to support to see if you're eligible
Ok, for the first solution would be as same as storing correspondences in our backend. In fact, it would be more efficient to store it in our backend as we already query it before the paymentIntent Workflow
Is there a webhook event to detect the deletion of a connected_account customer by the connected_account ?
So we can delete the correspondence
Yup you can create a connect webhook that listens for customer.deleted event
How do I know the customer.deleted event comes from the connected account and not the platform ?
Connect webhooks are for activity on any connected accounts.
Account webhooks will receive events for the platform account
Ok so if I check this, the events come from the Connected accounts ONLY
And not the platform
yup
Nice
There is a Search API which allows you to filter objects based on metadata but it is currently in beta
The 2nd solution you gave, storing correspondences in metadata, might not be adapted in the case where the connected account deletes one of its own customer_id
The correspondence would still exist in metadata event if it does not exists on the connected account
Except if the webhook updates the metadata..
Yup depending on the integration it can get tricky
It can be done but complexity changes from integration to integration
Yes
I have another question
I have been able to re-create a platform customer on a STANDARD express account, clone the platform customer payment method and use it as the payment method for the paymentIntent (configured as a direct charge) between the customer and the connected account
All is good, the connected account paies for the Stripe fees
BUT, I have been able to do the same thing, with an Express account
Is this normal behavior ?
It is possible but we HIGHLY recommend not using direct charges with Express accounts.
Why ?
Because It's not a recommended charge flow
@sharp leaf it means its not a path Stripe explicitly endorses and can lead you to some rough edge cases
Direct charges are only recommended with standard accounts. For Express & custom you should use destination charges.
Sorry but it means everything and nothing ๐
Let me read on your link
Meanwhile, when creating a payment method with a checkout, is it possible to force a 3DS to authenticate credit card ?
Yep! You can use request_three_d_secfure=any for that as explained here:
https://stripe.com/docs/payments/3d-secure#manual-three-ds
Thanks, we will use the payment_method (credit card), to pay subscriptions (off_session) AND direct charges (on_session)
Would you recommend to force a 3Ds for future usage as off_session ?
You mean when collecting the payment method details?
Yes
You can let Stripe handle this for you when you set up future usage, but forcing it is up to you
Note that all future payments might still require auth, this is up to the issuer
For off session payments these will be declined
In the case the 3Ds did not came up when collecting payment method details ?
I configured the billing settings as shown on the screenshot
Did you send the parameter I discussed? Can you share an example confirmation request?
@dense rock let's chat in the thread I created for you
๏ผ
@dense rock I removed your message here FYI
Is it possible to collect payment methods details, in a SCA manner, without Stripe Checkout ?
Nice, does it have the features then the Checkout ? Like security, multi language, error handling, etc?
well it has some of those, not all since it isn't an entirely Stripe hosted surface
We are using the payment_method with a credit card for customers to pay subscription AND direct charges to connected accounts using the cloning payment methods process (https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods). There is a limit : "Cloning supports PaymentMethods of card type only."
It wouldn't be a good idea to implement PaymentElement then ?
ah well if you're using cloning (which I missed earlier) then yes using CardElement is what you want. depending on your fund flow, even PaymentElement isn't what I'd recommend for cloning since you can't create just a PaymentMethod with PaymentElement right now
Do you have some doc on CardElement please ?
And do you have an idea about when PaymentElement would be available for French customers ?
And do you have an idea about when PaymentElement would be available for French customers ?
it should work fr FR customers. why do you say it does not?
The countries here are not the available ones only ?
CardElement is this https://stripe.com/docs/payments/accept-card-payments?platform=web&ui=elements
the countries shown there are just a sample
it says in the tool tip
Oh ok, nice ! Where can I find the different payment methods available for french customers ?
any PaymentMethod supports FR here: https://stripe.com/docs/payments/payment-methods/integration-options
Why does the documentation recommends to use the workflow "Accept a payment" instead ?
Which redirects to Stripe Checkout
that doesn't just redirect to Checkout, the page redirected to also has "PaymentElement integration" under "custom flow"
but that callout is there because PaymentElement is the newer component that most users should be using. But in your integration, if you call createPaymentMethod() on Stripe.js, then you can't use PaymentElement as it doesn't support that right now. So you have to use the older CardElement
Thank you, I think we'll go for Checkout first because it seems simplier to implement (we've also already done it) as we need to put this into production ASAP for SCA