Which PayPal setup is best for marketplace? - paypal

Let me first explain how our web site works.
Buyer purchase a service on our marketplace via PayPal, and then wait for approval from service provider
If provider doesn't approve or time lapse, then we (the marketplace) refund to buyer
If provider approves, then we (the marketplace) hold the payment until the service is provided by the provider
If there is no dispute between buyer and seller after 3 days, we will pay the fee (deduct marketplace fee) to the service provider.
Initially I was thinking to perform all the above manually, but after researching more about PayPal, I found that adaptive payments could have automate some of our processes.
Adaptive payment version:
Buyer make a preapproved payment to us (the marketplace)
If provider doesn't approve, then we (the marketplace) just cancel the payment
If provider approved,then we (the marketplace) execute the preapproved payment, and then go through delayed chained payment
3 days after the service is done, and no dispute, execute the delayed chained payment to pay provider
However, there are some limitation in this:
Our buyer may buy the service more than 90 days ahead, but delayed chained payment only hold the payment for 90 days.
While it is possible for us to manually send the fund to provider, but it is possible to write some code to automate the lapsed delayed chained payment?
After googling about preapproved payment, some site owner complained that when they actually execute the payment, many buyer actually don't have sufficient fund or for some other reason that can fail the payment.
Is there any solution to lock in buyer payment first, then proceed it after service provider approves the request. So we (the marketplace) can hands off on the refund part.

You can use Paypal adaptive payment.
First execute pay call with actionType of PAY_PRIMARY and wait for 3 day to pay to your secondary receiver (Provider).
Here is link to paypal documentation

Related

Paypal checkout for marketplace where buyer pays seller directly

I am running a marketplace for video games. When a buyer buys an item they can directly pay the seller through Paypal by setting the 'business' variable to the Paypal account of the seller in the link that will send the buyer over to Paypal to complete the purchase.
While this works most of the times, there are downsides to this approach as the website fully depends on receiving the IPN of the transaction. In very rare cases, Paypal fails to send the IPN (server logs show that there was no such request to the listener script – even hours later).
Is there a way to integrate a direct payment from buyer to seller where the website immediately gets feedback that the purchase has been completed (via JS-API or similar), so the website does not only depend on the IPNs?
I have seen a few similar questions on StackOverflow, but the solutions mentioned in answers have been deprecated as far as I can see (Adaptive Payments are no longer supported for new projects).
Integrate PayPal checkout with a server-side pattern. Here is the front-end UI: https://developer.paypal.com/demo/checkout/#/pattern/server , which will call two routes on your server.
Those routes will in turn call the PayPal API to 'Set Up Transaction and 'Capture Transaction', respectively: https://developer.paypal.com/docs/checkout/reference/server-integration/
The above has no dependency on asynchronous IPN or webhooks.
Since the buyer will be paying the seller and not your account, you can use the custom 'payee' object to specify this: https://developer.paypal.com/docs/checkout/integration-features/custom-payee/

Website subscriptions via Express Checkout Recurring Payments

I'm trying to implement a recurring subscription to a website using PayPal Express Checkout Recurring Payments. One requirement is that creating the initial subscription should be as quick as possible: once the customer confirms the purchase, the merchant should receive the money and activate the subscription in a couple of minutes tops.
As far as I understand, I have the following options to go with:
use CreateRecurringPaymentsProfile only, with billing starting now
use CreateRecurringPaymentsProfile with initial payment, starting now
use DoExpressCheckoutPayment followed by CreateRecurringPaymentsProfile starting now + 1 billing period
Initial testing in the sandbox has shown that plain CreateRecurringPaymentsProfile schedules payments once a day, which rules this option out. Option 2 (Recurring Payments Profile with an initial payment) looked promising -- payments usually went through in a couple of seconds -- until the initial payments started being delayed by half an hour or more.
So, a couple of questions:
What is the intented way to implement on-line recurring payments via PayPal?
Does the sandbox share payment scheduling behavior with the live site?
What is the intented way to implement on-line recurring payments via PayPal?
Answer:The recurring payment via Express Checkout is a good way.
The subscription button via Website Payments Standard is also a good way which is more easy to implement.
Does the sandbox share payment scheduling behavior with the live site?
Answer:yes, sandbox has the same payment scheduling behavior as live.
BTW, if you want initial payment be charged right away, you should use Option 3, initial payment will be changed right away after DoExpressCheckoutPayment.
Option 2 only guarantee initial payment be charged in 24 hours.

How to use billing agreement with chained payments?

We are setting up our marketplace transactions with PayPal and thus want to use chained payments for simple processing and to prevent being a funds aggregator.
As we want to capture buyers payment method once (upfront) and allow them to buy services from sellers later without entering their payment details every time, PayPal has 2 options: 1) pre-approvals, or 2) billing agreements.
However since buyers should also be able to pay with credit card, we can only use option 2) billing agreements.
Is our understanding correct that billing agreements are not compatible with chained payments?
Also, if they are not compatible, how can we go about it to allow for:
- Users to pay with credit card
- Not have them enter the credit card details every time at the time of purchase
- Use chained payments (prevent funds aggregation which would happen if we receive funds first and payout in a second operation)?
Thanks!
Preapproved Payments is part of the Adaptive Payments platform. Depending on what you're doing with the transaction when the time comes to submit a payment with a preapproval profile you may use a simple payment, parallel payment, or chained payment.
What you're after, billing agreements, is part of the Express Checkout API or Payments Pro. The actual term for what you'll be working with is Reference Transactions.
If you process a credit card directly over Payments Pro (either sale or auth) then you can simply use that transaction ID you get back with the DoReferenceTransaction API at any point in the future to process another transaction automatically.
If you process the original sale or authorization with Express Checkout, that's where you need to include billing agreement parameters in your SetExpressCheckout request to create that billing agreement, but then you'd still use the DoReferenceTransaction API to process future payments.

Refunds Using Paypal's Delayed Chained Payments

I am currently developing a web application which is a booking system for events.
Basically i want to use PayPal's Delayed Chained Payments system to do this:
BUYER makes a purchase through web app
ADMIN is the primary receiver of the funds
SELLER receives the funds 7 days after the event has occurred (less commission for ADMIN)
The reason i am leaving a 7 day period until the SELLER receives the funds is to allow for refunds and cancellations.
My question is:
Does the API allow me to interveen the delayed payment before the 7 days has elapsed, thus cancelling the payment to the SELLER and allow me to directly refund the BUYER the full amount. This is my ideal situation as it means their will not be the problem of the SELLERS account not having sufficient funds for the refund.
If anyone could help it would be great!
With Delayed Chained Payments you'll have the ability to cancel or execute the payment whenever you need to (within 90 days). So if the seller isn't able to supply the product to the buyer (or whatever reason) you can cancel the transaction.
Submitting a refund after a payment has been executed is a little tricky.
So to do a refund for a Chained Payment transaction you'll need to use the Permission Services API calls for the receivers to allow you to process refunds on their behalf. If they don't, you cannot refund the payment sent to another recipient.
After make delayed chained payment if you are not execute payment to secondary receiver then you can refund full amount of payment using refund api Call but you need to grand third party access .using grant api access

Detecting cancellation of a paypal billing agreement setup with reference transactions

I am using the 'reference transactions' of the Paypal express checkout api to set up a recurring billing scenario for our customers. I have chosen this method since the amount billed per month will vary and there is no initial payment when entering into the billing agreement.
My question is, can I use the paypal IPN to detect when the user cancels this? I know that if the customer enters into this agreement they have the power to log into their own Paypal account and cancel the agreement. What variables should I be listening for through the IPN?
Whilst I see mention of recurring payments and recurring payment profiles in the IPN documentation these are not actually the same as setting up a recurring billing scenario via reference transactions (recurring payments and reference transactions are in two different parts of the general paypal api documentation).
Enable IPN in your PayPal account , then PayPal will notify you via IPN about the Billing agreement cancel from the customer.
If you include IPN with SetExpressCheckout, it will not work with Reference Transaction. You need to Enable IPN on PayPal site.