#xarvoit-connect-intro
1 messages · Page 1 of 1 (latest)
Your platform profile is recommending that you create/use Standard connect accounts with direct charges - you'll want to read through these docs:
xarvoit-connect-intro
So I've taken care of the creation of standard accounts with this code:
const functions = require('@google-cloud/functions-framework');
const stripe = require('stripe')(process.env.STRIPE_KEY)
functions.http('stripeOnboarding', async (req, res) => {
try {
const account = await stripe.accounts.create({
type: 'standard',
country: 'US',
capabilities: {
card_payments: {
requested: true,
},
transfers: {
requested: true,
}
}
});
const accountLink = await stripe.accountLinks.create({
account: account.id,
refresh_url: `https://${req.get('host')}/createCandidate`,
return_url: `https://${req.get('host')}/mainHome`,
type: 'account_onboarding',
});
res.redirect(302, accountLink.url)
} catch (error) {
//console.error(error);
throw error;
}
});
but I don't understand how to connect existing Stripe accounts and add it to my platform. Also I don't need a checkout since its a donation based thing taking a fee is all that I care about
Ah right, I forgot about the existing accuonts - for existing accounts you'll want to connect them with oauth https://stripe.com/docs/connect/oauth-reference
do I just make my donations a separate function with the fees enabled? It should probably be a payments route
up to you really, we don't really have any opinion on how you build all of this