#guimatos_api

1 messages ¡ Page 1 of 1 (latest)

wild garnetBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1354079692159979571

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

unreal fossil
#

I already use the collectionOptions, works in the first time, but now the documents steps is not loading anymore and the creation of accounts are still with "Restricted" label

#
exports.createSessionAccount = functions.region("southamerica-east1").https.onCall(async (data, context) => {
  // Check if the user is authenticated
  try {
    // Uncomment and use the below line if user ID is passed in the function context
    // const uid = context.auth.uid; // Get the user ID from the context
    const {uid} = context.auth; // Assume the user ID is passed through the data payload

    const userData = await admin.firestore().collection("users").doc(uid).get();

    if (!userData?.data()?.stripeAccountId) throw new Error('No stripe account id configured');

    const {stripeAccountId} = userData.data();

    const accountSession = await stripe.accountSessions.create({
      account: stripeAccountId, // Ensure correct casing and data key names
      components: {
        account_onboarding: {
          enabled: true,
          features: {
            external_account_collection: false,
          },
        },
        documents: {
          enabled: true,
          features: {},
        },
      },
    });

    // Return the session details and user info in the object
    return {
      message: "Stripe account session created successfully.",
      clientSecret: accountSession.client_secret,
      userId: uid,
    };
  }
});
#
        <ConnectComponentsProvider 
          connectInstance={stripeConnectInstance}
        >
          <ConnectAccountOnboarding
            onExit={(exitData) => handleNextStep(exitData)}
            collectionOptions={{
              fields: 'eventually_due',
              futureRequirements: 'include',
            }}
          />
        </ConnectComponentsProvider>

#
const stripe = require("stripe")(functions.config().stripe.secret);
const admin = require("firebase-admin");
exports.createSessionAccount = functions.region("southamerica-east1").https.onCall(async (data, context) => {
  // Check if the user is authenticated
  try {
    const {uid} = context.auth; // Assume the user ID is passed through the data payload

    const userData = await admin.firestore().collection("users").doc(uid).get();

    if (!userData?.data()?.stripeAccountId) throw new Error('No stripe account id configured');

    const {stripeAccountId} = userData.data();

    const accountSession = await stripe.accountSessions.create({
      account: stripeAccountId, // Ensure correct casing and data key names
      components: {
        account_onboarding: {
          enabled: true,
          features: {
            external_account_collection: false,
          },
        },
        documents: {
          enabled: true,
          features: {},
        },
      },
    });

    // Return the session details and user info in the object
    return {
      message: "Stripe account session created successfully.",
      clientSecret: accountSession.client_secret,
      userId: uid,
    };
  } catch (error) {}
});
green hearth
#

Yes, it looks like in the latest account.updated event that there was an issue with the test verification document and that needs to be re-uploaded.

#

You're saying the embedded components are not prompting for this?

unreal fossil
#

Exactly. Even using the collectionOptions, is not prompting

green hearth
#

I'm wondering if this verification is considered post-onboarding

#

My understanding is that this is what's to be used to resolve post-onboarding verification issues with submitted data.

unreal fossil
#

still getting this version on move to onboarding

#

Yesterday, it works well

#

and also yesterday the client was able to see the aditional document

#

now, this steps are aways skiped

green hearth
#

This is with the notification banner component?

#

And are you able to reliably reproduce this state with each new account, or is it only intermittent / affecting some test accounts?

#

Test mode behaviour should be consistent/deterministic, so i hope so