【问题标题】:Stripe connect onboarding test data for standard accounts标准账户的 Stripe Connect 入职测试数据
【发布时间】:2023-01-30 09:45:55
【问题描述】:

我正在尝试按照此文档设置 Stripe Connect:https://stripe.com/docs/connect/enable-payment-acceptance-guide?platform=web&ui=checkout#create-account-link

在帐户链接阶段,它将我重定向到 Stripe 以创建帐户等 - 出于开发目的,我想跳过这个而不是每次都输入真实数据。

我偶然发现了这个用于测试 Stripe 的文档:https://stripe.com/docs/connect/testing 它说有一种方法可以强制跳过,但我没有看到任何弹出窗口。我需要传递一个特殊值来启用强制跳过选项吗?

这是我用来测试帐户链接的代码 sn-ps


const stripe = new Stripe(secrets.STRIPE_SECRET_KEY, {
  apiVersion: "2022-11-15"
});

export class StripeClient {
  /**
   * Create a Stripe account for a user. The account will be associated with the ZCal account
   */
  static accountCreationRequest = async (): Promise<Stripe.Response<Stripe.Account>> => {
    const account: Stripe.Response<Stripe.Account> = await stripe.accounts.create({
        type: "standard"
      });
    return account;
  };

  static accountLinkRequest = async (stripeAccountId: string): Promise<Stripe.Response<Stripe.AccountLink>> => {
    const accountLink: Stripe.Response<Stripe.AccountLink> = await stripe.accountLinks.create({
      account: stripeAccountId,
      refresh_url: `${config.CLIENT_BASE_URL}/account/integrations`,
      return_url: `${config.CLIENT_BASE_URL}/account/integrations`,
      type: "account_onboarding"
    });
    return accountLink;
  };

}

【问题讨论】:

    标签: stripe-payments


    【解决方案1】:

    测试文档上的“强制跳过”行是针对 OAuth 流程的,它与您的 Onboarding 流程无关,所以首先让我们忽略它。

    当您第一次请求创建帐户时,您可以prefill as much information as you want,稍后将自动填充到流程中。这是fillable fields的完整列表。

    您可以预先填写账户中的任何信息,包括个人信息 和业务信息、外部帐户信息等。

    【讨论】:

      猜你喜欢
      • 2021-08-16
      • 2021-06-15
      • 2023-01-27
      • 2021-07-15
      • 1970-01-01
      • 1970-01-01
      • 2021-03-06
      • 2019-08-17
      • 2020-06-06
      相关资源
      最近更新 更多