#shaymolina_code

1 messages · Page 1 of 1 (latest)

dim krakenBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1264990165508816927

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

merry vale
#

$stripe_connect_args = [];
if (apply_filters('wcfm_is_allow_stripe_express_api', true)) {
// Express account prefill information
$stripe_connect_args['country'] = $country;
$stripe_connect_args['controller'] = [
'fees' => ['payer' => 'application'],
'losses' => ['payments' => 'application'],
//'stripe_dashboard' => ['type' => 'none'],
'stripe_dashboard' => ['type' => 'express'],
'requirement_collection' => 'application',
//'requirement_collection' => 'stripe',
];
$stripe_connect_args['capabilities'] = [
'transfers' => ['requested' => true],
];
$stripe_connect_args['tos_acceptance'] = [
'service_agreement' => 'recipient',
'date' => time(),
'ip' => $_SERVER['REMOTE_ADDR'],
'user_agent' => $_SERVER['HTTP_USER_AGENT'],
];
} else {

dry lagoon
#

HI 👋

#

you are sharing a lot of unformatted code but what is the problem you are having?

dim krakenBOT
#

🧑‍💻 How to format code on Discord

Inline code: wrap in single backticks (`)

This:

The variable `foo` contains the value `bar`.

Will turn into this:

The variable foo contains the value bar.

Code blocks: wrap in three backticks (```)

Also, you can specify the language after the first three backticks to get syntax highlighting.

This:

```javascript
function foo() {
return 'bar';
}
```

Will turn into this:

function foo() {
  return 'bar';
}```

Notes about **code blocks**:
- Specifying the language is optional (e.g., you can omit `javascript` in the example above)
  - If you don't specify the language you won't get syntax highlighting
- When you're inside a code block (after you type \`\`\`) the `Return`/`Enter` key will add a new line instead of sending your message
  - Once you end the code block `Return`/`Enter` works normally again

You can [read more about message formatting on Discord's website.](https://support.discord.com/hc/en-us/articles/210298617)
merry vale
#

Hey

We use a controller and need to set up an express account

But then you get the following error:

When controlling requirement collection, the Connect application must also control losses, fees, and specify a dashboard type of none.

#
        if (apply_filters('wcfm_is_allow_stripe_express_api', true)) {
            // Express account prefill information
              $stripe_connect_args['country'] = $country;
            $stripe_connect_args['controller'] = [
                'fees' => ['payer' => 'application'],
                'losses' => ['payments' => 'application'],
                //'stripe_dashboard' => ['type' => 'none'],
                'stripe_dashboard' => ['type' => 'express'],
                'requirement_collection' => 'application',
                //'requirement_collection' => 'stripe',
            ];
            $stripe_connect_args['capabilities'] = [
                'transfers' => ['requested' => true],
            ];
            $stripe_connect_args['tos_acceptance'] = [
                'service_agreement' => 'recipient',
                'date' => time(),
                'ip' => $_SERVER['REMOTE_ADDR'],
                'user_agent' => $_SERVER['HTTP_USER_AGENT'],
            ];
        } else { ```
dry lagoon
#

Yup there are a number of invalid combinations you can hit when using the Controller parameter

merry vale
#

OK
And if we need the connected accounts to be express accounts. How do we do this?

dry lagoon
merry vale
#

I saw it here.
I did and we still got this error

dry lagoon
#

I think it's the requirements collection that is the issue here

merry vale
#

ok
its working now

but the tos is only for testing, once it will work it will be hooked to the form throat the user will confirm and accept - along with his ip, date of confirmation and his user agent

dry lagoon
#

These screenshots are useless to me. Please just share your code instead

merry vale
#
        $stripe_connect_args = [];
        if (apply_filters('wcfm_is_allow_stripe_express_api', true)) {
            // Express account prefill information
              $stripe_connect_args['country'] = $country;
            $stripe_connect_args['controller'] = [
                'fees' => ['payer' => 'application'],
                'losses' => ['payments' => 'application'],
                //'stripe_dashboard' => ['type' => 'none'],
                'stripe_dashboard' => ['type' => 'express'],
                'requirement_collection' => 'application',
                //'requirement_collection' => 'stripe',
            ];
            $stripe_connect_args['capabilities'] = [
                'transfers' => ['requested' => true],
            ];
            $stripe_connect_args['tos_acceptance'] = [
                'service_agreement' => 'recipient',
                'date' => time(),
                'ip' => $_SERVER['REMOTE_ADDR'],
                'user_agent' => $_SERVER['HTTP_USER_AGENT'],
            ];
        } else { 
#

now we have this issue :
Error insight
You cannot accept the Terms of Service on behalf of accounts where controller[requirement_collection]=stripe, which includes Standard and Express accounts.

dry lagoon
#

You still have the invalid parameters though
'requirement_collection' => 'application', + 'stripe_dashboard' => ['type' => 'express'], == not supported

#

Okay those are outside the Controller parameter. But I think our doc could be more clear on that

merry vale
#

So how do I arrange it so that it does work with an express account?

dry lagoon
merry vale
#

yes

#

I also tried to look for a thesis but I couldn't find it

dry lagoon
#

The recipient service agreement basically means the Connected Account has no practical relationship to Stripe. So they cannot have any dashboard access and have very limited capabilities.

dim krakenBOT
merry vale
#

True, but at the same time I know platforms that use recipient and there is still access to Stripe Express

tiny tulip
#

👋 taking over as Snufkin needs to step away soon

merry vale
#

hey

#

Can you help me with this issue?

tiny tulip
#

Just catching up on it, give me a second

merry vale
#

no worrires

tiny tulip
merry vale
#

yep I have seen it

The question is, how can you open express accounts?

tiny tulip
#

True, but at the same time I know platforms that use recipient and there is still access to Stripe Express
I wonder if they're creating the accounts using types instead of controllers

merry vale
merry vale
tiny tulip
#

Do you know if they're collecting requirements themselves or is Stripe collecting the requirements instead?

As far as I know, there are no workarounds for this. If you'd like to enable dashboard then requirement_collection has to be stripe

merry vale
#

they collect
I'll show you in a second

tiny tulip
#

They're being redirected to Stripe hosted UI for onboarding no?

merry vale
#

Yep
I'll go ahead and send it to you

tiny tulip
#

That means Stripe is collecting the onboarding requirements?
i.e. requirement_collection = stripe ?

merry vale
#

If they allow Israel to connect, that means they are the ones who have to collect, right?

#

countries cross boarding

tiny tulip
#

not sure what you mean by that

merry vale
#

This document says they work with a recipient agreement no ?

#

That means they sign us to the agreement and not Stripe

tiny tulip
#

I don't think that's what they mean.. It could be that their application tracks their own agreement along with Stripe.

The video you shared shows hosted onboarding where Stripe collects the onboarding information (not the application)

merry vale
#

I understand

So we thought we should collect because it is cross bording accounts

#

Can you help me understand how to arrange this so that we can allow countries like Israel to have an express user?

tiny tulip
#

Hmm I'm still not sure what you're asking about?

Are you asking if a platform can have an express connected account in isreal?
OR are you asking if a platform in isreal can onboard an isreal based merchant using express connected account?

merry vale
#

Im asking if a platform can have an express connected account in isreal?

#

Like I know I do lol because the other site did it.

I'm just trying to figure out how

tiny tulip
#

There are factors that affect account supportability..

What country is your platform account located in?

merry vale
#

UD

#

US*

tiny tulip
#

Yep, you should be able to create express account for isreal on a US platform, have you tried using the values shown in the doc to map the default express account behavior?
https://docs.stripe.com/connect/migrate-to-controller-properties#express

losses.payments: application
fees.payer: application (see note)
requirement_collection: stripe
stripe_dashboard.type: express
merry vale
#

yes we tried it

tiny tulip
#

Can you share the exact request you made?

merry vale
#
  "business_profile": {
    "name": "shayyamsdcin56@gmail.com"
  },
  "business_type": "individual",
  "capabilities": {
    "transfers": {
      "requested": "true"
    }
  },
  "controller": {
    "fees": {
      "payer": "application"
    },
    "losses": {
      "payments": "application"
    },
    "requirement_collection": "stripe",
    "stripe_dashboard": {
      "type": "express"
    }
  },
  "country": "IL",
  "individual": {
    "address": {
      "country": "IL"
    }
  },
  "tos_acceptance": {
    "date": "1721659739",
    "ip": "213.57.169.102",
    "service_agreement": "recipient",
    "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
  }
} ```
tiny tulip
#

Is there a reason you're passing tos_acceptance ?

Once the account completes onboarding, that would be set automatically

merry vale
#

From what we read, cross bordering accounts need it, don't they? Maybe I'm wrong.

Would love your help

tiny tulip
#

Not that I am aware of..

#

I'd recommend testing it out without tos_acceptance parameter

merry vale
#

OK
It will take me a few minutes

tiny tulip
#

👍

merry vale
#

like this ?

tiny tulip
#

requirement_collection still is == application

You'd need to switch it to requirement_collection = 'stripe'

merry vale
#

like this ?

tiny tulip
#

Yup, try it out

merry vale
#

OK few sec

#

It breaks the code or something

tiny tulip
merry vale
#

req_V3usp9Dwd3vU1u

tiny tulip
#

Okay, so now just pass

    service_agreement: 'recipient',
  },```
#

not the whole thing as before

    "date": "1721659739",
    "ip": "213.57.169.102",
    "service_agreement": "recipient",
    "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
  }```
dim krakenBOT
merry vale
#

ok
just a min

#

like this ?

tiny tulip
#

How were you passing it before?

#

look at the code you've commented out in the screenshot

merry vale
#

ok

#

wowwww its look good !

#

req_DZ7NLX7C3dHR6L

#

can you confirm ?

humble vapor
#

Hanzo had to step out but I am taking a look

#

Looks like the TOS was accepted properly to me