0

how to i direct my vendor to this stripe payout page after I onboard them use the account API?

we are a marketplace with many vendor. i wanted to create a button on the vendor(connected account) page and when they click on the button on our dashboard. it goes to the vendor stripe page but I just cant get the connect account URL for the vendor.

return stripe.accountLinks.create({
  type: "account_onboarding",
  account: accountID,
  refresh_url: `${origin}/`,
  return_url: `${origin}/`,
});

example link: https://connect.stripe.com/express/m7ucEu2cZPbD

enter image description here

phongyewtong
  • 5,085
  • 13
  • 56
  • 81

1 Answers1

0

Depends on your web server, but you'd just redirect the user when you're ready.

For instance, in express you'd do something like:

const accountLink = await stripe.accountLinks.create({
  type: "account_onboarding",
  account: accountID,
  refresh_url: `${origin}/`,
  return_url: `${origin}/`,
});

res.redirect(accountLink.url);

There's more examples with other Node frameworks here: Nodejs - Redirect url

Paul Asjes
  • 5,361
  • 1
  • 18
  • 20
  • how do i get the url account page of the vendor? – phongyewtong Sep 28 '20 at 03:57
  • I'm not sure what you mean by vendor here. Do you mean connected account? If so you can use the Stripe-Account header to make requests on behalf of a connected account: https://stripe.com/docs/api/connected_accounts – Paul Asjes Sep 29 '20 at 00:33
  • we are a marketplace with many vendor. i wanted to ceate a button on the vendor(connected account) page and when they click on the button on our dashboard. it goes to the vendor stripe page but I just cant get the connect account URL for the vendor. – phongyewtong Sep 29 '20 at 01:08