npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@sponsorkit/stripe-onboarder

v1.3.11

Published

Automate onboarding Stripe Connect Express accounts using Puppeteer

Downloads

28

Readme

About this fork

This fork resolves numerous issues with the original library (detailed here). It has way more unit/integration tests and bug-fixes to ensure stability, and will be kept up to date regularly.

Stripe Onboarder

npm version Test

Automate the onboarding of Stripe Express accounts using Puppeteer. This is intended to be used in Stripe's test mode to onboard verified Connect accounts without having to manually complete the onboarding process.

stripe-onboarder

Onboarding accounts with the card_payments and transfers capabilities are supported. Please open an issue if the onboarder is not working with your account's requested capabilities.

Installation

Install the package with:

npm install stripe-onboarder
# or
yarn add stripe-onboarder

CLI Usage

Onboard an Express account using the following command:

stripe-onboarder onboard [url]

Arguments

| Name | Description | | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [url] | Optional Account Link url or an OAuth link. If omitted, a new Express Account and Account Link can be created by providing your Stripe secret API key via the STRIPE_SECRET_KEY environment variable or when prompted by the CLI. |

Options

Default values are provided for all options that will allow the Express account to pass verifications: https://stripe.com/docs/connect/testing

| Name | Default | | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | | --account_number | "000123456789" | | --address.line1 | "address_full_match" | | --address.line2 | | | --address.city | "Beverly Hills" | | --address.state | "CA" | | --address.zip | "90210" | | --business_type | "company" | | --company_name | Random company name | | --company_phone | "0000000000" | | --company_tax_id | "000000000" | | --company_url | Random URL | | --country | "US" | | --date_of_birth | "01011901" | | --email | Random email | | --first_name | Random first name | | --headless | true | | --id_number | "000000000" | | --last_name | Random last name | | --phone | "0000000000" | | --routing_number | "110000000" | | --ssn_last_4 | "0000" | | --title | Random job title |

Programmatic Usage

import { onboard } from "stripe-onboarder";

const account = await stripe.accounts.create({ type: "express" });

const accountLink = await stripe.accountLinks.create({
  account: account.id,
  type: "account_onboarding",
});

await onboard({
  headless: false, // Boolean flag for Puppeteer to run browser in headless mode. Defaults to true.
  url: accountLink.url, // Account Link URL for onboarding
  values: {}, // Optional object of onboarding form values to override default values
});

Note Immediately after the promise returned by the onboard function is resolved, the Connect account's status will be "Pending" which means the account is still being verified by Stripe. This can take up to a few minutes to complete. You can poll retrieving the account to check if the account has charges_enabled and payouts_enabled.

Contributing

Please read CONTRIBUTING.md to learn about contributing to this project.