Incomplete Delayed Chained Payment Fees Payer - paypal

I'm setting up a delayed chained payment in PHP
I'm setting the feesPayer to SECONDARYONLY
$payRequest->feesPayer = 'SECONDARYONLY';
the transaction is made to the primary receiver
but the second leg of the chained payment (from primary to secondary receiver) is still pending.
then 90 days passed (payKey expired) and I did not complete the payment.
who pays the fees when the payKey expires?

Based on my messages with PayPal's support, I tell you that no one will pay the fees because the payment will be reverted back to the buyer !
So if you didn't complete the payment, it will go back and you will not be able to change the receivers during 90 days.

Related

Prevent PayPal Payments with payKey (Or refund instead)

I am trying to prevent paypal for allowing a payment I have created.
The scenario:
My App is creating a Payment. I get the payKey from PayPal and the Customer is redirected to PayPal.
When the Customer is not able to finish the Payment after 2 minutes I will delete the Order for him and then - if possible - I will force Paypal that the payment is not active anymore and the customer is not able to pay after these 2 minutes. For this I have to do at least of this:
send Paypal the payKey and tell Paypal: Do not allow to pay with this payKey! Just "Delete" the information for this order
after the customer paid - but after 2 minutes, so the order is deleted - I will tell Paypal the payKey and a refund has to be done right after the customer has paid. This is no problem I thought but because its an AdaptivePayment and chained paypal is not allowing me to refund the money because every receiver in the refund receiverList needs permissions to allow a refund by API Call.
So my question is:
Is it possible to prevent a Payment with an API call ? I did not find any information in the REST API Reference of PayPal.
The payKey cannot be deleted or change the expire duration. You can use delayed chained payment with IPN. You are the API caller and primary receiver, compare the transaction complete time with the paykey generation time to decide refund or pay secondary receivers.

Delayed Chained Payment - Payment must occur within 90 Days

As per the developer's guide, the payment to the secondary receivers must occur within 90 days, after which you cannot complete the payment as part of original chained payment.
MY question is how to transfer funds to secondary receivers if 90 days period to fund transfer lapsed?
DO I have to refund the funds back to the sender(buyer) and set the Adaptive payment process again?
You don't need to refund the money and start process again. Primary receiver can manually send the money to the secondary receiver , refer to https://www.paypal.com/us/webapps/helpcenter/helphub/article/?solutionId=FAQ1684&m=HTQ , but PayPal will charge transaction fee on this.

Primary receiver refunds a chained payment from their PayPal account; what happens?

I'm developing a PayPal chained payment app where
Primary receiver = the service provider, gets 90% of payment
Secondary receiver = marketplace, gets 10% of payment
It's all working in the Sandbox environment, but there's a snag - when the primary receiver logs into their PayPal account, and manually refunds a payment they received, the secondary receiver doesn't appear to return their 10% automatically.
E.g.:
Primary receiver was paid $100, passed $10 automatically to
secondary receiver.
Primary receiver decides to refund using PayPal
account interface.
Refund for $100 issued; but secondary receiver
keeps their $10. Primary receiver now out of pocket by $10.
I would like it so that the secondary receiver automatically refunds their portion of a payment if the primary receiver issues a refund.
From reading the documentation from the Refund API (https://developer.paypal.com/docs/classic/api/adaptive-payments/Refund_API_Operation/), I thought this was the default behaviour, no matter if the refund was initiated through an API call or manually through the PayPal account interface.
Do I have this wrong, or is it just a bug with the Sandbox environment?
Would be useful to have this cleared up, as couldn't find any existing threads on the matter.
Update
PayPal Technical Support have told me the following:
Thank you for contacting Merchant Technical Services.
From my understanding you would like to have when a primary receiver perform a refund, the secondary receiver will automatically issued a refund.
If you would like all the receiver to refund the amount, you have to pass the paykey. May I know how the payment was made? If it is using Pay API operation, you have to use Refund API in order to refund the transaction. The refund can't be done by using PayPal account.
Use the payKey of the original transaction in the refund API, it will solve your problem.
And in case if you wish to partially refund the amount, specify the amount to be deducted from primary and secondary receivers in the "receiverList" field.
For more, refer: https://developer.paypal.com/docs/classic/api/adaptive-payments/Refund_API_Operation/#table-3-additional-fields-for-refunds-of-specific-amounts-to-specific-receivers

Paypal - Adaptive Payments

Given a market place that has buyers and sellers exchanging goods. What is the best way to allow a buyer to make a purchase and with hold the money from the seller until the shipment has been received?
Chain payments force the primary recipient to be receive the majority payout. But if that is the case, we end up being force to pay the seller at point of sale instead of what the shipment is complete.
Buyer - pays the total amount
MarketPlace - receives percentage
Seller - receives majority of sale (after delivery confirmed)
Any thoughts on how to accomplish our goal with Paypal?
Thanks!
There are lots of things you can do and any of them could be the best solution. It seems like you are already on the right track with is adaptive payments. The type of adaptive payment I would go for would be a delayed chained payment. A delayed chained payment as described by paypal is
Delayed Chained Payments
By default, payments to all receivers in a chained payment are
immediate. However, you can choose to delay a payment to a secondary
receiver. For example, as primary receiver, you may require secondary
receivers to perform some action, such as shipping goods or waiting
for expiration of a return period, before making payment. To complete
the payment, you must explicitly execute a payment to secondary
receivers after the sender pays you. The payment must occur within 90
days, after which you cannot complete the payment as part of the
original chained payment.
You can find more info about this about a quarter of the way down the page here.
Hope this helps!
p.s. checkout their samples included with their sdk for the classic api here.

PayPal AdaptivePayment : What happens if the secondary receiver's out of cash when processing a Refund API

When processing the Refund API to the payment made by AdaptivePayment Pay operation if the secondary receiver does not have enough money in their account
what happens to the API call? would it fail as whole or would the missing fees be draw out of primary receiver's account?
Testing this scenario with instant chained payment, and refund was cancelled. So obviously its all or none.