#RGRTHAT - account representative
1 messages · Page 1 of 1 (latest)
Which library is that?
That API version is different than the version of the client library that you are using
this is serverside node.js
I use just "stripe" library
My server crashes..because of typescript. I might have to ignore typescript for this library
this is stripe connect
Im able to create account, but suppose i need to "director, exectutive" to go forward
import Stripe from "stripe";
const stripe = new Stripe(process.env.STRIPE_KEY, {
apiVersion: "2020-08-27",
});
Thank you. Checking further in to this
From the stripe dashboard I ofcourse get questions about "director" and "executive" and "owner"
I try to add this ontop of file to avoid typescript crashing server
// @ts-ignore
// @ts-nocheck
Have you tried updating to the latest version of the index file?
yarn add stripe@latest```
return new TSError(diagnosticText, diagnosticCodes);
^
TSError: ⨯ Unable to compile TypeScript:
server.ts:45:25 - error TS2769: No overload matches this call.
Overload 1 of 2, '(params?: AccountCreateParams, options?: RequestOptions): Promise<Response<Account>>', gave the following error.
Argument of type '{ country: string; type: "custom"; capabilities: { card_payments: { requested: true; }; transfers: { requested: true; }; }; default_currency: string; business_type: any; email: any; business_profile: { ...; }; representative: { ...; }; company: { ...; }; }' is not assignable to parameter of type 'AccountCreateParams'.
Object literal may only specify known properties, and 'representative' does not exist in type 'AccountCreateParams'.
Overload 2 of 2, '(options?: RequestOptions): Promise<Response<Account>>', gave the following error.
Argument of type '{ country: string; type: string; capabilities: { card_payments: { requested: boolean; }; transfers: { requested: boolean; }; }; default_currency: string; business_type: any; email: any; business_profile: { ...; }; representative: { ...; }; company: { ...; }; }' is not assignable to parameter of type 'RequestOptions'.
Object literal may only specify known properties, and 'country' does not exist in type 'RequestOptions'.
I downloaded stripe today
i just did "npm i stripe"
This error above only happens when i try to add prop "executives" or "owners" or "directors"
I tried now to uninstall and install latest again. Doesnt work
It seems to be typescript that cause server to crash? but that doesnt make sense, cuz i have "strict: none" on compiler config
I use ```js
const account = await stripe.accounts.create({})
I can confirm that its not typescript
I changed to just ```js
const stripe = require("stripe")(apikey)
it says that its no prop called any of these
@narrow mist There are no props that exist for "executives", "owners", etc
I have also tried to use "apiVersion: null"
Hello! Taking over and catching up, hang on...
There is no top-level representative property on Accounts. Are you trying to set individual.relationship.representative? https://stripe.com/docs/api/accounts/object#account_object-individual-relationship-representative
im using connect "custom" onboarding
trying to make a account for new user
and as u can see from "requirements", i need to specify "owners", "representative" and "directors"
I use my own forms, so no "template" / redirect to stripe website
but wierd i cant find any prop for these? Cuz when i create the account, I get a response, and It says due ```js
"requirements": {
"alternatives": [],
"current_deadline": null,
"currently_due": [
"company.directors_provided",
"company.executives_provided",
"directors.dob.day",
"directors.dob.month",
"directors.dob.year",
"directors.email",
"directors.first_name",
"directors.last_name",
"directors.relationship.title",
"executives.address.city",
"executives.address.line1",
"executives.address.postal_code",
"executives.dob.day",
"executives.dob.month",
"executives.dob.year",
"executives.email",
"executives.first_name",
"executives.last_name",
"external_account",
"representative.address.city",
"representative.address.line1",
"representative.address.postal_code",
"representative.dob.day",
"representative.dob.month",
"representative.dob.year",
"representative.email",
"representative.first_name",
"representative.last_name",
"representative.phone",
"representative.relationship.executive",
"representative.relationship.title",
"tos_acceptance.date",
"tos_acceptance.ip"
],
Yep, I understand what you're trying to do, I just don't understand specifically what's failing. Can you provide all of the code for the API request that's failing?
const account = await stripe.accounts.create({
country: "NO",
type: "custom",
capabilities: {
card_payments: { requested: true },
transfers: { requested: true },
},
business_type: business_type,
email: email,
business_profile: {
url: business_profile_url.
mcc: merchant_category_code,
}
executives: {
first_name: first_name
last_name: last_name
},
company: {
address: {
city: city.
country: country.
line1: company_address.
postal_code: postal_code.
state: state
},
structure: company_structure,
name: company_name,
phone: company_phone,
tax_id: company_tax_id.
registration_number: registration_number
},
});
That's the code that doesn't work? I thought you said you were trying to use representative somewhere?
yes
i tried adding "representative", but then i get error saying
StripeInvalidRequestError: Received unknown parameter: representative
Where exactly where you trying to add that?
see edited code above
executives: {
first_name: first_name
last_name: last_name
},
StripeInvalidRequestError: Received unknown parameter: executives
According to docs
"executives.first_name"
As u can see from docs here, the "company" prop is visible for me. But "executives", "owners" and "directors" is not visible or doesnt work
currently i use regular ```js
const stripe = require("stripe")(apiKey)
That's not how the requirements map to the API. You should be looking at the API reference to assemble your API calls: https://stripe.com/docs/api/accounts/create
So you're trying to create an account for a company with multiple executives?
If you're trying to create an account for a company with more than one person associated with it you'll need to use the Persons API in addition to the Accounts API: https://stripe.com/docs/api/persons
Im simply trying to add a account to my connect. And I get "restricted" if I dont specify "directors" and all that crap like "first_name" etc
and when i press inside the newly created account i get this
from stripe dashboard
When you see something like executives.first_name in the requirements it means that one or more of the executives for the account in question need to provide their first name. It doesn't mean there's a single executives.first_name property on the Account itself.
I want to ofcourse be able to payout money to the connected account
Yeah, you need to provide all of the required information using the APIs I linked to above, but the requirements do not map 1:1 with properties on the Account object.
oh I see, but how can I specify that 1 exectuive / owner of company
from the "create account" config above, what code do I miss?
i have tried adding everything
To clarify, is this connected account for an individual or for a company?
company
For a company you need to use the Persons API to specify the person who owns the company. We have a guide for this here that might help: https://stripe.com/docs/connect/identity-verification-api#person-information
u have to create the Person after the account?
as i see from docs u need to pass account id to the creation object
const person = await stripe.accounts.createPerson(
'acct_1Ibqq9HkK6xmnAQC',
{first_name: 'Jane', last_name: 'Diaz'}
);
Yep, that's correct. 🙂
tos_acceptance: {
date: Date.now(),
ip: "something here",
user_agent: "agent here",
service_agreement: "full",
},
``` for "agent" and "ip", do u know any great way to get those values?
You get them from your system. The user_agent is typically from the web browser being used by the person onboarding, and the ip is their IP address.
raw: {
message: 'ToS acceptance date is not valid. Dates are expected to be integers, measured in seconds, not in the future, and after 2009.',
param: 'tos_acceptance[date]',
type: 'invalid_request_error'
I try to do ```js
new Date().getTime()
which output something like so ```js
1647901085112
shouldnt that be valid?
new Date().getTime() / 1000
``` ```js
return new StripeInvalidRequestError(rawStripeError);
^
StripeInvalidRequestError: Invalid integer: 1647901361.144
you need an integer, it's a unix timestamp not a float
I wonder why "Payouts are disabled until a representative is added." pops up, when I have added this
because it's a requirement of what we need to collect https://stripe.com/docs/connect/required-verification-information
yeh looks like i need some sort of document
@grizzled gorge damn this process is insane
this means that i have to request pass port, driver license, id card or permit id to customers?
isnt that really heavy duty
would be much better with just the persons´s personal id number.
not everyone knows how to add for example a image file of their passport online
@tepid portal When I registered for stripe, i cant remember having to upload like a freaking png file of pass port or something. I might recall adding personal id number.
I would much perfer to ask for personal id number, then forcing user to take image of their passport, upload to computer, upload to my website, etc
isnt it possible to just use personal id number?
I mean you're accepting payments on behalf of another company
Every country have different requirements and some re heavier than other. Nothing is "insane" here, you can't just get money and send it to whomever you want sadly, there are strict rules and regulations worldwide for this
And not it's not possible to "just use personal id number". Many countries don't even have one of those
@grizzled gorge I see. I just cant recall simple sites like take for example ebay or amazon asking u for pass port, driver license or something similar? im not customer of those though, so might be wrong
I have this step left, which means I need to create a external account?
const bankAccount = await stripe.accounts.createExternalAccount(
'acct_1Ibqq9HkK6xmnAQC',
{
external_account: 'btok_1KftDZHkK6xmnAQC1mLuC1VU',
}
);
``` seems like i need a token "btok"
Rules and regulations evolve every year too. What happened a year ago is different. For example we're required to collect more information in Europe today than we were 5 months ago
and yes you need to collect bank account details https://stripe.com/docs/connect/bank-debit-card-payouts
damn making ur own forms & onboarding flow was harder then i thought
its not hard, but time consuming really. And not the onboarding flow i was looking for
it's exactly why we built Connect onboarding, so you don't have to
it's hard to do but also know that you will have to change this over the years as new requirements and regulations pop up
yeh thats the thing, having to change crap l8r is pain. But I hate these "templates" / redirect to other websites crap. I just dont like that "flow"
but im strongly considering it tbh
it will remove alot of pain
Yeah I feel you. We started with the API version too for that reasons. But you should see how often this changes, and how hard it is to do more than one country
like do you know how to localize this for Japan? I work at Stripe and I've used those APIs for years and I can tell you if I ever built this myself I'd use Connect Onboarding without even thinking
I agree the redirect can appear painful, but it's focused on the end user, and we constantly improve it too
I see, appreciate ur advice 🙂
Of course 🙂