0
votes

I want to use PayPal in android application, but because I think chained payments are too complex for PayPal android API I think better solution is to implement paypal in the web application and open that webpage in android webview. I'm using java as backend.

here is the scenario:

From android application user can buy some product. User complete the form and pay. The buyer is charged immediately, but seller doens't receive money until the buyer confirm that he receive the product. In the android application the seller receive notification that someone buy his product and send to the buyer. When buyer receive the product, he should confirm and call a web service from the backend and 95% of the money are released to the seller and 5% stay in my account.

I'm little confused how everything in paypal works. Can someone explain me the best solution for this scenario? I cannot find good examples of java chained delayed payment.

Thanks

1

1 Answers

0
votes

I don't have any Java samples specifically, but I can tell you that you'll use the Pay API to create the payment, and you'll set "actionType=PAY_PRIMARY" in the request parameters to specify that it will be a delayed chained payment. The receivers should be setup with a primary receiver that would have the amount set to the full order amount (without any split) and then the secondary receiver would be set to the amount they should get once that portion is released.

With that, the money will be sent to the primary receiver only, and the secondary receiver(s) will not get their money until you make a call to the ExecutePayment API. That's what you would trigger when the buyer confirms they received their product.