Paypal Integration with 2 payments within 1 transaction - paypal

Our clients has an special paypal payment requirements.
I wanted to know if we can possible do 1 transaction and get the full amount then relay the 2% of the payment to the another paypal account?

Oh. Got the solution its called Adaptive Payment.
https://developer.paypal.com/webapps/developer/docs/classic/adaptive-payments/integration-guide/APIntro/

Related

Does PayPal have APIs for various restricted operations?

Like the following:
Withdraw money from PayPal
Send money or payments
Pay using PayPal
Receive money or payments
Refund money to customers
Strange question, but as best I know:
Withdraw to a bank? No
There is the Payouts API
PayPal Checkout?
PayPal Checkout? With or without a payee set?
Who received the payment that is going to be refunded? Yes there is an operation that depends on the API used to receive the payment, but it is a matter of having permissions to execute it. You can refund payments to your own account of course.

Get fee amount using PayPal Adaptive Payments API?

I am beating my head against the wall with this one. I am setting up a payment using the PayPal Adaptive Payments API, where one of my platform's users receives a payment from their customer. I need to be able to see the amount of the PayPal fee related to that transaction.
I'm familiar with and have tried using the PaymentDetails API operation, but unfortunately, the only quasi-relevant information that method (and the IPN) returns is fees_payer (who paid the fees), not the amount of the fee.
I've also looked into the GetTransactionDetails operation, but that appears to be only for Express Checkout and Website Payments Pro APIs, according to this document.
Any ideas how I can determine the fee amount on these transactions?
With Adaptive Payments the IPNNotificationURL specified in the Pay request would be an app specific IPN that won't provide much info about that payment itself.
If you setup IPN in the receiver account profile, then an additional IPN would be triggered that would be transaction specific and would include the fee.

Paypal adaptive payments - audit trail

We're planning a web app that allows users to pay our clients directly through Paypal so there will be many different users and each will be paying a specific client through the website and there will be multiple clients.
These payments may be one-off payments but a few may be recurring.
We won't be charging a transaction fee for this so we basically want the whole payment amount to be deposited in the client's Paypal account (so they pay their own Paypal fees). I've looked at chained payments to be able to take a payment for a client but I'm just wondering what the actual flow of money is in a chained payment.
When a chained payment is made does Paypal deposit the payment go into our Paypal account first and then be paid into the client's account or does the client portion (in this case 100%) go directly into the client's account?
I'm asking as we're not sure how it would affect us in terms of accounting in our business if all the payment money was actually passing through our Paypal account (even if only briefly).
Or is a chained payment not the ideal solution for this?
Thanks,
Steve
If you are not taking a cut of the money, then I believe either Simple or Parallel payments would be a better solution. If you are going to be processing payments for a single buyer to a single merchant, then you can just use Simple Payments. If you are going to be processing payments for a single buyer to multiple merchants then you'd want to use Parallel Payments. More information on each of those APIs can be found here.

Paypal Website Payments Pro - Recurring Payment Profile - Negative testing - how to trigger

I try to establish recurring payment from CiviCRM, using Website Payments Pro mode.
The positive testing works perfectly, I see the created payment profile, I get the IPN notifications, it's perfect.
I enabled negative testing at the profile, I tried two methods to trigger the negative case - when the initial payment fails:
PayPal recurring payments negative testing (https://developer.paypal.com/docs/classic/lifecycle/sb_error-conditions/ - with the amount of 106.10 $)
With IPN error code: https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNTesting/ - 31.22
In both cases, the payment completed successfully.
I contacted the paypal support and their best answer was this:
" You can test it with close expiry date. Usually when the expiry date almost come, PayPal will sent notification to the buyer to change credit card. But if the buyers just ignore the notification, it will lead to failed transaction. "
Even if it works, it's unacceptable, that I might have to wait 1 month to see the result. Paypal does not allow to set already expired card for the recurring payment profile.
Do you see an efficient way to test negative outcome? Maybe with IPN simulator? But how can I be sure that Send Paypal Recurring Payments commands with IPN Simulator contains the proper messages that PayPal uses today for my type of account?
Here is how to proceed: forget the sandbox, it is just not mature enough. Use the production/live paypal account, lower the recurring fee to 0.5$, launch the recurring payment from Civicrm, wait for the initial payment, you have the successful case, then ask your bank to set the POS limit to 0$, then the next recurring payment will fail. This is a totally robust way to test negative case. Do not forget to set your IPN first (https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNSetup/). Do you have any better method?
The following method works for recurring payments with Express Checkout, might as well work for Payments Pro:
Login to https://www.sandbox.paypal.com using your buyer's test PayPal account.
Replace the contents of the street address Line-1 of the buyer's test credit card, with CCREJECT-REFUSED.
Execute a typical Express Checkout payment flow against the Sandbox test environment using the same buyer account and with the same credit
card that you just modified.
This method is described on a page in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying 'Beware of the Leopard' helpfully titled How To Recover from Funding Failure Error Code 10486 in Express Checkout

Paypal Adaptive chained payments

Hi I'm a little confusing with this adpative payments option, what I have is this scenario.
I have a site which can charge without problem using paypal api nvp using credit card directly.
what I want to do is charge in the same way with the credit card and then, split the income into two differents paypal accounts. 15% in one and the rest in the other one.
So how can do this? I can't find any example for achieve this, Im watched a few examples of adaptive payment where the sender (which use an paypal account) send money to the primary reciever and then this keep his fee and the transfer the rest. But not using a credit card as an input of payment
But what I want to do is charge with the credit card. Keep 15% fee and the send the rest to the other account. what I want is only be charge with 1 fee from paypal and not two from transfer money to two differentes accounts.
I just need an example.
Not sure if I'm understanding your scenario correctly, but I'm using chained payments to process a payment to a primary receiver, and then charge that receiver 3% to go towards my site's account. I'm using C# language and NVP, and this is what I have:
double mysiteAmt = Convert.ToDouble(payPalObj.transactionAmt) * .03;
// receiver(0) is the primary receiver of the payment
body.Append("receiverList.receiver(0).amount=" + HttpUtility.UrlEncode(payPalObj.transactionAmt.ToString()));
body.Append("&");
body.Append("receiverList.receiver(0).email=" + HttpUtility.UrlEncode(payPalObj.receiverEmailAcct));
body.Append("&");
body.Append("receiverList.receiver(0).primary=true");
body.Append("&");
// receiver(1) is my site
body.Append("receiverList.receiver(1).amount=" + HttpUtility.UrlEncode(mysiteAmt.ToString()));
body.Append("&");
body.Append("receiverList.receiver(1).email=" + HttpUtility.UrlEncode("payments#mysite.com")); // This is my site's PayPal account
body.Append("&");
body.Append("receiverList.receiver(1).primary=false");
When the sender is redirected to PayPal, they only see one transaction amount. When the payment is processed and the primary receiver logs in to PayPal, they will see two transactions: 1) A payment FROM the sender, and 2) a payment TO my site's PayPal account.
Hope this helps.
Edit:
You also have to include this so that the primary receiver is responsible for the PayPal fees.
body.Append("feesPayer=PRIMARYRECEIVER"); // Receiver will pay the fees.