#xarvoit-connect-intro

1 messages · Page 1 of 1 (latest)

sick canyonBOT
carmine laurel
#

xarvoit-connect-intro

distant shoal
#

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

carmine laurel
sick canyonBOT
distant shoal
#

do I just make my donations a separate function with the fees enabled? It should probably be a payments route

dim cove
#

up to you really, we don't really have any opinion on how you build all of this