#[LBG] India-clone

1 messages ยท Page 1 of 1 (latest)

cursive mist
sharp leaf
#

A new customer object is created with a new customer_id

#

How do I know the platform customer = connect_account customer ?

cursive mist
#

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

sharp leaf
#

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 ?

cursive mist
#

Well first of all, can we list the customers of a connected account ?
If you use the Stripe-Account header, yes.

cursive mist
#

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.

sharp leaf
#

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 ?

stable veldt
#

Hello ๐Ÿ‘‹
taking over for soma here
When you say "good" customer_id, do you mean the new customer ID?
Can you provide an example

sharp leaf
#

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"

stable veldt
#

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

sharp leaf
#

What ?

#

How can I create a direct charge then ?

stable veldt
sharp leaf
#

I've already try this ..........

stable veldt
#

what error are you getting?

sharp leaf
#

You can't create a direct charge without a customer_id associated to the conneced_accont

#

Ressource missing

stable veldt
#

Let me take a quick look

sharp leaf
#

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

stable veldt
#

ah gotcha apologies. I was thinking about something else entirely.

#

let me test something quickly

sharp leaf
#

Can we go back to my question then ?

#

Ok

stable veldt
#

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

sharp leaf
#

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

stable veldt
#

Yup you can create a connect webhook that listens for customer.deleted event

sharp leaf
#

How do I know the customer.deleted event comes from the connected account and not the platform ?

stable veldt
#

Connect webhooks are for activity on any connected accounts.

#

Account webhooks will receive events for the platform account

sharp leaf
#

Ok so if I check this, the events come from the Connected accounts ONLY

#

And not the platform

stable veldt
#

yup

sharp leaf
#

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..

stable veldt
#

Yup depending on the integration it can get tricky
It can be done but complexity changes from integration to integration

sharp leaf
#

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 ?

stable veldt
#

It is possible but we HIGHLY recommend not using direct charges with Express accounts.

sharp leaf
#

Why ?

stable veldt
#

Because It's not a recommended charge flow

sharp leaf
#

What does it mean ?

#

It can be blocked ?

oak hawk
#

@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.

sharp leaf
#

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 ?

oak hawk
sharp leaf
#

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 ?

oak hawk
#

You mean when collecting the payment method details?

sharp leaf
#

Yes

oak hawk
#

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

sharp leaf
#

I configured the billing settings as shown on the screenshot

oak hawk
#

Did you send the parameter I discussed? Can you share an example confirmation request?

stable veldt
#

@dense rock let's chat in the thread I created for you

dense rock
#

๏ผŸ

oak hawk
#

@dense rock I removed your message here FYI

sharp leaf
#

Oh nice ! Thank you

#

I haven't test yet, coming to it

sharp leaf
#

Is it possible to collect payment methods details, in a SCA manner, without Stripe Checkout ?

robust dirge
#

yes, you can with PaymentElement

#

you embed it on your own page

sharp leaf
#

Nice, does it have the features then the Checkout ? Like security, multi language, error handling, etc?

robust dirge
#

well it has some of those, not all since it isn't an entirely Stripe hosted surface

sharp leaf
#

It wouldn't be a good idea to implement PaymentElement then ?

robust dirge
#

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

sharp leaf
#

Do you have some doc on CardElement please ?

#

And do you have an idea about when PaymentElement would be available for French customers ?

robust dirge
#

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?

sharp leaf
#

The countries here are not the available ones only ?

robust dirge
#

the countries shown there are just a sample

#

it says in the tool tip

sharp leaf
#

Oh ok, nice ! Where can I find the different payment methods available for french customers ?

robust dirge
sharp leaf
#

Which redirects to Stripe Checkout

robust dirge
#

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

sharp leaf
#

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