如何为用户创建一个Stripe帐户初始化Stripe Connect Express会话? [英] How to initialize a Stripe Connect Express session for user to create a Stripe account?

查看:31
本文介绍了如何为用户创建一个Stripe帐户初始化Stripe Connect Express会话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我尝试将Stripe Connect与Express帐户一起使用.我在此处中查看了文档.我在入门时遇到了一些麻烦.我已经能够毫无问题地使用Stripe Checkout,但是我无法将用户重定向到Stripe,因此他们可以创建一个帐户在我的平台上出售.我一直在玩它,这是到目前为止的代码:

So I am trying to use Stripe Connect with Express accounts. I've had a look at the documentation located here. I am having some trouble getting started. I've been able to use Stripe Checkout without a problem, but I'm not able to redirect a user to Stripe so they can create an account to sell on my platform. I've been playing around with it, and this is the code that I have so far:

export const sellerOnboard = async () => {
  try {
    await stripe.accounts.create({
      type: 'express'
    });
  } catch (err) {
    console.log(err);
  }
};

当在前端按下某些文本时,

sellerOnboard被调用,但是什么也没有发生.有什么想法吗?

sellerOnboard gets called when some text gets pressed on the front end, but nothing happens. Any ideas?

推荐答案

您需要创建一个帐户链接并将其重定向到该链接,以便他们可以完成入职:

You need to create an Account Link and redirect them to it so they can finish onboarding: https://stripe.com/docs/connect/express-accounts#create-link

这篇关于如何为用户创建一个Stripe帐户初始化Stripe Connect Express会话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆