#ortegagroup_code

1 messages · Page 1 of 1 (latest)

sour minnowBOT
#

👋 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/1295839399589842976

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

fluid marsh
#

Hi pgskc

carmine star
#

Hi, can you confirm if you're tyring to send funds to the connected accounts? Or, something else? Can you share a bit more? The above endpoint you're using is attemtping to update the account and not move any funds.

fluid marsh
#

Yes, update the account because it only had this:

const paymentIntent = await stripe.paymentIntents.create({
amount: Math.round(amountTotal*100),
currency: currency,
customer: customerId,
payment_method_types: ['card'],
automatic_payment_methods: { enabled: automatic_payment_methods, },
off_session: true,
transfer_data: {
destination: account.id,
},
});

But the log I get from Stripe shows me this:

Your destination account needs to have at least one of the following capabilities enabled: transfers, crypto_transfers, legacy_payments

#

So after this registration, I implemented that the account is first updated before transferring the funds to the connected account but this does not happen.

carmine star
fluid marsh
#

What I want to achieve is that the payment goes to the corresponding connected account but I can't even do it with the test mode.

fluid marsh
carmine star
#

The reason why that code does not work is because your connected account does not have the transfers capability.

#

You need to request that capability when you create the account/ update the account.

#

It should all work in test mode fine.

#

I tested this on my end just now, and it just works.

fluid marsh
#

Sorry

#

How does it work?

carmine star
#

Your code would look something the this:

const account = await stripe.accounts.create({
country: 'US',
type: 'account type you choose',
capabilities: {
card_payments: {
requested: true,
},
transfers: {
requested: true,
},
},
business_profile: {
url: 'https://example.com',
},
});

fluid marsh
#

Should I create the account from code and not the dashboard?

carmine star
#

Then, you use the payment intent creation and pass that account id on the transfer data.

#

Yes

fluid marsh
#

I need two accounts, one for each location. The implementation I want to achieve is that each franchise has its own account but they are all connected to one (where each client is registered_

#

The checkout endpoint receives the “location” parameter as the request body, where it detects to which account the payment corresponding to the purchase made by the customer will go.

#

I don't understand what I'm doing wrong

#

I'm getting frustrated

carmine star
#

What does 'checkout endpoint' mean?

#

I'm happy to unblock you if you try the above and see where you're stuck there.

#

I'm closing this channel soon. Please try the above steps and we will be back in a few hours to further assist if you're still seeing issues.

fluid marsh
#

No

carmine star
#

Can you share more?

fluid marsh
#

Please don't close the channel, I'm now correcting the endpoint to continue with the steps you told me.

carmine star
#

Ok!

#

I'm happy to keep this open for a bit.

fluid marsh
#

Can I share the endpoint with you?

carmine star
fluid marsh
#

Now I share it with you

carmine star
#

Ok!

fluid marsh
#

Give a few minutes

carmine star
#

Sure, I need to run in 5 minutes. The channel is already closed but I will keep it for 5 more minutes.

fluid marsh
#

The ID is

carmine star
#

My teammate will be online in a few hours to assist further

fluid marsh
#

req_zPx50DV8ya2tnp

#

Okey, thank you

carmine star
#

The error on that request is different, can you take out off_session and create it again?

fluid marsh
#

If I just did that, I'm compiling

#

Yes, but as you can see, it appears that the capabilities are disabled.

#

Check

#

"capabilities": {
"card_payments": "inactive",
"transfers": "inactive"
},

#

Therefore I will not be able to make the payment.

#

I was able to achieve it

#

Now I look at the board to see if it was successful.

#

Oh my godness

carmine star
#

Glad to hear it is working now!

#

Are you fully unblocked now?

fluid marsh
#

I have a other question

#

Yes, i'm unblocked now haha

carmine star
#

What is your other question?

#

How can I further help?

fluid marsh
#

Do I need to upload all the information for the account connected by code?

carmine star
#

What information are you referring? What do you mean by upload?

fluid marsh
#

As you can see right now, I compiled 3 times, therefore 3 accounts were created for the same location.

carmine star
#

you can pass in the data there to test these

#

I really need to step away soon, if you have any last minute questions I'm happy to answer them.

#

If not, my teammate will be here in a few hours.

fluid marsh
#

It's okay, no problem. You helped me a lot with the advice you gave me. I really appreciate it.

#

Have a great day

carmine star
#

You as well!

#

I'm glad you're unblocked.

fluid marsh
#

If you can keep the chat open so as not to open another chat

carmine star
#

You would need to create another chat.

fluid marsh
#

Ok, no problem. Thank you