#mmansoor-connect-fee
1 messages · Page 1 of 1 (latest)
mmansoor-connect-fee
Hey @flat holly, we don't really do "web meet" but I'm happy to help! This is already documented in all our Connect docs as taking your own fee is the foundation of most platforms
Yeah but that's causing huge headache for us
step 1: https://stripe.com/docs/connect/charges you need to choose the right account type and charge flow for your business
Sure, you want to read https://stripe.com/docs/connect/direct-charges#collecting-fees which is right on our Direct Charges doc
Thanks
Let me read it
So we had tried this and got the following error "OAuth key or Stripe-Account header was used but API request was provided with a platform-owned payment method ID. Please ensure that the provided payment method matches the specified account."
Sure and so that means you have something wrong with your code which is unrelated to the fee part right? You are passing an incorrect id somewhere
If you share an example Request id req_123 I can look and show you
Here is one pm_1MyDzkC5sd7OOJiORiC64Cuq
Please make sure to take the time to read what I write. I asked for a request id req_123. That is a PaymentMethod id pm_123.
Let me find out ... one sec
It looks like you create that PaymentMethod client-side with Stripe.js but on your own platform account, which will never work with the Direct Charges flow
Where will I find a request Id
it's right there in the error , you can't miss it as the developer
That tells me you likely haven't read the docs I shared which are the foundation of how to use Direct Charges with Stripe Connect
My guess is that you are in a rush trying to make this work as fast as possible and so you're not really going through the right end to end tutorial unfortunately
Since you are using Standard accounts and Direct Charges, you need to make sure that everything related to a given payment happens directly on the connected account. This is done by making sure you pass the right connected account id acct_123 in the Stripe-Account header of your request(s)
You need to look at https://stripe.com/docs/connect/authentication#authentication-via-the-stripe-account-header which clearly documents how this works and you likely missed the step for the client-side code.
If I understood properly. It looks like you create that PaymentMethod client-side with Stripe.js means that I need to generate PaymentMethod on server side. Right?
not at all, I never said or meant that
Are you the developer? If so, how did you create that PaymentMethod? What does are you following, which UI Element are you using?
Can you add @potent storm to this chat .. he's the developer that I am working with
This is all public for everyone to see
I didn't orginally coded the UI so trying to debug and sold this issue
solve this issue
it's best to have them come, but really they need to read the doc I shared above which clearly explains their mistake
👋 koopajah needed to step away but I'm around.
Here is the req id "req_KbCo8OQIPEwZ4X"
Let me know if you have any questions and I can help.
Yep so the issue here is as Koopajah mentioned above... you are trying to attach a PaymentMethod that was created on the Connected Account without using the Connected Account Header.
Take a look at https://stripe.com/docs/connect/authentication
That indicates how you use the Stripe Account Header to make a request on your Connected Account
Let me ask another question
Can i create a customer in the connected account?
i.e. From Platform to Connected Account
Yes
You can use almost any of our API endpoints + the Stripe Account Header to make requests on your Connected Accounts
How would that API would look like
You can see examples for all of our endpoints in our API reference: https://stripe.com/docs/api/customers/create
Not sure if that is a question
If I need to attached a payment method to a customer in the connected account; do I need to pass on the Stripe Account Header as always
for Connected Account
Yes
Anytime you do anything on the Connected Account you need the Stripe Account Header
In the payment request or payment_method request?
On the GET request that is erroring
You haven't. Otherwise you would not get that error message. And you can pull up the request in your platform Dashboard to look at it as well and see that wasn't the case.
Perhaps your code is cached?
Or you forgot to save? Or forgot to restart your server?
Could be many things, but no Stripe Account Header is present
not sure what you mean with
- it will be on the dashboard *
did you read through the links shared earlier in the thread?
that should have code snippets to explain what you need to do in your code
you're using Node, what does your code snippet look like, can you paste just the code snippet for retrieving PaymentMethods? (pls don't paste secret key etc)
`return await Stripe.paymentMethods.attach(
token,
{ customer: customerId },
{ stripeAccount: "acct_1NL....RJE9" }
);`
that's not the request you shared earlier?
This is a PaymentMethod Attach POST request, the failing requests you shared were GET requests to fetch a PaymentMethod?
can you share code for the request that is failing e.g. https://dashboard.stripe.com/test/logs/req_1ZaOvzFPf8ucVH
you shared another GET
but the code you shared is for POST
sorry we're going in circles
gotcha, ok that's the POST, no worries so ...
I'll lay things out
1/ Platform - acct_1M2ctlC5sd7OOJiO
2/ connected accounts - acct_1NLAR0Fs2Ku7RJE9
3/ your Customer was created on Platform = WRONG
4/ your PaymentMethod was created on connected accounts = RIGHT
5/ your request is made on the Platform where Customer exists but not PaymentMethod = WRONG
Assuming you want both Customer to live on the connected account and also the PaymentMethod to live on connected account then you need to fix step 3 and step 5
is my assumption right?
depends on whether you're using Direct Charges or Destination Charges
req_fgWCI3l6zk2nWN. This is new req id. can you kindly look it up
req_96wGyezA75AcQy
ok the two requests shared earlier are still not exactly the right ones.
Taking a step back, let's take things one at a time. You shared a PaymentIntent creation and a PaymentMethod GET request.
Let's start with
3/ your Customer was created on Platform = WRONG
fixing that one first
and then
5/ your request is made on the Platform where Customer exists but not PaymentMethod = WRONG
fixing that one
my colleague@dense osprey is here and they can help you but let's take things one at a time
We updated 3 & 5
but you shared requests that were not for 3 and 5
a/ so pls first share the updated code snippet for step 3
b/ and a successful request ID for step 3
and then we can fix the next step
yes I understand but I'm trying to make sure we're progressing in a systematic manner, my goal is to map out that after steps 1-5, what are steps 6-10 etc
and clearly lay out which ones are working, which ones are not, etc
it is easier to consolidate information that way and reexplain it to everyone
I get you're saying payments are happening but if you share requests, I can understand what fund flow it even is
See this
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
that's my point, you're sharing one off things and I can't form a state from there. This was an Application Fee creation event
ok let's take a step back:
Payments are happening
ok where are you blocked next?
I think we aren't blocked anymore ... can you see this final request : req_2NyrSdlSJOSOO8
yes I can see that, a successful request, what did you want to learn about it