#RahulRaval-no-such

1 messages · Page 1 of 1 (latest)

fresh condor
#

API objects only exist on the account that created them so if you create a PM on the platform account, it will only be on the platform account until you copy it over

sour acorn
#

gotcha.. thanks @fresh condor
Any way to identify first if it's been already copied over or not? Or we are good to call this without checking it

fresh condor
#

Let me double check. The PaymentMethod would still work even if it is a duplicate but I think there is a way of checking first

sour acorn
#

and I'm getting customer as null when cloning the method even though I'm passing the customer in request.

fresh condor
#

Do you have the request ID (req_123) from when you tried that?

sour acorn
#

wait, testing on test store let me check where I can grab the id

#
      {
        customer: customer,
        payment_method: paymentMethod,
      },
      {
        stripeAccount: vendor,
      }
    )```
#

this is what I'm calling I'm getting a successful response but inside that, there is no customer.

{
 id: 'pm_1K2GV8RO4JWZ2f1nj****',
  object: 'payment_method',
  billing_details: {
    address: {
      city: null,
      country: null,
      line1: null,
      line2: null,
      postal_code: '60657',
      state: null
    },
    email: null,
    name: 'Jenny Rosen',
    phone: null
  },
  card: {
    brand: 'visa',
    checks: {
      address_line1_check: null,
      address_postal_code_check: 'pass',
      cvc_check: 'pass'
    },
    country: 'US',
    exp_month: 11,
    exp_year: 2022,
    fingerprint: 'SPBaoj85drsk80Ad',
    funding: 'credit',
    generated_from: null,
    last4: '4242',
    networks: { available: [Array], preferred: null },
    three_d_secure_usage: { supported: true },
    wallet: null
  },
  created: 1638456190,
  customer: null,
  livemode: false,
  metadata: {},
  type: 'card'
}
fresh condor
#

Gotcha. That is expected but you can create a Customer object on the connected account and attach the new PM to that

sour acorn
#

here is a requestId I used for cloning method
req_2NRiESg4N8L0kz

#

ok so I have to clone customer too before cloning the method?

fresh condor
#

Yes, you would have to do that as a separate step

sour acorn
#

got it. Thanks for the help. I'll ping you if needed any more assistance.
Your support is the best and fastest!

fresh condor
#

Of course! And thank you very much, I will pass that along to the rest of the team too