#sebastian_api

1 messages ยท Page 1 of 1 (latest)

icy shoreBOT
#

๐Ÿ‘‹ 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/1270058008260509817

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

small glen
#

So Ill elaborate more in detail here

dry tiger
#

Hi ๐Ÿ‘‹

I need help understanding every part of the Stripe Connect onboarding process for custom individual accounts

We focus on helping developers with specific questions about integrating with Stripe APIs. I am happy to discuss the API calls around Stripe onboarding but we strongly recommend reviewing our docs on onboarding to ensure you get a full picture

https://docs.stripe.com/connect/onboarding

small glen
#

I am doing the stripe account custom onboarding. I already have a lot of the individual info submitted. Now under the requirements property, it says I have to still submit
"business_profile.mcc",
"business_profile.url"

I dont see how these are relevant to an individual account

dry tiger
#

As to the why this info is required, that I cannot help with. As I said, we focus on helping developers coding integrations. That means I'm mostly focused on the how of onboarding and requirement collection, not the why

small glen
#

Thats fine. So if anyone wants to receive a payout on stripe, they basically need a website?

dry tiger
#

So if anyone wants to receive a payout on stripe, they basically need a website?
Alternatively you can provide a product_description. I'm looking for where we call that out in the docs

small glen
#

So instead of a site, we can just put product_description? Let me test that out quickly

#

Ok I think when I add that property when I update the account, it now makes the business_profile.mcc and business_profile.url go away as requirements

#

@dry tiger Yeah it seems adding the product_description did satisfy that business_profile part.

dry tiger
#

Okay great ๐ŸŽ‰

small glen
#

So once I did that it seems like my last requirement is now this:

#

"currently_due": [
"verification.document"
],

#

I am assuming its submitting some sort of photographic proof of your ID to stripe, right?

dry tiger
small glen
#

Alright looking thru this. Thanks again by the way for the swift response. Im a one-man team so I appreciate you helping.

dry tiger
small glen
#

Thank you

#

So in the real world, once a user submits the information and identity verification document to Stripe, how long does it usually take before the account goes live and they can begin receiving money to their US bank account using Stripe

#

Nothing exact, just the general estimate of time I guess

dry tiger
#

In many cases verification is immediate. But this can vary significantly depending on business types, any additional checks that are required, etc. We cannot guarantee any sort of specific timing but for your basic, straightforward businesses it's right away.

small glen
#

That sounds good. Thanks I am working on the identitiy verification upload part.

#

I am looking through various examples but dont find a solution convincing enough that would satisfy the upload of the verification document. Nor do I see it on the Stripe documents.

#

Do you know of a resource that literally has something out of the box?

dry tiger
small glen
dry tiger
#

no

small glen
#

We by no means do the heavy lifting when it comes grabbing the image of their document

dry tiger
#

You can shift almost all of this to Stripe if you use Stripe hosted onboarding. If you start again at this doc: https://docs.stripe.com/connect/onboarding, you will see we have a whole "Onboard Accounts" nav section in left drawer. You can review all of this to get a better sense of what each approach will take in terms of engineering effort and what each approach allows you to control.

small glen
#

I am confident I can do the custom part. I just need to see some demo code or something and then I can knock it out. Let me look at hosted onboarding and see how its done.

dry tiger
#

We also have a set of useful testing values (it's not complete by any means but it helps). This will allow you to test different parts of the onboarding flow yourself to ensure it works as you expect.

https://docs.stripe.com/connect/testing

small glen
#

I think I found it:

dry tiger
#

Yeah, if you want to handle collecting the image file yourself, that is the approach to take.

small glen
#

well Id figure that would be the logical step to take bc I am doing everything via the API

#

Alright gonna test this bad boy out.

icy shoreBOT
small glen
#

@dry tiger So I think I nailed it. Because in the requirements payload, I am getting this:

"requirements": {
  "alternatives": [],
  "currently_due": [],
  "errors": [],
  "eventually_due": [],
  "past_due": [],
  "pending_verification": [
    "id_number",
    "verification.document"
  ]
},

It seems the only thing I have left is pending_verification section which I dont know if that means I wait around or if there something additional I must do.

wintry grail
#

yeah pending_verification means we're in the middle of verifying it

#

We'll send you an update async once we're done!

small glen
#

Btw love your pfp. Made me laugh

wintry grail
#

yeah but we still model what we do in Live mode so we "pretend" to be checking the data and send results async

small glen
#

Do you know if for American accounts, the id_number has to be the full social security?

#

And if so, can the verification document be a passport or drivers license? Both documents which DONT show the social security number

wintry grail
icy shoreBOT
small glen
#

Got it. So I see something interesting. You guys in a test fashion got back to me and disapproved the account because of this:

    "requirements": {
      "alternatives": [
        {
          "alternative_fields_due": [
            "individual.verification.document"
          ],
          "original_fields_due": [
            "individual.id_number"
          ]
        }
      ],
      "current_deadline": null,
      "currently_due": [
        "business_profile.mcc",
        "individual.verification.document"
      ],
      "disabled_reason": "requirements.past_due",
      "errors": [
        {
          "code": "verification_failed_keyed_identity",
          "reason": "The identity information you entered cannot be verified. Please correct any errors or upload a document that matches the identity fields (e.g., name and date of birth) that you entered.",
          "requirement": "individual.verification.document"
        }
      ],
      "eventually_due": [
        "business_profile.mcc",
        "individual.id_number"
      ],
      "past_due": [
        "business_profile.mcc",
        "individual.verification.document"
      ],
      "pending_verification": []
    },

#

Like I literally have to make my test data match my passport info even on test mode it seems.

wintry grail
#

we have Test mode only values you should use for this. Never upload real data in Test mode!

small glen
#

So I would have to put address_full_match in the address fields? But as a string? so 'address_full_match'?

woeful oxide
#

Just the line1 field

#

Other fields you can fill out with whatever as long as it is a valid value for the field

small glen
#

got so in line1: "address_full_match"

#

and for th dummy verification document: file_identity_document_success

#

How would that be a part of the payload?

#

Would it go in like this:

    verification: {
      document: "file_identity_document_success"
    },
woeful oxide
#

Exactly

#

You pass it where you would otherwise pass a file_ ID

small glen
#

ok let me give it a go then.

#

What is the exact parameter when we are updating the account?

#

for document uploads

#
"Received unknown parameter: verification"

Because I am getting this error

#
    business_type: 'individual', // or 'company'
    business_profile: {
      product_description: "Payouts from Milk Sales"
    },
    verification: {
      document: "file_identity_document_success"
    },

This is a part of the payload that I am invoking.

woeful oxide
#

Can you show me your full code for that call?

small glen
#

Yeah one sec.

#
// pages/api/update-account.ts

import { NextApiRequest, NextApiResponse } from 'next';

const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY);

export default async (req: NextApiRequest, res: NextApiResponse) => {
  const accountId = "acct_1PkT4LRSjUH77sK6"
  const updates = {
    business_type: 'individual', // or 'company'
    business_profile: {
      product_description: "Payouts from Milk Sales"
    },
    verification: {
      document: "file_identity_document_success"
    },
    individual: {
      first_name: 'Alvaro',
      last_name: 'Roa',
      email: 'john.doe@example.com',
      id_number: "000000000", // We need to verify if this field is required test: 000000000
      dob: {
        day: 1,
        month: 1,
        year: 1901,
      },
      phone: '5408509936',
      address: {
        line1: 'address_full_match',
        city: 'address_full_match',
        state: 'TX',
        postal_code: '79938',
        country: 'US',
      },
      ssn_last_4: '0000', // Last 4 digits of SSN, if applicable
    },
    external_account: {
      object: 'bank_account',
      country: 'US',
      currency: 'usd',
      account_holder_name: 'Alvaro Roa',
      account_holder_type: 'individual',
      routing_number: '110000000',
      account_number: '000123456789',
    },
    tos_acceptance: {
      date: Math.floor(new Date('2024-08-05T12:00:00Z').getTime() / 1000),
      ip: '203.0.113.42', // Example IP address
    },
  };
  try {
    //const { accountId, updates } = req.body;

    // Update the account with the provided information
    const account = await stripe.accounts.update(accountId, updates);

    res.status(200).json({ account });
  } catch (error) {
    res.status(400).json({ error: error});
  }
};
#

The problem is that I am not injecting that file data correctly into the updates object

woeful oxide
#

There isn't a parameter named verifications for that API call. Did we show a param like that in one of our docs?

small glen
#

I am just trying to see where this document part gets injected into my payload that way I can get the nod in the test environment.

#

Because it seems like I need to put this token somewhere in the upload object.

#

So I just submitted the update without the test file tokens and this is what is under pending review.

#
    "requirements": {
      "alternatives": [],
      "current_deadline": null,
      "currently_due": [
        "business_profile.mcc"
      ],
      "disabled_reason": "requirements.past_due",
      "errors": [],
      "eventually_due": [
        "business_profile.mcc"
      ],
      "past_due": [
        "business_profile.mcc"
      ],
      "pending_verification": [
        "individual.address.city",
        "individual.address.line1",
        "individual.address.postal_code",
        "individual.address.state",
        "individual.id_number",
        "individual.verification.document"
      ]
    },
#

Ok so it seems to have been fine and approved all the things I uploaded

#

@woeful oxide Now we are back to square one where it seems to be asking for the business_profile.mcc in order for transfers and payouts to happen. But my issue is because I am onboarding individuals and not businesses, what mcc code do I give them?

woeful oxide
#

The one that is appropriate for your business I believe

small glen
#

Oh ok. Too easy.

#

Let me look at the merchant code for milking cows XD

woeful oxide
small glen
#

Awesome. You were right. Just got done talking to Support. If you make an individual account whose sole purpose is to receive payouts from the business, then their mcc code, url and product description can be that of your business.

#

And it seems like the connect account is onboarded successfully.

#

Where can I find the docs in React to do a practice/real payment to said account

woeful oxide
small glen
#

Yeah the solution I am looking for is simply having a lump sum of money on my account and doing transfers to the connected accounts to give them their payout