[Skip to main content](#vessel-content)

#   Commission based on customer payment method

##

- **[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")**
- [![trevsmiff's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9214.jpg)](/forum/user/9214-trevsmiff "View trevsmiff's Profile") Topic Author
- [ Offline](/forum/user/9214-trevsmiff)

Less More

- Posts: 306
- Thank you received: 42
-
-

10 years 9 months ago -  10 years 9 months ago [\#230723](#230723) by [trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")  *[Commission based on customer payment method](/forum/20-market-feature-requests/882478-commission-based-on-customer-payment-method#230723 "-- HikaShop version -- : 2.6.1 -- HikaMarket version -- : 1.6.7 -- Joomla version -- : 3.4.8  I have been asked to build a multi-vendor site with the following requirements:  &#42; The customer can pay using any method set up ( PayPal, Stripe, Cheque, BACS etc)  &#42; The main vendor receives the payment  &#42; Main-vendor then pays sub-vendors after deducing commission and fees from payment provider (ie PayPal)  If there was a method of basing the commission on the payment method that the customer used I think this would could be achieved. For example if the customer paid by PayPal who charged 3.5% and the vendors commission was 10% then deducting 13.5% from the sub-vendors payment would work. If the customer paid by BACS then just 10% would be deducted. To do this I guess would require a filter in the commission area that selects the commission rate based on the method of payment used.  Would this work? Can it be done?  Thanks Trevor")* was created by *[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")*

-- HikaShop version -- : 2.6.1
-- HikaMarket version -- : 1.6.7
-- Joomla version -- : 3.4.8

I have been asked to build a multi-vendor site with the following requirements:

- The customer can pay using any method set up ( PayPal, Stripe, Cheque, BACS etc)
- The main vendor receives the payment
- Main-vendor then pays sub-vendors after deducing commission and fees from payment provider (ie PayPal)

If there was a method of basing the commission on the payment method that the customer used I think this would could be achieved. For example if the customer paid by PayPal who charged 3.5% and the vendors commission was 10% then deducting 13.5% from the sub-vendors payment would work. If the customer paid by BACS then just 10% would be deducted.
To do this I guess would require a filter in the commission area that selects the commission rate based on the method of payment used.

Would this work?
Can it be done?

Thanks
Trevor

Last edit: 10 years 9 months ago by [trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIwLW1hcmtldC1mZWF0dXJlLXJlcXVlc3RzLzg4MjQ3OC1jb21taXNzaW9uLWJhc2VkLW9uLWN1c3RvbWVyLXBheW1lbnQtbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

10 years 8 months ago [\#230740](#230740) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Commission based on customer payment method](/forum/20-market-feature-requests/882478-commission-based-on-customer-payment-method#230740 "-- HikaShop version -- : 2.6.1 -- HikaMarket version -- : 1.6.7 -- Joomla version -- : 3.4.8  I have been asked to build a multi-vendor site with the following requirements:  &#42; The customer can pay using any method set up ( PayPal, Stripe, Cheque, BACS etc)  &#42; The main vendor receives the payment  &#42; Main-vendor then pays sub-vendors after deducing commission and fees from payment provider (ie PayPal)  If there was a method of basing the commission on the payment method that the customer used I think this would could be achieved. For example if the customer paid by PayPal who charged 3.5% and the vendors commission was 10% then deducting 13.5% from the sub-vendors payment would work. If the customer paid by BACS then just 10% would be deducted. To do this I guess would require a filter in the commission area that selects the commission rate based on the method of payment used.  Would this work? Can it be done?  Thanks Trevor")*

Hi,

There is no such built-in option in HikaMarket to do so, specially because commission rules can be set on products.
But it is possible to implement it using a small custom plugin.
With the two trigger "onBeforeMarketCalculateVendorPrice" "onAfterMarketCalculateVendorPrice", you can change dynamically the content or completely override how the commission is processed.
[ www.hikashop.com/support/documentation/1...CalculateVendorPrice](http://www.hikashop.com/support/documentation/163-hikamarket-developer.html#onAfterMarketCalculateVendorPrice)

Depending your current commission rules ; you can simply use the "onAfterMarketCalculateVendorPrice" trigger and subtract the 3.5% payment charge of the $ret variable (which contains the final vendor price).

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIwLW1hcmtldC1mZWF0dXJlLXJlcXVlc3RzLzg4MjQ3OC1jb21taXNzaW9uLWJhc2VkLW9uLWN1c3RvbWVyLXBheW1lbnQtbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")**
- [![trevsmiff's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9214.jpg)](/forum/user/9214-trevsmiff "View trevsmiff's Profile") Topic Author
- [ Offline](/forum/user/9214-trevsmiff)

Less More

- Posts: 306
- Thank you received: 42
-
-

10 years 8 months ago [\#230758](#230758) by [trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")  Replied by *[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")* on topic *[Commission based on customer payment method](/forum/20-market-feature-requests/882478-commission-based-on-customer-payment-method#230758 "-- HikaShop version -- : 2.6.1 -- HikaMarket version -- : 1.6.7 -- Joomla version -- : 3.4.8  I have been asked to build a multi-vendor site with the following requirements:  &#42; The customer can pay using any method set up ( PayPal, Stripe, Cheque, BACS etc)  &#42; The main vendor receives the payment  &#42; Main-vendor then pays sub-vendors after deducing commission and fees from payment provider (ie PayPal)  If there was a method of basing the commission on the payment method that the customer used I think this would could be achieved. For example if the customer paid by PayPal who charged 3.5% and the vendors commission was 10% then deducting 13.5% from the sub-vendors payment would work. If the customer paid by BACS then just 10% would be deducted. To do this I guess would require a filter in the commission area that selects the commission rate based on the method of payment used.  Would this work? Can it be done?  Thanks Trevor")*

Thanks Jerome, that looks promising.

As the commission adjustment will vary according to the method of payment that the customer used is there a way of retrieving the payment method within the trigger functions?

regards
Trevor

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIwLW1hcmtldC1mZWF0dXJlLXJlcXVlc3RzLzg4MjQ3OC1jb21taXNzaW9uLWJhc2VkLW9uLWN1c3RvbWVyLXBheW1lbnQtbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

10 years 8 months ago [\#230767](#230767) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Commission based on customer payment method](/forum/20-market-feature-requests/882478-commission-based-on-customer-payment-method#230767 "-- HikaShop version -- : 2.6.1 -- HikaMarket version -- : 1.6.7 -- Joomla version -- : 3.4.8  I have been asked to build a multi-vendor site with the following requirements:  &#42; The customer can pay using any method set up ( PayPal, Stripe, Cheque, BACS etc)  &#42; The main vendor receives the payment  &#42; Main-vendor then pays sub-vendors after deducing commission and fees from payment provider (ie PayPal)  If there was a method of basing the commission on the payment method that the customer used I think this would could be achieved. For example if the customer paid by PayPal who charged 3.5% and the vendors commission was 10% then deducting 13.5% from the sub-vendors payment would work. If the customer paid by BACS then just 10% would be deducted. To do this I guess would require a filter in the commission area that selects the commission rate based on the method of payment used.  Would this work? Can it be done?  Thanks Trevor")*

Hi,

In the trigger, you have access to the Vendor order object, which contains the order payment method (and order payment id).

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIwLW1hcmtldC1mZWF0dXJlLXJlcXVlc3RzLzg4MjQ3OC1jb21taXNzaW9uLWJhc2VkLW9uLWN1c3RvbWVyLXBheW1lbnQtbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")**
- [![trevsmiff's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9214.jpg)](/forum/user/9214-trevsmiff "View trevsmiff's Profile") Topic Author
- [ Offline](/forum/user/9214-trevsmiff)

Less More

- Posts: 306
- Thank you received: 42
-
-

10 years 8 months ago [\#230778](#230778) by [trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")  Replied by *[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")* on topic *[Commission based on customer payment method](/forum/20-market-feature-requests/882478-commission-based-on-customer-payment-method#230778 "-- HikaShop version -- : 2.6.1 -- HikaMarket version -- : 1.6.7 -- Joomla version -- : 3.4.8  I have been asked to build a multi-vendor site with the following requirements:  &#42; The customer can pay using any method set up ( PayPal, Stripe, Cheque, BACS etc)  &#42; The main vendor receives the payment  &#42; Main-vendor then pays sub-vendors after deducing commission and fees from payment provider (ie PayPal)  If there was a method of basing the commission on the payment method that the customer used I think this would could be achieved. For example if the customer paid by PayPal who charged 3.5% and the vendors commission was 10% then deducting 13.5% from the sub-vendors payment would work. If the customer paid by BACS then just 10% would be deducted. To do this I guess would require a filter in the commission area that selects the commission rate based on the method of payment used.  Would this work? Can it be done?  Thanks Trevor")*

Thanks again Jerome.

Time to roll up my sleeves and get my hands dirty!

regards
Trevor

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIwLW1hcmtldC1mZWF0dXJlLXJlcXVlc3RzLzg4MjQ3OC1jb21taXNzaW9uLWJhc2VkLW9uLWN1c3RvbWVyLXBheW1lbnQtbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")**
- [![trevsmiff's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9214.jpg)](/forum/user/9214-trevsmiff "View trevsmiff's Profile") Topic Author
- [ Offline](/forum/user/9214-trevsmiff)

Less More

- Posts: 306
- Thank you received: 42
-
-

10 years 8 months ago [\#231062](#231062) by [trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")  Replied by *[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")* on topic *[Commission based on customer payment method](/forum/20-market-feature-requests/882478-commission-based-on-customer-payment-method#231062 "-- HikaShop version -- : 2.6.1 -- HikaMarket version -- : 1.6.7 -- Joomla version -- : 3.4.8  I have been asked to build a multi-vendor site with the following requirements:  &#42; The customer can pay using any method set up ( PayPal, Stripe, Cheque, BACS etc)  &#42; The main vendor receives the payment  &#42; Main-vendor then pays sub-vendors after deducing commission and fees from payment provider (ie PayPal)  If there was a method of basing the commission on the payment method that the customer used I think this would could be achieved. For example if the customer paid by PayPal who charged 3.5% and the vendors commission was 10% then deducting 13.5% from the sub-vendors payment would work. If the customer paid by BACS then just 10% would be deducted. To do this I guess would require a filter in the commission area that selects the commission rate based on the method of payment used.  Would this work? Can it be done?  Thanks Trevor")*

I managed to get it working and have attached a copy if anyone wants to use it.

*This attachment is hidden for guests.
Please log in or register to see it.*

regards
Trevor

The following user(s) said Thank You: [Jerome](/forum/user/80-jerome "View Jerome's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIwLW1hcmtldC1mZWF0dXJlLXJlcXVlc3RzLzg4MjQ3OC1jb21taXNzaW9uLWJhc2VkLW9uLWN1c3RvbWVyLXBheW1lbnQtbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.078 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
