#mr-duck_api

1 messages ยท Page 1 of 1 (latest)

grave boneBOT
buoyant capeBOT
#

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.

grave boneBOT
#

๐Ÿ‘‹ 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.

edgy saffron
#

Hello! The ID you provided is not a Stripe request ID (they start with req_). Where are you seeing this error?

woeful mason
#

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

edgy saffron
#

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.

woeful mason
#

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

edgy saffron
#

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.

woeful mason
#

would this accountID be my main one

#

or the customer to customer one

edgy saffron
#

What is "this accountID" referring to?

woeful mason
#

"id": "acct_1Nv0FGQ9RKHgCVdK",

#

like that

#

the acct

edgy saffron
#

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?

woeful mason
#

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

edgy saffron
#

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.

woeful mason
#

where can i find the specific id of the connected account from the dashboard?

#

like for example the

edgy saffron
#

Those are Customers, not Accounts.

#

If you click on one, there's a Copy ID button in the top right.

woeful mason
#

Ooooo gotcha thank you so much! imma go try that out

edgy saffron
woeful mason
#

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?

edgy saffron
#

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?

woeful mason
#

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

#

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

edgy saffron
#

Customers and Accounts are completely separate things.

#

They're not directly related to each other.

woeful mason
#

as in

edgy saffron
#

Customers are people who pay you. Connected Accounts are for people and businesses that get money from your platform.

woeful mason
#

i was able to go through here on the settings

#

capabilities

#

and then turn on the card payments

edgy saffron
#

You can't.

#

What is your ultimate goal? What are you trying to build?

woeful mason
#

im just trying to get the sun@gmail.com to transfer money to the yandhi tutor account

edgy saffron
#

What do you mean by "transfer money"?

woeful mason
#

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

edgy saffron
#

Okay, so sun@gmail.com is the Customer (student) and the Yandhi tutor is the connected Account, right?

woeful mason
#

yep exactly

edgy saffron
#

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.

woeful mason
#

ok one second

#

i dont want to use the stripe interface tho

#

we have our own one here

edgy saffron
#

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.

woeful mason
#

oh thank you

edgy saffron
#

What do you mean by not wanting to use the Stirpe interface? For what part exactly?

woeful mason
#

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

edgy saffron
#

Flagging you shared your secret key again.

woeful mason
#

oh whoops

#

thank you

edgy saffron
#

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?

woeful mason
#

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

edgy saffron
#

So you want to charge the saved Payment Method when the Customer isn't around, right?

#

Meaning it's an off-session payment?

woeful mason
#

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

edgy saffron
woeful mason
#

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

edgy saffron
#

Happy to help!

woeful mason
#

It would be destination charges

edgy saffron
woeful mason
#

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

edgy saffron
#

You probably want the Custom flow tab on that page.

#

You can take a portion of the payment with all of the charge flows.

woeful mason
#

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?

edgy saffron
#

You can't get to me specifically again, but the other members of my team staff this Discord server on weekdays.

woeful mason
#

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

edgy saffron
#

Also, Connect is built on top of other things, like Stripe payments, so a lot of the other documentation about payment applies.

woeful mason
#

-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

edgy saffron
#

No, that's the connected account, the tutor's account in your case.

woeful mason
#

ok thank you

edgy saffron
#

That's where you want to send some/all of the funds.

woeful mason
#

yep yep

#

thank u

#

u are awesome

#

do u guys accept tips or anything or nah

edgy saffron
#

No, thank you though. ๐Ÿ™‚

woeful mason
#

cause u deserve it bro

#

thank you

edgy saffron
woeful mason
#

will do tyms

#

Hey so

#

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

edgy saffron
#

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.

grave boneBOT
woeful mason
#

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

edgy saffron
#

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.

woeful mason
#

ah so your suggestion would be to use the stripe ui right?

edgy saffron
#

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.

woeful mason
#

yeah i believe so too. I will go and try that. Thank you so much

edgy saffron
#

Happy to help!

woeful mason
#

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

#

^that asdf being the account_id

#

but i thought the account_id would be the one from my main account

sly cliff
#

Hello
Rubeus had to step away, I can help take a look

woeful mason
#

all good

#

thank you

sly cliff
#

What's the account ID you're setting in the request?

#

Is it acct_1PLWE7P5dtDg92M ?

woeful mason
#

one sec

sly cliff
#

Have you deleted the account?

woeful mason
#

yep

#

thats hte account

#

nope

sly cliff
woeful mason
#

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"
}
}

Learn more about error codes and how to resolve them.

#

i added the q too

#

it seems it still doesnt send it?

sly cliff
#

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

woeful mason
#

ohhh gotcha

#

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

sly cliff
#

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_1PLWE7P5dtDg92Mq is 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
woeful mason
#

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?

sly cliff
#

Not really, your platform account is the "hub" here

woeful mason
#

ohhhh gotcha

sly cliff
woeful mason
#

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

sly cliff
#

You can use the dropdown selector to switch example to a different language

woeful mason
#

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

sly cliff
#

That's step 4

woeful mason
#

gotcha. Imma go read the docs then hahahah seems like my answers are there

#

can u keep this chat open tho before closing it rn