Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › Affiliate Mass payment queries
Tagged: mass paypal payment
- This topic has 5 replies, 3 voices, and was last updated 2 years ago by Raymond Breen.
-
AuthorPosts
-
November 30, 2022 at 2:35 am #84755Raymond BreenParticipant
Hi,
I am using the revenue sharing feature to sell third party suppliers products in my store (and looking at custom coding using webhooks to generate an email which will be sent to the supplier detailing their products within the order, they will then process the order and deliver the goods to the customer, this email will also contain the unique transaction id).
When a mass payment file is created, I assume that each affiliate will just have one entry which details the total amount to be paid, rather than individual amounts for each particular purchase?
Is there a web hook I can use to catch the generation of the Mass pay file?
I would like to generate an email to all my suppliers, which will contain a breakdown of orders, like transaction id, amount paid etc so this can be correlated with their payment. Is there any way to achieve this?
December 1, 2022 at 4:51 am #84756Raymond BreenParticipantHi,
I have done some more investigation and from what i can tell, each order in which an affiliate gets atttributed for a sale, is recorded in an affiliate table.
Is there any action hooks for when an affiliate is marked as paid? As I could write some code which would interrogate those tables and retrieve the detail of each payment, including amount and transaction ID, this would go a long way towards providing suitable detail for the supplier affiliate to reconcile their accounts.
The only slight issue I can see is with regards to postage, if this is a seperate item in the order, then it will not appear in the affiliates’ table as such. One way around this would be to include postage in the item cost.
Any thoughts?
December 1, 2022 at 5:52 pm #84757wzpModeratorI think you are overthinking the problem of how mass payment works. Have you read this?
Once the mass payment file is created; you must MANUALLY initiate the mass payment process, per the video. At this point; you already know who the payments have been made to; and you can feed the file into a mail-merge program.December 1, 2022 at 8:44 pm #84758adminKeymasterAffiliates can log into the affiliate portal and see the commissions/earnings. That affiliate portal is how an affiliate views the generated earnings.
If you want to do some code customization, you can try and use the following action hook to create a custom plugin of your own.
When a commission is awarded from a transaction, the plugin triggers the following action hook. It passes some transaction data (exmpale: referrer, sale amoun, transaction ID etc) using an array:
do_action('wp_affiliate_commission_awarded', $txn_data);
Postage is deducted from the amount before commission is calculated.
December 2, 2022 at 6:52 am #84759Raymond BreenParticipantThanks guys for your responses.
Wzp, just to clarify, it’s not me who needs to know who has been paid, but for my supplier affiliate to be able to reconcile the payment they have just received (which could be for 10s of orders with different customers).
For example, over a month, 15 customers purchase different products which are fulfilled by one supplier, 1 order is under dispute. At the end of the month, the supplier gets paid. They then need to manually reconcile the orders with the one bulk payment.
I appreciate that this is using the affiliate system above and beyond what it was designed for, but I am happy to code my own add-on (which I will make available to anyone else using the affiliate system), which links in with your affiliate system.
Ideally for supplier affiliates I would like the email that notifies them that they have been paid, to also include the related transaction IDs.
Is there a hook for when the mass payment file is generated or the affiliate is marked as paid?
Also, can you possibly let me know how the back end tables for affiliates relate to each other?
The other option is for me to use the action hook when an order is paid successfully, and pay the supplier, email them and mark their affiliate payment as paid.
December 2, 2022 at 7:04 am #84760Raymond BreenParticipantThe other possible option would be to put all the transaction IDs in the notes’ field in the mass payment CSV file (separated by a space, i.e. 123 784 23). The supplier can then reconcile the payments for individual orders very easily for any given affiliate payment.
This would just require a few lines of code.
Does this sound feasible?
Happy to code this myself, just need guidance on where to put it in the code and potentially the table relationships, depending on what data is used by your existing code.
Thanks guys, for bearing with me:)
Cheers
-
AuthorPosts
- You must be logged in to reply to this topic.