#Cavalaa
1 messages · Page 1 of 1 (latest)
func stripeCreateAccount(ctx context.Context) (*stripe.Account, error) {
user, ok := ctx.Value("user").(*model.User)
// not logged in
if !ok {
return nil, fmt.Errorf("invalid token")
}
// construct customer
params := &stripe.AccountParams{
Type: stripe.String("express"),
BusinessType: stripe.String("individual"),
Capabilities: &stripe.AccountCapabilitiesParams{
Transfers: &stripe.AccountCapabilitiesTransfersParams{
Requested: stripe.Bool(true),
},
},
Settings: &stripe.AccountSettingsParams{
Payouts: &stripe.AccountSettingsPayoutsParams{
Schedule: &stripe.AccountSettingsPayoutsScheduleParams{
Interval: stripe.String(string(stripe.AccountSettingsPayoutsScheduleIntervalDaily)),
},
},
},
Email: stripe.String(user.Email),
}
// create customer
return account.New(params)
}
Can you share the request ID (req_xxx) to create the account, or the Express account ID (acct_xxx)?
here's my code, I'm not specifying a country
I'm not proceeding with account creation, but every user that tries to create an account seems to be locked to UK
is this because of their phone number?
Can you answer my above question, and I'll be able to check for you the issue.
I cant create a request as I cant create an account with a UK address
I can only get this far...
Can you share your Stripe dashbaord log, to find the request ID (req_xxx)?
Without this I cannot help.
req_f2fUFTRHjq7g4A
Thanks! So here's the creation request: https://dashboard.stripe.com/logs/req_DhAy58cNj2Aun5
I think you need to remove the capabilities object if you want users to select the country themselves.
Otherwise you can set yourself the coutry with https://stripe.com/docs/api/accounts/create#create_account-country
what effect would removing the capabilities object do?
because I need to be able to transfer to the connected account to payout
When you pass the capabilities hash on Account create then the country is locked to that of the platform
Transfer capability will be requested by default, no need to pass it
What didn't work? What did you try?
I removed the capabilities object
but its still locking to the uk
even If i use a spanish phone number
Can you share the req_xxx of the Account you just created
req_CCJIku5ODXs06w
req_RibtAPllq3NxmA
You're still passing the capabilities hash: https://dashboard.stripe.com/logs/req_RibtAPllq3NxmA
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I've taken it out of my code though?
// construct customer
params := &stripe.AccountParams{
Type: stripe.String("express"),
BusinessType: stripe.String("individual"),
// Capabilities: &stripe.AccountCapabilitiesParams{
// Transfers: &stripe.AccountCapabilitiesTransfersParams{
// Requested: stripe.Bool(true),
// },
// },
Settings: &stripe.AccountSettingsParams{
Payouts: &stripe.AccountSettingsPayoutsParams{
Schedule: &stripe.AccountSettingsPayoutsScheduleParams{
Interval: stripe.String(string(stripe.AccountSettingsPayoutsScheduleIntervalDaily)),
},
},
},
Email: stripe.String(user.Email),
}
Only mention of capabilities anywhere in my code\
Apparently not
I don't think that's the code that made req_RibtAPllq3NxmA – there's no settings hash in that payload
So some other code somewhere triggered that request. Or you're using outdated code
I'm checking with our frontend dev now
I've found it in the frontend, for some reason it was being done in both places, thank you!
np