#martin-custom-connect
1 messages ยท Page 1 of 1 (latest)
You can not use a PaymentMethod pm_123 on the Charges API. That will never work
You have to use the PaymentIntents API: https://stripe.com/docs/connect/destination-charges
Thanks, I still get error from PaymentIntent, "No such paymentMethod, although I just created one. req_zFJvCE2Nz9fvXV
you seem to have incorrectly created the PM on your connected Custom account for some reason
so you need to fix that first
@buoyant topaz did that make sense?
Sure, I need to figure out what I am missing when creating the paymentMethod object.
nothing is missing, you're just doing it wrong
You seem to be passing the Stripe-Account header on PaymentMethod creation, don't do that
and then your code will work
Thank you, that works! I want to enable my connected accounts to perform multiple paymentIntents, do I need to create a new paymentMethod for every intent or could I reuse pm_123 on new paymentIntents?
Hi there ๐ taking over for koopajah
You can reuse the payment method on new payment intents.
Alrigth, great. I got this message. The provided PaymentMethod cannot be attached. To reuse a PaymentMethod, you must attach it to a Customer first. How do I attach it to a Custom Account? What I did earlier was to pass the Stripe-Account header, which I just got told not to.
So I think you're confusing Custom Connect accounts and Customers. Those are two different things. The error you're getting is telling you to attach it to a customer if you want to reuse it. It has nothing to do with Connect. Custom accounts do not have payment methods.
Okay, so I cannot use payment methods with Custom Connected Accounts then? I am not using any Customer objects, only Connected Accounts. I just created a paymentIntent with a paymentMethod attached to it (type card) through API and it works fine. But if its not possible to attach any paymentMethods to a Custom Account object, I guess I have to recreate it for each payment?
I think you have a fundamental misunderstanding of how these things work. Custom accounts have customers. All payments require a customer, so you definitely will need to have customers to make payments.
Okay, so I cannot use payment methods with Custom Connected Accounts then?
No. Custom accounts are businesses, whereas customers are the end-user who makes the payment
But if its not possible to attach any paymentMethods to a Custom Account object, I guess I have to recreate it for each payment?
Payment methods can be created on behalf of the Custom Connect account. Those payment methods will have a customer attached to them, which represents the end-user who made the payment. The Custom Connect account is the business that is being paid or facilitating payment from the end-user (customer)
Ah, that explains a lot. So I guess in my case (where the platform connects "individual persons" who sells and buys from each other) the connected account is of type individual but they still need a Customer that represents the individual. Thanks
I guess thats what I was missing
All payments require a customer,
that's definitely not true in our products/API
Right, fair point @deft dawn. Nonetheless, the differentiation between Connect account and customer is worth making note of @buoyant topaz.
When choosing individual for the Custom Connect account, you are essentially saying, "treat this person as a business that can create customers and payments"
Got it, thanks!
Hi again, I have now created customer on my Connected Account, with Create Customer (Stripe Account in header). This works, I can view the Customer on the Connected Account in the Stripe Dashboard. However, when i try to attach a paymentMethod to this Customer, I get the error: resource_missing. If I create a Customer without passing Stripe Account in header its fine. Do I need to seperate Connected Accounts and Customers? Thus using Customers for Payments and Connected Accounts for Payouts?
So it sounds like the Customer was created on behalf of the Custom account, which means that requests made to do things with that customer will require you use the Connect account's ID in the Stripe account header. You are essentially performing an action for your Custom account's customer, on behalf of that account
That leaves me in a great mess, because when I try to create a paymentIntent with transfer destination (w/ Stripe Account in header), I now get the response: No such destination acc_123. If I remove the Stripe Account from header, I get the response no such paymentMethod pm_123, and no such customer.
Hello ๐
Stepping in here
Why are you creating the payment method on the connected account though?
I do not need to, but it would be more convenient to reuse the payment method several times for that connected account. So, in our app, we want to make payments and payouts to our connected accounts on behalf of our custom connected accounts. Is the alternative to create a new payment method each time the connected account (app user) makes a new purchase (paymentIntent)?
so, your connected accounts are your users who you'd eventually make payouts to.
but you also need to charge connected accounts/users and you want to use the same payment method?
Correct, each user (connected account) will only use one payment method each (of type card) to buy stuff from other users (connected accounts).
It'd be easier for you to just create customer objects for those connected accounts
Alright, so you mean creating customer objects for those connected accounts that needs to be charged, and keep customer accounts for payout?