#kaustuva-le-cloning

1 messages · Page 1 of 1 (latest)

last estuary
#

@devout sentinel sounds like you're missing passing the Stripe-Account header to call , which is required. You use your platform's API key and that header set to the ID of the connected account.

devout sentinel
#

I'm passing the account id of the connected account as well in the call for token creation

last estuary
#

you probably are passing a variable for the account ID in your code and the variable is null

#

can you share the exact code you're using?

devout sentinel
#

Yes, turns out that the account id was being passed as null. Thanks.
I get a new error now...
'The customer must have an active payment source attached.'

Is this referring to the customer on the platform account?

last estuary
#

I'd need to see the API request that gave you the error to know

devout sentinel
#

req_WBLTzYNqIjR4dQ

last estuary
#

looking, sorry for the delay

#

yeah this is due to the horrible docs I alluded to basically

#

this fails because the customer doesn't have any payment methods

#

so there is nothing to clone

#

remember this feature is not actually cloning customers, that's not what it does(maybe the docs say that, but it's not what happens). All it is is, you have a Customer on the platform account with a saved card. You can copy that card to a connected account .Then you can create a new separate Customer on the connected account and attach the cloned card to it; it's a "building block" for a concept of shared/cloned customers

devout sentinel
last estuary
#

I wouldn't use Sources at all, they are deprecated

#

but looking at your account you have been around for a while and have some Stripe contacts so I guess you have a legacy integration you're working with, so fair enough!

devout sentinel
#

can I just do this?

  1. create customer on platform,
  2. attach source to it,
  3. clone source using above method,
  4. create a regular customer on connected account ( same way as step 1, with stripe connect account as passed as parameter)
  5. attach the cloned source to step 4
  6. create a charge on connect account
last estuary
#

yep that's exactly what it is!

devout sentinel
#

Thanks a lot. Will try this