#coburn_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1280517457248780359
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there ๐ taking a look at that request
The error message looks correct here. It looks like the Payment Method object resides on your Platform account, but you're making a request for your Connected Account. That request is expected to fail since your Connected Account's requests can't use objects from your Platform account (and vice versa), those objects are outside of scope. Do you have an example of a request where you said this did work that I could take a closer look at?
Excuse my ignorance, as I was not the one that wrote the code that makes these calls, what exactly do you mean by your statement?
Every object in Stripe resides on a specific account, and only that account can use those objects (with a handful of exceptions). In your request you referenced the Payment Method object with the ID pm_1Puu72BAfHXJh6DiPny1xv1I.
That Payment Method object belongs to your Platform account, so it can only be used for payments made by your Platform account. In the request you shared the stripeAccount header was used to make the request for a Connected Account:
https://docs.stripe.com/api/connected-accounts
That Connected Account is not able to use objects from your Platform account, so the request failed.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
For flows where Connected Accounts need to be able to charge Payment Methods that were created by the Platform account, the Payment Method is first cloned from the Platform account to the Connected Account:
https://docs.stripe.com/payments/payment-methods/connect#cloning-payment-methods
Ok, that's a little clearer. I think I will need to have a read through the documentation and follow up with the developer. But from the sounds of things, it looks like we are missing a step where we need to clone the Payment Method from the Platform account to the Connected Account before sending the request.
Yeah, that's what it sounds like to me based on that one request.
Thanks for your help Toby. You've been very helpful.