#mr-duck_api
1 messages ยท Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- mrduck_connect-account-capabilities, 1 day ago, 16 messages
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1252675415735009342
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Hello! The ID you provided is not a Stripe request ID (they start with req_). Where are you seeing this error?
hi
2024-06-18T17:26:03.613322+00:00 app[web.1]: Received request to authorize charge
2024-06-18T17:26:03.613323+00:00 app[web.1]: Customer ID: cus_QJLBLiLfmVkGXx
2024-06-18T17:26:03.613323+00:00 app[web.1]: Account ID: acct_1PRgEAP4krtm9tEj
2024-06-18T17:26:03.613323+00:00 app[web.1]: Amount: 10
2024-06-18T17:26:03.729975+00:00 app[web.1]: Retrieved payment methods: [
2024-06-18T17:26:03.729977+00:00 app[web.1]: {
2024-06-18T17:26:03.729978+00:00 app[web.1]: id: 'pm_1PSiVSP5dtDg92MqHyFmzj3V',
2024-06-18T17:26:03.729978+00:00 app[web.1]: object: 'payment_method',
2024-06-18T17:26:03.729978+00:00 app[web.1]: allow_redisplay: 'unspecified',
2024-06-18T17:26:03.729979+00:00 app[web.1]: billing_details: { address: [Object], email:
2024-06-18T17:26:03.729983+00:00 app[web.1]: created: 1718642050,
2024-06-18T17:26:03.729983+00:00 app[web.1]: customer: 'cus_QJLBLiLfmVkGXx',
2024-06-18T17:26:03.729984+00:00 app[web.1]: livemode: false,
2024-06-18T17:26:03.729984+00:00 app[web.1]: metadata: {},
2024-06-18T17:26:03.729984+00:00 app[web.1]: radar_options: {},
2024-06-18T17:26:03.729984+00:00 app[web.1]: type: 'card'
2024-06-18T17:26:03.729984+00:00 app[web.1]: }
2024-06-18T17:26:03.729984+00:00 app[web.1]: ]
2024-06-18T17:26:04.250591+00:00 heroku[router]: at=info method=POST path="/api/authorize-charge" host=tutredstage-266226951372.herokuapp.com request_id=c65be347-77b6-4ff2-8e4f-f094d3dd9dff fwd="24.64.55.46" dyno=web.1 connect=1ms service=640ms status=500 bytes=422 protocol=https
2024-06-18T17:26:04.249367+00:00 app[web.1]: Error in authorize-charge endpoint: StripeInvalidRequestError: Your destination account needs to have at least one of the following capabilities enabled: transfers, crypto_transfers, legacy_payments
2024-06-18T17:26:04.249460+00:00 app[web.1]: at StripeError.generate (/app/node_modules/stripe/lib/Error.js:10:20)
2024-06-18T17:26:04.249463+00:00 app[web.1]: at res.toJSON.then.Error_1.StripeAPIError.message (/app/node_modules/stripe/lib/RequestSender.js:105:51)
2024-06-18T17:26:04.249464+00:00 app[web.1]: at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
2024-06-18T17:26:04.249465+00:00 app[web.1]: type: 'StripeInvalidRequestError',
2024-06-18T17:26:04.249466+00:00 app[web.1]: raw: {
2024-06-18T17:26:04.249467+00:00 app[web.1]: code: 'insufficient_capabilities_for_transfer',
2024-06-18T17:26:04.249468+00:00 app[web.1]: message: 'Your destination account needs to have at least one of the following capabilities enabled: transfers, crypto_transfers, legacy_payments',
Essentailly
I am just trying to test a payment
but I am getting an error that in stripe
we have not turned on transfers, crypto transfers or legacy payments
and im unsure as of where to turn this on
We have documentation about account capabilities here that should be helpful: https://docs.stripe.com/connect/account-capabilities
Typically you request the capabilities you want when you create the account via the API.
Those capabilities will then be enabled when onboarding completes successfully.
gotcha so what you are suggesting is that when we are onboarding, you add these so for example if I were to add the fix from the documentation, id make a new account to test it
the other question is yesterday anotehr member of the Stripe team told me that
i needed some extra verifications on my accoutn to turn it on so I did, i was wondering if there is anything i can do manually from the stripe dashboard to give these accounts the capabilities
just for testing purposes
You can update an existing account and add capabilities to it as well: https://docs.stripe.com/api/accounts/update#update_account-capabilities
In test mode you need to request the capabilities, but you shouldn't need to actually complete onboarding to use the account in test mode.
What is "this accountID" referring to?
I'm not sure what you're asking though, there's no context. Are you creating an account? Updating an existing account? Making a payment? Something else?
adding the permission for the credit card. Essentially, I want to add the credit card to an existing account
*add the ability to transfer with the credit card
If you're updating an existing account with a new capability you need to specify the ID of the connected account you want to update.
where can i find the specific id of the connected account from the dashboard?
like for example the
Those are Customers, not Accounts.
You can see your connected accounts in test mode here: https://dashboard.stripe.com/test/connect/accounts/overview
If you click on one, there's a Copy ID button in the top right.
Ooooo gotcha thank you so much! imma go try that out
it seems that
its still not been turned on
does this need to be filled out?? even for test?
it seems that transfers are inactive?
what does proof of liveness mean?
If this is in test mode that shouldn't matter, you should still be able to use the account in test mode just fine.
Have you retried the operation you tried before that gave you the error?
Hi sorry so yeah I managed to get the transfers for the Tutor account to show payments and transfers are active
which is good
However, I cant seem to be able to see the
sun@gmail.com on the connect page
Essentially thsi account would be making the request from a tutor, YandhiTutor
but i cant seem to be able to turn the transfers on for him
because i dont see him under the conenctpage
Customers and Accounts are completely separate things.
They're not directly related to each other.
Customers are people who pay you. Connected Accounts are for people and businesses that get money from your platform.
i was able to go through here on the settings
capabilities
and then turn on the card payments
how can i do that for the sun@gmail.com?
im just trying to get the sun@gmail.com to transfer money to the yandhi tutor account
What do you mean by "transfer money"?
Use the stripe trasnfer, to pay the yandhi tutor. It is a tutoring app, where the student can book the tutor. Therefore the student must pay the tutor
ive sent the error log from my server, it seems that the custoemr side doesnt have the permissions
Okay, so sun@gmail.com is the Customer (student) and the Yandhi tutor is the connected Account, right?
yep exactly
Okay, so Customers don't have capabilities like Accounts do. Customers pay using things like cards, bank accounts, etc. You can use Connect funds flows to send all or part of those payments to the connected account.
Have a look here: https://docs.stripe.com/connect/collect-then-transfer-guide
ok one second
i dont want to use the stripe interface tho
we have our own one here
Remember, this is a public server and a public channel, you might want to edit or delete your message to remove your test secret key.
oh thank you
What do you mean by not wanting to use the Stirpe interface? For what part exactly?
so essentailly, I want to use the current existing paymentMethod that we have implemented, and to not have the Stripe one open if that makes sense
it seems that with the link above that is what happens?
to start with
*that sorry
and then that ended up making a new account in my stripe connect, which i believe is correct
Flagging you shared your secret key again.
Sorry, I'm not really following what you're asking. You're saying you have a Customer with a saved Payment Method you collected earlier, and you want to charge that Payment Method and send some or all of that charge to the tutor?
Ok so essentially,
I have a customer with a saved paymentMethod, its just a test card we got off the stripe.
I also have a tutor that should collect a specific money everytime a customer books him.
It seems the tutor has their payment and transfers set up.
I want the customer to get charged if they book the tutor, and for us to collect the money, and then pay out the tutor
So you want to charge the saved Payment Method when the Customer isn't around, right?
Meaning it's an off-session payment?
sure, or if they are too. That part isnt super important tbh, just getting the customer and tutor and mine payment connection is the key priority to start with, whatever is the simplest and then i can tweak it as necessary
The first step is to decide what charge type you want to use for Connect: https://docs.stripe.com/connect/charges
btw i really really appreciate how understanding you are with me, I am a python AI dev but the manager was low on employees so i got tasked with frontend javascript stripe payments. Just like a small thank you
Happy to help!
It would be destination charges
Okay, follow this guide to create a destination charge: https://docs.stripe.com/connect/destination-charges
So i talked w my manager and he said we are taking a comission off the money the students are paying to tutors so it would be that I believe
You probably want the Custom flow tab on that page.
You can take a portion of the payment with all of the charge flows.
gotcha question. Im going to start building this one then, but I am wondering since you kind of understand/know this more, is there a way that if I contact support I can speak to you again?
You can't get to me specifically again, but the other members of my team staff this Discord server on weekdays.
ahhh ok. Im going to start this, thank you. Is there anything else I need to know outside of what is the link you sent above? like any other link that would be necessary or just that
There's a lot, yeah, Connect is quite complicated. There's a good overview page here: https://docs.stripe.com/connect/overview
Also, Connect is built on top of other things, like Stripe payments, so a lot of the other documentation about payment applies.
-d currency=usd
-d "automatic_payment_methods[enabled]"=true
-d application_fee_amount=123
-d "transfer_data[destination]"={{CONNECTED_ACCOUNT_ID}}
When it comes to the connected_account_id, this should be my own account_id, like the main tutored one correct? or is it like one of those case my case type things
No, that's the connected account, the tutor's account in your case.
ok thank you
That's where you want to send some/all of the funds.
No, thank you though. ๐
You can leave feedback in the #1211832777608273960 channel if you want though.
will do tyms
Hey so
"error": {
"code": "insufficient_capabilities_for_transfer",
"message": "Your destination account needs to have at least one of the following capabilities enabled: transfers, crypto_transfers, legacy_payments",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_RvDIVl0qDsoGwY?t=1718735875",
"type": "invalid_request_error"
I tried setting it up with my own connectedId
like the one for the main account
and i am getting this error again, is there something else i need to turn on, this is my own main account
That request is trying to create a Payment Intent on a connected account, which is a direct charge. The connected account is a Custom account, and direct charges aren't recommended for Custom accounts. Also, you're specifying a destination account in the request, which won't really work. You can't do both a direct and destination charge at the same time like that.
If you're using Custom accounts you should use destination charges, which means you need to create the Payment Intent on your platform account, not on a connected account.
Ok so a connected account is one of the tutors account to confirm right?
and its a custom account, meaning it was made without using all of the stripe like required fields
A Custom account means you're responsible for providing all of the required info via the API, which typically means you need to do a lot of work to build an onboarding UI, manage the accounts, etc. Custom accounts are not recommended unless you want to put in a lot of work to build your integration.
ah so your suggestion would be to use the stripe ui right?
Yes. I know you're trying to get something up and running quickly, but Connect is very powerful, very complicated, and requires a lot of understanding about how it works before you can build anything that works correctly. I know it doesn't seem like it, but the fastest way to get to something that works is to spend a ton of time reading the docs and understanding how everything works before writing a single line of code.
yeah i believe so too. I will go and try that. Thank you so much
Happy to help!
So im reading htis documentation right
Its under that
and Im trying to put the connected_account_id as the one from my main one, and its giving me an error
"message": "No such destination: '{{asdfasdfasdf}}'",
"param": "transfer_data[destination]",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_jdfPgnfH0hDoNA?t=1718736829",
"type": "invalid_request_error"
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 asdf being the account_id
but i thought the account_id would be the one from my main account
Hello
Rubeus had to step away, I can help take a look
one sec
Have you deleted the account?
That's a different account ID than the one you're setting in the request..
https://dashboard.stripe.com/test/logs/req_jdfPgnfH0hDoNA
acct_1PLWE7P5dtDg92M vs acct_1PLWE7P5dtDg92Mq
cct_1PLWE7P5dtDg92Mq}}
{
"error": {
"code": "resource_missing",
"doc_url": "https://stripe.com/docs/error-codes/resource-missing",
"message": "No such destination: '{{acct_1PLWE7P5dtDg92Mq}}'",
"param": "transfer_data[destination]",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_GvedaaoYuq9Tbw?t=1718737097",
"type": "invalid_request_error"
}
}
i added the q too
it seems it still doesnt send it?
Also, if you look at the request body then you'd see {{ }} is being passed into the string
You'd need to take that out
ohhh gotcha
t_1PLWE7P5dtDg92Mq
{
"error": {
"message": "The 'transfer_data[destination]' param cannot be set to your own account.",
"param": "transfer_data[destination]",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_BLCDvBqf0dQ1wK?t=1718737147",
"type": "invalid_request_error"
}
}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
im just copying this code from here
So i expalined it to Ruebus but
essentially
I am making a tutoring app
and the way the money should work is
the customers pay us, we pay the tutors and take a cut
and he suggested the link above
so im guessing what i need to do is to make a connected account as well?
and then use that to send hte payments to?
is that on the right note now?
just reading some more docs
So just copying the code won't work ๐
As Rubeus mentioned, you'd need to read through the docs to understand Stripe Connect concepts.
The reason you're seeing this error is because you're setting the platform account ID as the destination here. Take a step back.
You're trying to create destination charges, meaning the funds will settle on the platform account and after deducting the fees - a transfer would be made to a connected account.
So in your case;
acct_1PLWE7P5dtDg92Mqis your platform account (the API key you're using to make the request)- A tutor would need their own separate connected account
- Once that account has been created and onboarded, you'd need to set its account ID as the destination
yep so right now the tutor do have a connectedAccount, well this one tutor im experimenting with does
so im guessing I need to make a connected account as well like for myself
and then that will be the main hub that all money is transferred to?
is that right?
Not really, your platform account is the "hub" here
ohhhh gotcha
We have an end to end guide here for destination charges: https://docs.stripe.com/connect/collect-then-transfer-guide
It shows exactly how you can set up destination charges with express connected accounts
the ones that say with command line, i can turn them into like javascript code as well right and pass in different parameters? As in, for example lets say i do one with the command line, but i get another tutor
You can use the dropdown selector to switch example to a different language
Ohhhh awesome thank you
what about the customer tho? Am i understadning right that the customer would pay me, then id pay the tutor?
bc i managed to get the tutor one working now with this command but as Rubeus was saying
the customer itself is not a connect member
That's step 4