#gerada-connect

1 messages · Page 1 of 1 (latest)

rugged tapir
#

that request fails at least because you created that PaymentMethod on the account acct_1JCRCjErWLFb1tAh but then you try to use it on the account acct_1JClrVCz5n0FQ626, so that won't work.

real oriole
#

thanks for the support, I'll check the doc and I'll let you know as soon as possible

real oriole
#

I created a paymentIntent with the first connected account, after that I cloned payment method and another payment intent with the second connected account but I have the same error

#
  1. First payment intent, it is in succedeed status for the first connected account
#

Second payment intent with cloned payment method, it goes on error: No such PaymentMethod: 'pm_1JaHWBCz5n0FQ626eZryP2rx'; code: resource_missing; request-id: req_M2fC2GBOs0IKZf

rugged tapir
#

ah ok

#

you need to not use the connectedCustomer ID in that call to PaymentMethod.create() . It take the ID of the customer on the platform , that you're copying the card from.

#

so e.g. in that code(the second screenshot), try passing paymentMethod.getCustomer() instead of that new connectedCustomer that was just created.

real oriole
#

PaymentMethodCreateParams paymentMethodParams = PaymentMethodCreateParams.builder().setCustomer(paymentMethod.getCustomer())
.setPaymentMethod(paymentMethod.getId()).build();

#

same error No such PaymentMethod: 'pm_1JaIOcCz5n0FQ626oBi4vkGI'; code: resource_missing; request-id: req_llLgVm09M1e63X

rugged tapir
#

ok there customer was passed as null so I guess paymentMethod.getCustomer() was null.

#

remember you have to attach this PaymentMethod to a customer on the platform before copying it

#

After you create a PaymentMethod and attach it to a Customer, you can clone that PaymentMethod on a connected account using the connected account’s ID as the Stripe-Account header.

#

I don't think you attached it to a platform customer(your steps earlier "2. Create a customer 3. collect card details and create a payment method" are correct though, so maybe you just need to implement those again!)

real oriole
#

sorry I don't understand the order and the correct step

#

could you please explain me?