5

I have paypal adaptive payments enabled in my website. When customer buy any product from a third party seller then about 90% of the amount seller gets and about 10% amount is transferred to me. Bu in case customer wants refund for that product then it should return amount from both accounts which are primary receiver and secondary receiver. So how to do that using refund api. I want to use this php api but i think it is only for one receiver.

Refund api

is there any other solution for this so payment will deduct from both the receiver primary and secondary ?

LoicTheAztec
  • 229,944
  • 23
  • 356
  • 399
Upendra Sharma
  • 575
  • 2
  • 9
  • 28
  • There's a particular `Refund` API for adaptive payments, what you're looking at is the `RefundTransaction` API which is for general merchant products (e.g. Express Checkout). See the answer below from @Zhao Samanta – pp_pduan Jun 20 '16 at 08:40

1 Answers1

2

Refer to https://developer.paypal.com/docs/classic/api/adaptive-payments/Refund_API_Operation/ ("Using the payment key to refund an entire payment" part ), you can call https://svcs.sandbox.paypal.com/AdaptivePayments/Refund API , The total amount from each receiver is refunded to the sender.

Zhao Samanta
  • 1,075
  • 1
  • 8
  • 6
  • Should I have to pass the payment key to this url or have to create any form to do that ? – Upendra Sharma Jun 20 '16 at 12:30
  • I have created a refund button in my e-commerce website, then should I pass the payment key to this url when I click on the button ? – Upendra Sharma Jun 20 '16 at 12:37
  • pay-key value is obtained from the previous Pay api response. Yes, you should pass the payment key to this url – Zhao Samanta Jun 21 '16 at 00:55
  • I created this code using documentation written in the link you shared http://pastie.org/10884919 What should i have to change in this code ? – Upendra Sharma Jun 21 '16 at 07:41
  • Can show me an example how to pass data to this url ? – Upendra Sharma Jun 21 '16 at 11:06
  • You can refund the full amount (primary and secondary) despite the fact that you are the secondary receiver? Do you need 3rd party permissions on the primary receiver's account for this? – theyuv Jul 12 '16 at 10:43