#_kajjin_
1 messages · Page 1 of 1 (latest)
Hi 👋
How are you collecting payment method information? What is the error you receive?
Can you share an API request ID for this? It will start with req_
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
collecting using React Stripe.js Elements, this is the request for the token that was generated
req_WHcRkmexxERFZk
and basically want to update the default payment method for this subscription "sub_1NxFZgCZPxdphvnuKXL6VEyr" for this connected account "acct_1MfTxACZPxdphvnu"
Okay but the token doesn't exist on that account.
This request is successful BTW so which one is throwing the error?
so, using that token then I try to do:
new_payment_method = Stripe::PaymentMethod.create(
{
type: 'card',
card: {
token: token
}
}, { stripe_account: connected_account_id }
)
and I get the Stripe::InvalidRequestError: Invalid token id: tok_...
I think bc of what you say that it doesn't exist on that connected account
wonder how could I do it then
You could either create the token by initializing Stripe.js on the front-end with the connected account's Stripe Account ID
https://stripe.com/docs/js/initializing#init_stripe_js-options-stripeAccount
Or clone the payment method to the connected account. But that requires much more work on your part (you need to create and attach a Customer on the Platform, create a customer on the Connect Account, and then clone it)
https://stripe.com/docs/connect/cloning-customers-across-accounts
gotcha, ty!
I think dynamically intializing Stripe.js with the account ID is the easiest approach here