Marketplace 1.3.0

Thanks Ihor, I’ll let you know if i could resolve this!

Hello again Ihor, i edited the file and deleted the capabilities lines of the code and now the onboarding process let my vendors choose theirs countries.

Now everthing seems to be connected. Now how can i make the costumers pay the bookings? with the stripe payment pluging to my company account? i already did that but i cant see the vendor’s money going or reflected in my company dashboard.

I’m afraid that removing these capabilities from the API request may fix creating an account, but the automatic payouts will fail because these capabilities are required for the payout API requests. Please set up Stripe for receiving funds in WooCommerce/Settings/Payments (this method will be used on checkout for payments), then if the order is paid and marked as Completed this should trigger an automatic payout from your Stripe Connect account to the linked Stripe account set up during the vendor registration.

Hello Ihor, im still testing the stripe connect, but i don’t see the money reflected in my company dashboard as a pay from Connect. The money enters as normal pay from my martkplace in Stripe, not as Connect money, besides they money in the vendor connected account still appears as 0$.

Im using the connect without removing the capabilities from the code with a test account in the USA, but is not working.

Please try contacting Stripe support regarding this - the idea is to link the Stripe gateway that you use for accepting payments in WooCommerce/Settings/Payments to the Stripe Connect balance, so each payment will top up this balance, and the same balance will be used for automatic payouts to vendors (to their linked Stripe accounts that they set up during the registration).

If there’s no way to do this, then they should offer other ways to top up this account, maybe via a bank transfer.

This is a temporary fix for the same-country issue with Stripe Connect, in case it’s required before the next Marketplace update. Please add this code snippet via the Code Snippets plugin or to the child theme’s functions.php file:

add_filter(
	'hivepress/v1/models/vendor/attributes',
	function( $attributes ) {
		$attributes['country'] = [
			'editable'   => true,

			'edit_field' => [
				'label'     => 'Country',
				'type'      => 'select',
				'options'   => 'countries',
				'required'  => true,
				'_external' => true,
				'_order'    => 123,
			],
		];

		return $attributes;
	},
	1000
);

Then, add this line to the Stripe API request parameters (after line 320 in hivepress-marketlace/includes/controllers/class-payout.php file):

'country' => $vendor->get_country(),

This should add a new Country field to the vendor profile form and then pass the selected value to the Stripe API request. Please let me know if you notice any other issues.

Hello Ihor i uptdated the plugin and now stripe show this error:

Stripe currently doesn’t support currency usd with country AR.

So we can´t use Stripe connect outside US?

Thanks for your help!

Currently multiple currencies are not supported for Stripe payouts, but we’ll check if it’s possible to add this to the next update. It seems that Stripe has many country restrictions, it supports USD for some countries, but for others don’t. It also has restrictions for payouts, e.g. it forbids processing payouts for specific combinations of countries https://stripe.com/docs/connect/cross-border-payouts If you operate in Argentina you can also try changing the default currency in WooCommerce/Settings.

Thanks for the reply Ihor, i edited the lines in the Stripe API request parameters and delete the capabilities and the `‘country’ => $vendor->get_country(), request line and now work perfectly, the pays now enter automatically and my vendors can create now theirs express accounts and select theirs countries.

Can i edit these lines with an snippet code? Because the future uptades will override my editions.

I guess we’ll add a filter hook for these parameters, this will allow changing them with an external code snippet. Please note that removing country sets the vendor Stripe account to the default country you set in Stripe Connect, this requires further testing - I’m not sure if they’ll be able to pay out their funds.

Do you mean that there’s a country field in their profile form while they’re creating a Stripe Connect account? We added the country selection field to the vendor profile form in HivePress just for this purpose, but if country selection is available on the Stripe side we may remove this field - if possible send more details about this (e.g. a screenshot).

Capabilities may also be required, at least the transfers one (this basically means making payouts from your Stripe Connect account to their linked Stripe accounts).

Hello Ihor, yes, in the onboarding process there is a country field so the vendors can select there their countries.

Another developer told me that removing the capabilities from the Stripe Api request make the Onboarding process to take the configuration of the main Stripe account, the one associated with the Marketplace.

That why deleting them from the request allows the vendors to select their countries in the onboard, because is taking the countries from the configuration of the main account. I also delete this line: `‘country’ => $vendor->get_country() and makes the onboard work.

Example:

Main Stripe account connect config:

Then the onboard procces with the capabilities removed form the request, showing the same countries enable in the main Stripe connect config:

Btw Stripe makes automatically the conversion from USD to the destination currency, so for me this is ok :smiley:

Thanks for sharing, we’ll test this further and if it works this way we’ll probably remove the capabilities and country from the API request code in the next update.

Maybe someone can answer me here.

I’ve enabled the test api for connect and the onboarding process. I havent tested it out properly yet, and am still setting it up on Stripe.

However, my question is, my checkout page have not changed, and it is still the WooCommerce checkout page that is linked to my Banks iban account, not the stripe connect system (afaik) . How an I to proceed and integrate the checkout page with the stripe connect solution?

Is there any documentation from hivepress on the setup yet?

Thank you

HivePress implements payouts only, if you mean accepting payments then this is related to WooCommerce - please set up this payment gateway in WooCommerce/Settings/Payments Stripe - WooCommerce Then payments will be accepted via Stripe, and paid out via Stripe Connect (from the main Stripe Connect account you set up, to the linked vendor Stripe accounts that they set up during registration). The only thing HivePress requires is a Stripe Connect API key in HivePress/Settings/Integrations, the reset should be set up on the Stripe Connect side Stripe Connect | Stripe Documentation

The only problem im facing now is that Stripe is repeating the transfers to the connected accounts several times for the same Orders (im in test mode) What could it be?

Please make sure that there were no customizations than may cause this issue, we added a flag to prevent repeated payouts, it’s set in the payout function Screenshot by Lightshot in hivepress-marketplace/includes/components/class-payout.php and the payout action is unscheduled, then even if the order status is switched to any other status and back, this flag is checked to prevent another scheduled payout Screenshot by Lightshot

You can also check if this action exists in the Pending tab in Tools/Scheduled Actions, it should be a one-time action - maybe there are issues with unscheduling it after the first payout attempt.

Hello Ihor, i checked up the schedules actions and i have a lot of actions created under “hivepress/v1/models/order/payout” but they are set daily. How can i change this or prevent this actions to be created daily?

This is part of my scheduled actions list

Yes, once the order is marked as Completed, this recurring action is scheduled, so HivePress tries to process a payout until it succeeds (there’s an email sent to admin on each failed attempt), and once it succeeds this action should be deleted. If it’s not deleted after the payout is 100% triggered please send temporary WP access to support@hivepress.io and I’ll try to debug this further.