#mwaheed.

1 messages · Page 1 of 1 (latest)

short iceBOT
dusk sage
boreal nexus
#

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

dusk sage
#

Even in the frontend, that' should be an API call behind

boreal nexus
#

yeah

dusk sage
#

Please don't use mentions, I'm monitoring this thread.

boreal nexus
#

okay

dusk sage
#

Can you share the exact request body you are sending if you don't have a requestId ?

boreal nexus
#

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;
});
},

dusk sage
boreal nexus
#

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,
};

dusk sage
#

Sorry, but I need the values and not variable references in order to reproduce

boreal nexus
#

just share with you wait...

dusk sage
boreal nexus
#

okay, then which values can I use for company type

#

for GB country only please

dusk sage
#

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.

boreal nexus
#

Orla the support member, send me here for guidance...

dusk sage
#

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.

boreal nexus
#

but atleast can you tell me which values I can use for GB country (company type)

dusk sage
#

Now regarding, what business structures fits your business, I'm affraid that I can't help you much

boreal nexus
#

on the stripe they suggests us these values but they didn't work

dusk sage
#

What values ?

boreal nexus
#

business struture values

dusk sage
#

Wait you are seeing this in Stripe Dashboard ?

boreal nexus
#

yeah there I also get these values

dusk sage
#

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 ?

boreal nexus
#

can you please tell me the diff. b/w Account Link and token?

dusk sage
boreal nexus
#

custom

dusk sage
boreal nexus
#

So, you are trying to say make the token from backend side ? right?

dusk sage
boreal nexus
#

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?

dusk sage
#

No you don't need to use any token.

#

The "account" parameter is the Connected Account Id:

boreal nexus
#

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

dusk sage
#

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},
  },
});