How can I set up a test, Stripe connect account on the backend and skip onboarding?

Solution 1:

Here's the config that works for me:

async function createTestStripeAccount() {
  return await stripe.accounts.create({
    type: 'custom',
    country: 'US',
    capabilities: {
      card_payments: { requested: true },
      transfers: { requested: true }
    },
    business_type: 'individual',
    external_account: {
      object: 'bank_account',
      country: 'US',
      currency: 'usd',
      routing_number: '110000000',
      account_number: '000123456789'
    },
    tos_acceptance: { date: 1609798905, ip: '8.8.8.8' },
    business_profile: { mcc: 5045, url: 'https://bestcookieco.com' },
    individual: {
      first_name: 'Test',
      last_name: 'User',
      phone: '+16505551234',
      email: '[email protected]',
      id_number: '222222222',
      address: {
        line1: '123 State St',
        city: 'Schenectady',
        postal_code: '12345',
        state: 'NY'
      },
      dob: {
        day: 10,
        month: 11,
        year: 1980
      }
    }
  })
}