#Cavalaa

1 messages · Page 1 of 1 (latest)

static matrixBOT
sand laurel
#

Hi there!

#

It depends how you are creating the Express account.

glacial crystal
#

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)

}

sand laurel
#

Can you share the request ID (req_xxx) to create the account, or the Express account ID (acct_xxx)?

glacial crystal
#

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?

sand laurel
#

Can you answer my above question, and I'll be able to check for you the issue.

glacial crystal
#

I cant create a request as I cant create an account with a UK address

#

I can only get this far...

sand laurel
#

Can you share your Stripe dashbaord log, to find the request ID (req_xxx)?

#

Without this I cannot help.

glacial crystal
#

req_f2fUFTRHjq7g4A

sand laurel
glacial crystal
#

what effect would removing the capabilities object do?

#

because I need to be able to transfer to the connected account to payout

atomic estuary
#

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

glacial crystal
#

ok thats fine then

#

that didnt worj

#

work

atomic estuary
#

What didn't work? What did you try?

glacial crystal
#

I removed the capabilities object

#

but its still locking to the uk

#

even If i use a spanish phone number

atomic estuary
#

Can you share the req_xxx of the Account you just created

glacial crystal
#

req_CCJIku5ODXs06w

atomic estuary
#

That's the Account Link

#

I need the request that created the Account

glacial crystal
#

req_RibtAPllq3NxmA

atomic estuary
glacial crystal
#

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\

atomic estuary
#

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

glacial crystal
#

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!

atomic estuary
#

np