I am trying to make a Stripe later payment direct charge on a connected account in Node.js. This is all in test mode using the paymentMethods API.
I create a customer and attach a payment method with stripe.setupIntents.create() and am able to make later payments to my stripe account/the platform without any issues. However I would like to make a direct payment to a connected account using stripe.paymentIntents.create().
Following this guide, https://stripe.com/docs/connect/cloning-saved-payment-methods, I am under the impression I can clone a payment method used for my platform and use it to make a direct payment for a connected account. I attempt to create a token for the customer but receive the error "The customer must have an active payment source attached." despite the customer having an active default payment method that works for my platform, 'pm_1HFjvsLIOnOaY98HTxPugN5i'.
const token = await stripe.tokens.create({customer: 'cus_HpOf9y6TJ5XYlA'}, { stripeAccount: 'acct_1HDuHbBwYBNGN1ir'}
I am further confused by this guide https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods, is this just an alternative method to accomplish essentially the same thing? Or do I need to create a new payment method onto the connected account, but wouldn't that defeat the purpose of creating a token?