Nov 19, 2009
Paypal Day-Dreaming | Hardcoded Profit Sharing
I'm working on a site to sell many of my scripts and I'm writing the affiliate system. And I started day dreaming. It was like Paypal added two new fields inside the HTML payment forms that were named:
partner_share=Number|Percentage & partner_business=paypal_email
And this way Paypal could automatically share profits for my sales and, in case of financial disputes, they could handle the chargebacks too withdrawing amounts from both accounts. I understand this would be a PITA for them but it would be sooooo cool and make life sooooo easy.
PS: If this is possible in Paypal right now do slap me with your knowledge.
PPS: Adaptive payments come close to my dream yet miss it by lack of chargeback handling and multi-target withdrawl on behalf of Paypal.
PPPS: Some more reading on the subject from Tim Nash. Has some pretty drawings :)


Luckily for you I was reading this the other day, looks like this has recentley become available.
http://techcrunch.com/2009/11/03/paypal-x-a-complete-list-of-adaptive-payments-apis/
“6. Parallel payments: Developers can enable buyers to send money to several people in one payment, which is ideal for purchasing multiple items from different sellers, or even for payroll applications.”
Thanks a lot.
I noticed x.com the very day it launched but I didn’t see this API back then.
I thought it was just a new site to keep all the specs together and forums.
PS: Now I got to study the 150 page PDF :)
This was great for a while and it still is … but not that great.
Paypal won’t handle refunds/chargebacks by taking amounts from all target accounts involved in payment transaction.
1. With a parallel payment you expose the second email (affiliate’s) involved in transaction. Privacy fk up!
And the payment would be split in the buyers account. Uncool!
2. With a chained payment the only magic thing is that the affiliate commission would be paid on the fly [easy to do with mass payments] from your account.
In case of chargebacks chained won’t take money from second payment target. And you end up having to handle this [chargebacks] and I’m back to square one.
Both payments are great for their own thing but only chained would work for me … butt … no chargeback protection would be included.
PS: But I can use this cool payments for other stuff :)
I have no idea, but I would be curious to see what your backend code for Paypal integration will look like.
I’m a little intimidated by all the calling/counter calling/check/counter checks.
I use IPNs. And I have an entire plugin [framework] written for Wordpress to integrate Paypal IPNs as WP actions to be handled further by plugins. I might sell the thing on the new site.
It’s just that all my [PHP Library] code is so intertwined that, to sell it, I need to convert it to a no dependency version and it’ll take some work.
I would buy a PayPal IPN framework if you release one. No doubt about it. I’ve got something that is hacked together and seems to work, but I’m afraid to take it live. Combining it with S3’s ability to create links with expiration dates would make my life so much easier.
OK. It won’t be really hard to convert it but first I must finish the site where to sell stuff.
It’ll be a few more days. I still need to do some affiliate stuff in it and my management side.
Yeah, I cobbled together something also last year but I’m afraid to take it live also. It can handle the payments but I’m worried about the refunds, etc.
Afraid of the technical side or of the fact that you will end up giving away stuff for free?
Actually, if I implement the IPN correctly, then I want it to be 100% automatic. Set it and forget it and I don’t have enough confidence in my code or understanding of the IPN that I have covered every case. So I shelved it.
I’m not worried about giving anything away for free, I’m worried about an unhappy customer suing the shit out of me because I didn’t refund them correctly or even notice it.
There is no way not to notice a refund.
When a customer issues a chargeback you will be notified by IPN and those funds will be locked.
When you log into to Paypal you will see the new dispute. You also get notified by email.
There are two things you can do:
- Dispute with a delivery receipt [non-digital goods]
- Refund the amount [you have to do this, but theres's no choice]
If you choose to refund the amount after communicating with a buyer you also do it in your account. Any refund goes in full unless you specify a partial refund.
There’s no way to ‘miss’ chargebacks and, as for refunds [made by request], make sure you have things clear on the site and it will go smoothly.
Actually Adaptive Chained Payment would do almost exactly what you want and is the most flexible I have seen in Paypal for handling chargebacks and refunds, and since you would be the API caller you would be responsible for determining where chargebacks are sent (as they use the refund API assuming parties gave you permission via the permissions api)
The key when creating the payment is to make sure you also have permission set for controlling refunds in all accounts after that its up to you how refunds and chargebacks are handled the exception to this is if your chosen point does not have the ability to pay the funds from any sources then the refund is handed to paypal to decide on.
You are right but … if parties give you premission to refund. How do I do that? :)
I assume it will be possible if I create Paypal accounts for affiliates with the adaptive accounts API but I wouldn’t want to create accounts for them but let them use their old ones. But I got to test this today and see if I can create accounts and do refunds.
Actually adaptive accounts once created are totally separate from your control. But their is a dedicated Permissions API which allows you to ask for permission to perform actions it can be called as part of the Adaptive Payments process to gain permission to refund. Take a look in X.com under management API. Without it you can’t do any of the pre approval aspect of Adaptive Payments. The SDK examples that were given out at Innovate also included handling refunds so you might want to look at those.
Thanks. These’ll keep me busy for today :)