SwiftUser
SwiftUser

Reputation: 615

iOS/Firebase - Stripe Connect Account Verification

I've created Connected Accounts using Stripe Connect. The account is created, however, it is restricted due to:

INFORMATION NEEDED Identity document Owner's additional document

After messing around, I realised if I just go back and mess around with the settings I am then prompted to verify the account. Is there a way in which I can always demand verification when users sign up? I've looked at the documents, but they have not been much help to me.

This is my code:

exports.createConnectAccount = functions.https.onRequest((req, res) => {
  var data = req.body
  var email = data.email
  var response = {}
  stripe.accounts.create(
    {
      object: 'account',
      type: 'express',
      country: 'GB',
      business_type: 'individual',
      email: email,
      capabilities: {
          card_payments: {
            requested: true,
          },
          transfers: {
            requested: true,
          },
        },
    },
      function(err, account) {
        if (err) {
          console.log("Couldn't create stripe account: " + err)
          return res.send(err)
      }
      console.log("ACCOUNT: " + account.id)
      response.body = {success: account.id}
      return res.send(response)
      return admin.firestore().collection('vendors').doc(user.uid).set({account_id: account.id});
    }
  );
});

Upvotes: 0

Views: 156

Answers (1)

Paul Asjes
Paul Asjes

Reputation: 5857

Your code specifically creates Express accounts with the card_payments and transfers capabilities. In order for those capabilities to be active you'd need your user to provide additional information.

You can use the Account Links API to redirect your users to a Stripe hosted onboarding form which will collect all of this for you.

Upvotes: 0

Related Questions