#uh oh - attach PM to Connect customer

1 messages · Page 1 of 1 (latest)

chrome urchin
ionic lynx
#
        <paymentMethodId>,
        {
          customer: <customer ID>,
        },
        {
          stripeAccount: <connected account stripe id>,
        },
      );```
#

Like so?

chrome urchin
#

Yeah that looks right to me

ionic lynx
#

thank you so much!

chrome urchin
#

No problem!

ionic lynx
#

No such PaymentMethod:: OAuth key or Stripe-Account header was used but API request was provided with a platform-owned payment method ID. Please ensure that the provided payment method matches the specified account.

#

I'm getting this error when trying to attach to a customer under a connect account

glass owl
#

Hello! I'm taking over and catching up...

#

That error is thrown when you're trying to use a PaymentMethod that exists on your platform in an API request made on a connected account. Can you tell me more about what you're trying to do at a high level?

ionic lynx
#

I want to attach a card to a customer that is under a connected account

glass owl
#

You would need to create that PaymentMethod on the connected account in that case.

#

Based on the error it would appear you created it on your platform instead.

ionic lynx
#

Isn't this the api call?

        <paymentMethodId>,
        {
          customer: <customer ID>,
        },
        {
          stripeAccount: <connected account stripe id>,
        },
      );```
#

Basically, on Stripe Dashboard

glass owl
#

That's something you do after the PaymentMethod is created. How are you creating the PaymentMethod in the first place?

ionic lynx
#

I go under:

  1. Connect Tab
  2. Choose a Connect account
  3. Go under the Customers of that Connect account
  4. Click on a customer
  5. I have the ID of the Customer
  6. I have the ID of the Connect account
  7. I plug those values in the api call
ionic lynx
glass owl
#

Can you provide more details about what "creating it in the frontend" means? Are you using Stripe.js?

ionic lynx
#

paymentMethodType: 'Card',

});```
ionic lynx
glass owl
ionic lynx
#

You're right. Thank you! I will look into it

#

It worked, thank you so much for your help!