Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Customize business_type in connect onboarding

Steven Tey2894dfd55b8b
diff --git a/apps/web/lib/stripe/create-connected-account.ts b/apps/web/lib/stripe/create-connected-account.ts
index 3930d6bbdf..2447203e30 100644
--- a/apps/web/lib/stripe/create-connected-account.ts
+++ b/apps/web/lib/stripe/create-connected-account.ts
@@ -6,15 +6,17 @@ export const createConnectedAccount = async ({
name,
email,
country,
+ businessType = "individual",
}: Pick<z.infer<typeof onboardPartnerSchema>, "name" | "country"> & {
email: string;
+ businessType?: "individual" | "company";
}) => {
const [firstName, lastName] = name.split(" ");
try {
return await stripe.accounts.create({
type: "express",
- business_type: "individual",
+ business_type: businessType,
email,
country,
individual: {