#theahmadzai-connect-customers

1 messages · Page 1 of 1 (latest)

exotic crane
#

like 1 user can have multile customer ids depending on connected store?
Generally you'd have a 'main' customer on the platform, and then you'd clone them across your connected accounts when required

unkempt raptor
#

on my side do I have to store each customer id with corrosponding store right

#

currently we have this

#

where customer id is stored for each store

#

Does this also mean if customer attach his credit card to one store it will not be available in other one

#

yeh it's currently that way

exotic crane
unkempt raptor
#

Thanks I'll check it out my last question so do we need to store each customer id on my side right

#

Oh does this mean

#

I can create customer on platform

#

and store a single id of customer

#

but when charging I can use the store user id

exotic crane
#

Well you'd likely need the relevant customer ID for the connected account you're charging from, yes

unkempt raptor
#

If I store customer on the platform

#

so my user and customer will have 1 to 1 relation

#

when charging I just need the customer and the connected account id

#

So I don't need to maintain customer for each store in that case

#

I'm using paymentIntent for charge and storing cards via paymentMethods

exotic crane
#

What kind of Connect charges are you making?

unkempt raptor
#

Any migration guide to clone my connected accounts to platform

exotic crane
unkempt raptor
#

I was creating a stripe customer for each store

#

Instead of a platform

#

I was directly using this to create customers

const customer = await stripe.customers.create({
  source: token.id,
}, {
  stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
});
#

with connected account id

#

now when they add pyament method to one store

#

it's not visible to other stores

#

I have around 4k users like that

exotic crane
#

Yup! You need to create the customer and save the PM on the platform

#

And then clone to connected accounts as needed

unkempt raptor
#

right but any migration guide now

#

to move customers from connected accounts to platform

exotic crane
#

You can't clone to the platform, no

unkempt raptor
#

Can I do it via some script

exotic crane
#

It's not possible no

unkempt raptor
#

right so now I'll do this just to verify in my case I just need this

#

to store customer on platform

#

and this to charge it

#

but I do not add source when creating customer

#

the paymentmethod is attached via paymentmethod api

#

so I also need to attach paymentmethod using platform secret and not use the connected id

#

right

exotic crane
unkempt raptor
#

which one

#

paymentMethod

#

Which one is the alternative then

exotic crane
unkempt raptor
#

Sorry yeah I use setup intents I only use detach list and retreive on paymentMethods

#

is that safe

exotic crane
#

Yup!

unkempt raptor
#

Thankyou so much, so I can conclude that I can store customers on the platform and they will be accissable across all connected accounts and I can charge them via pyamentIntent using store connected id

#

Thanks!

exotic crane
#

they will be accissable across all connected accounts and I can charge them via pyamentIntent using store connected id
No, you'll need to clone them to the connected accounts

unkempt raptor
#

How do we clone which api

stray summit
unkempt raptor
#

Thanks but @exotic crane advised not to use paymentMethods.create

exotic crane
#

I advised not to use the attach endpoint

unkempt raptor
#

Ow, okay so I have to clone using create but does it clone both card and customer right or I have to clone customer separately?

stray summit
#

it only clones the card

#

there's no way to clone the customer object directly, you have to create a new one and just set any fields on it that you'd like to copy across manually.

unkempt raptor
#

Thanks all clear now