#mwaheed.
1 messages · Page 1 of 1 (latest)
Hi there!
Can you share the ID (req_xxx) of the failing API request?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
Don't have the ID, basically the token is created at frontend and it's fail so that why it's not returning the ID
please make this process fast...
@dusk sage
Even in the frontend, that' should be an API call behind
Are you following this integration?
https://stripe.com/docs/connect/account-tokens
yeah
Please don't use mentions, I'm monitoring this thread.
okay
Can you share the exact request body you are sending if you don't have a requestId ?
async getAccountToken() {
const stripe = Stripe(process.env.MIX_VUE_APP_STRIPE_KEY);
this.accountMutation();
console.log(this.accountObj);
await stripe
.createToken("account", this.accountObj)
.then((result) => {
console.log(result);
if (result.token) {
this.connectErrors = null;
this.accountToken = result.token.id;
}
if (result.error) {
this.connectErrors = result.error.message;
this.submitting = false;
}
})
.catch((error) => {
this.connectErrors = error.message;
this.submitting = false;
});
},
You are facing this issue at this step, I imagine right?
https://stripe.com/docs/connect/account-tokens#javascript
this.accountObj = {
business_type: this.$store.state.app.account.business_type,
company: {
registration_number: this.$store.state.app.account.crn,
tax_id: this.$store.state.app.account.crn,
structure: this.$store.state.app.account.business_structure,
name: this.$store.state.app.account.company_name,
phone: this.$store.state.app.account.business_number,
address: {
line1: this.$store.state.app.account.companyAddress.line1,
line2: this.$store.state.app.account.companyAddress.line2,
city: this.$store.state.app.account.companyAddress.city,
// state: this.$store.state.app.account.companyAddress.state,
postal_code: this.$store.state.app.account.companyAddress.postal_code,
country: this.$store.state.app.account.country,
},
verification: this.identity_document_verification,
},
tos_shown_and_accepted: this.$store.state.app.account.tos_shown_and_accepted,
};
Sorry, but I need the values and not variable references in order to reproduce
just share with you wait...
You specified unincorporated_partnership, while that value isn't supported check the API references:
https://stripe.com/docs/api/tokens/create_account#create_account_token-account-company-structure
I'm not sure to advice regarding that, as that'll depends on your exact business, you can double check with Stripe Support at :
https://support.stripe.com/contact and see what best options fit to your business need. But from API integration point of view, you need to pass a valid option.
Orla the support member, send me here for guidance...
Yes we saw together the API issue, and now I think you understand the issue of your API integration.
You need to use a supported value according the API reference I shared with you.
but atleast can you tell me which values I can use for GB country (company type)
Now regarding, what business structures fits your business, I'm affraid that I can't help you much
According to the doc, I'm not seeing GB option, unfortunately:
https://stripe.com/docs/connect/identity-verification#business-structure
on the stripe they suggests us these values but they didn't work
What values ?
business struture values
Wait you are seeing this in Stripe Dashboard ?
yeah there I also get these values
but your integration is using direct APIs, the link I was sharing.
Those are two different things.
Between why you want using Account Token and not AccountLink ?
what type of connected account are you willing to use ?
that screen shot is from this link..
can you please tell me the diff. b/w Account Link and token?
yes but those values aren't all supported via the public API:
https://stripe.com/docs/api/tokens/create_account#create_account_token-account-company-structure
What type of connected account you are willing to use ? Express or Connect ?
custom
For custom account in GB, you should be using Account Links:
https://stripe.com/docs/connect/connect-onboarding
So, you are trying to say make the token from backend side ? right?
no not using Tokens, follow the link I'm sharing above.
Okay, I'll check and let you know..
So, for “account” value in account links, first we should create the token right from backend or the way I created them?
No you don't need to use any token.
The "account" parameter is the Connected Account Id:
created by this API call:
https://stripe.com/docs/api/accounts
I have already been using this API, but it's take ID which basically account token or account ID. can we send it as empty?
at first time
No this API, don't take an Account Id, check the doc reference:
https://stripe.com/docs/api/accounts/create
Here is an example with Node:
const account = await stripe.accounts.create({
type: 'custom',
country: 'US',
email: 'jenny.rosen@example.com',
capabilities: {
card_payments: {requested: true},
transfers: {requested: true},
},
});