#jket
1 messages · Page 1 of 1 (latest)
hello! the naming for that doc is actually kinda misleading. You're actually cloning the PaymentMethod/Token, not the customer
are you referring to the those details on the PaymentMethod/Token, or the Customer?
Ah, yes I was referring to the name/email details on the Customer object when I use the token I get to 'clone' them into my connected account (using stripe.customers.create in stripe-node)
I can see the resulting account that is created and it has the same default payment method that was present on the customer in the platform account, but the customer's name/email is not copied over
that's expected behavior, you're creating a new customer on the connected account - the customer's name/email won't be automatically copied over. You will want to specify those details when creating the customer in the connected account
Ok got it, thank you! And like I said, it would be nice if that documentation I linked to mentioned that behaviour more explicitly (name/email not being copied over), because when I go to create an invoice with the cloned customer, I need an email to use the 'send_invoice' feature.
And 'cloning' certainly sounds like I'm going to get essentially the same customer object in my connected account, albeit with a different ID, etc.
I'll submit feedback on that documentation article
ah, i'll pass on that feedback too
One last question on this, when you initially said "You're actually cloning the PaymentMethod/Token, not the customer" were you referring to the customer's default payment method also getting created?
you're choosing what PaymentMethod/Token to clone : https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods
i'm not entirely sure what you mean by the customer's default payment method also getting created
I was following the "Clone customers across accounts" documentation: https://stripe.com/docs/connect/cloning-customers-across-accounts
Not the "Cloning PaymentMethods" you linked to, so the language was different. In the one I linked to, I call
const customer = await stripe.customers.create(
{source: '{{CREATED_TOKEN_ID}}'},
{stripeAccount: '{{CONNECTED_ACCOUNT_ID}}'}
);```
with the token I get with
```js
const token = await stripe.tokens.create(
{customer: '{{CUSTOMER_ID}}'},
{stripeAccount: '{{CONNECTED_ACCOUNT_ID}}'}
);
Not the
const paymentMethod = await stripe.paymentMethods.create({
customer: '{{CUSTOMER_ID}}',
payment_method: '{{PAYMENT_METHOD_ID}}',
}, {
stripeAccount: '{{CONNECTED_ACCOUNT_ID}}',
});
method you may be referring to?
My confusion stemmed from the 'you're not actually cloning the customer' which is what I thought I was doing by following those docs
no, you're not cloning the customer - in step 2 : you're cloning the token to the connected account, in step 3: you're creating a customer on the connected account and attaching the cloned token to the customer
Ahh ok, so that token I get from the example I pasted above, where I'm only passing the customer parameter, by default will create a token for the customer's default payment method, either card or bank account, right?
Otherwise, I could pass a card param with one of the customer's card IDs (and same for bank_account) to choose a specific payment method of the customer's to clone
yep, that's right