#stan_connect-flow
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.
- stan-trees_code, 18 hours ago, 45 messages
- stan-trees_code, 1 day ago, 4 messages
- stan-trees_code, 1 day ago, 21 messages
- stan-trees_api, 1 day ago, 62 messages
đ 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/1240426009115758734
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
essentially i want to create a middleman system where i can take in the payments and then seller gives item to buyer, and then the seller can run a command to claim the money but im not sure how to be able to make it so that when the seller runs the command, it properly pays out to them
also im not sure what data i should be saving to a database, like ids and stuff
This is all really well documented. What have you tried so far?
i have this to store the buyer checkout
app.post('/webhook', bodyParser.raw({ type: 'application/json' }), async (request, response) => {
const payload = request.body;
const sig = request.headers['stripe-signature'];
let stripe = client.stripe
let event;
try {
event = stripe.webhooks.constructEvent(payload, sig, endpointSecret);
} catch (err) {
console.log(err.message)
return response.status(400).send(`Webhook Error: ${err.message}`);
}
if (event.type === 'checkout.session.completed') {
const sessionWithLineItems = await stripe.checkout.sessions.retrieve(
event.data.object.id,
{
expand: ['line_items', 'payment_intent'],
}
);
const lineItems = sessionWithLineItems;
fulfillOrder(lineItems.payment_intent);
}
response.status(200).end();
});```
im a little bit confused at the connected accounts idea, what exactly are they? is it an account created buy the "seller" in this case
i was just looking at that
does that mean i have to send a link for the seller to create his account?
also are connected accounts like the seller or is it connected to your account
Yes, to all 3
are connected accounts like the seller or is it connected to your account
? wdym yes
how would i get the connected id after the seller creates his account
or would i have to add an option for seller to input connected id
That depends on how you onboard them. There are a ton of docs covering different methods for doing this. They all branch off from the doc I already sent, so I would recommend getting a bit more familiar with those first.
Hate to give that answer, but these are well-documented and nuanced topics that don't have just 1 answer
alright thanks. last question, whats the difference between a connected accoutn and an account?
Connect accounts are accounts. The differences will be based on the type of Connect Account (express, custom, or standard)
ohh i see
stan_connect-flow
@zinc palm kind of, but integrating Connect is a lot of work. The first step would be to carefully read the docs end to end and pick the right integration path for your business model. Definitely not something you can do with a few Dashboard clicks!
hm alright, but that is something i'd have to do right
looking at this right now, is there any way for stripe to handle that for me? similar to the checkout process
like a way for me to have the onboarding process without designing frontend/ hosting domain etc
There's a lot we offer yes. We have a hosted onboarding flow, we have embedded components for it, etc.
ah nevermind, found it
// Set your secret key. Remember to switch to your live secret key in production.
// See your keys here: https://dashboard.stripe.com/apikeys
const stripe = require('stripe')('sk_test_51P3KZvJEoFgb8rxd8KFh7yOyLdtQP3TmZBDuxNJt4rhLboDbHoZc4DGWjeA38x2nquwC5UlbLGSEdEBsNHibjc9v00ewPO1Tqp');
const accountLink = await stripe.accountLinks.create({
account: '{{CONNECTED_ACCOUNT_ID}}',
refresh_url: 'https://example.com/refresh',
return_url: 'https://example.com/return',
type: 'account_onboarding',
collection_options: {
fields: 'eventually_due',
},
});``` why does the option to create an account require an account id?
wouldnt u get the id after onboaridng
It doesn't, you're going way too fast and not reading the docs honestly. That is an AccountLink, that is what you create to get a URL for onboarding an account you created before.
I'm sorry but it is important that you take a few hours and carefully read through those docs first end to end!
sorry im a bit confused, is onboarding not the process of creating an account?
You create an account first, and then you send the person through our onboarding flow to provide the information we need. So no they are 2 separate operations
ohh so i would need to do something like this