PayPal adaptive payment delayed chained payment's receiver configurations - paypal

I am using PayPal adaptive payment delayed chained payment. The process is unintuitive.
Q1: How to process the payment to the secondary receiver?
API calls are made as below:
1. Make Pay API call with actionType=PAY_PRIMARY which will only process the payment to the primary receiver
2. Explicitly process the payment to secondary receiver.
How do I process step 2 above? Do I use ExecutePayment API operation? (This does not look correct since in the documentation it says to use payKey however payKey would be expired by the time I need to process the payment to the secondary receiver.)
Q2: Is it ok to use SECONDARYONLY as feesPayer in delayed chained payment?

A1: You would make a call to ExecutePayment passing the PayKey as a parameter. To clear up your doubts, the PayKey has a shelf life of 3 hours before the payment is initiated.
Once the payment has been approved by the customer (i.e. the first leg of the chained payment is completed) the PayKey becomes permanent and does not expire.
For a delayed chained payment, PayPal gives you 90 days to explicitly complete the second leg. After that, it will not allow you to do so, and the primary would need to manually send the money to the secondary receiver.
A2: Yes, but you can only use this variable when you have a single secondary receiver.

Related

Is it able to change the secondary receiver for delayed adaptive payment?

As title,
Is it able to change the secondary receiver? I am the primary receiver, i am intend to use delayed adaptive payment for my system, the thing is , before i want to release the payment, the secondary receiver might be happen doesn't complete the job i specified, another secondary receiver might completed the job, but i am intend to change the secondary receiver so the secondary receiver which doesn't complete the job cannot receive the money. Am i able to change the secondary receiver?
Nope. It is not allowed to change it.
Within 90 days, you are able to release the money until all the receivers have performed some actions, the money will be credited to all the secondary receivers together.
You will not be able to change the secondary receiver email in ExecutePaymentAPI as it takes only payKey as parameter.
The delayed chain payment expires after 90 days, if you fail to call the ExecutePayment API the transaction expires.
As a side note from personal experience: If you try using Express Checkout and then MassPay, PayPal will not approve your business application because, and I quote, "They don't have visibility of initial payments". The only option is to use Chained Payments or Parallel Payments.
I had Express Checkout and Implicit Adaptive Payments set and my business application was denied. So I suggest you stick to using chained payments.
https://developer.paypal.com/docs/classic/adaptive-payments/integration-guide/APIntro/
Once the secondary receiver is set in the PAY API, it is not possible to be changed later. To fulfill your requirement , I hereby suggest you firstly collecting the full funds from the payer, via PayPal's Adaptive Payment or Express Checkout. And then call MassPay API to send funds to your secondary receivers. Please refer to below page for more details about MassPay API.
https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/MassPay_API_Operation_NVP/
Please also be noted that MassPay is a feature that needs to be requested access to and approved. Please use below links to contact PayPal's Customer Service teams to request this feature.
http://www.paypal.com/cgi-bin/webscr?cmd=_contact-general
http://www.paypal.com/cgi-bin/webscr?cmd=_contact-phone

Can I use a chained payment in combination with 3-day capture?

User makes a request. Request may or not be fulfilled within 3 days.
If not, no payment processed. If yes, user payment processed and payment to primary receiver.
At a later date, the primary receiver will manually relinquish payment to the secondary receiver.
Can I use a delayed capture with the chained payment? Does it make sense?
Sounds like you'd need to use a Preapproval profile for the first part, and then you could hit the Pay API within that 3 days and process the chained payment using the Preapproval key. That would send the funds to the primary receiver, and then you'd use ExecutePayment to trigger the secondary payments when you're ready to process them.

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.

PayPal Subscription Payment Failed

When a subscription payment fails, PayPal will retry for n times.
What transaction type (subscr_cancel or subscr_eot) is sent back via IPN, after all retries fail?
The specifics depend on the PayPal product you're using, although the logic works similar(`ish) across both Website Payments Standard subscription buttons and Express Checkout Recurring Payments (via the CreateRecurringPaymentsProfile API):
This depends on whether you've set MAXFAILEDPAYMENTS or not. If MAXFAILEDPAYMENTS > 0 is set, it will cancel the subscription after n number of attempts and you'll receive a subscr_cancel. If you have it set to MAXFAILEDPAYMENTS=0, you'll get recurring_payment_skipped and the recurring payment will be marked as having an outstanding balance. If you specify AUTOBILLOUTAMT=AutoBillAmt, the outstanding balance will be added to the next billing cycle.
I would suggest taking a look at https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_IPNandPDTVariables#id091EB0901HT which lists all IPN variables, including the ones for recurring payments.
Paypal returns subscr_failed for this case, and the possible return values are:
subscr_signup: subscription sign-up.
subscr_cancel: subscription cancellation.
subscr_failed: subscription payment failure.
subscr_payment: subscription payment.
subscr_eot: subscription’s end-of-term.
subscr_modify: subscription modification.
Please click here for further clarification.