Marketplace using Paypal - php

Hi we are creating a mobile app for marketplace where we are hoping to get eBay model implemented. Where buyer will pay the seller and we will take our cut from the seller. We actually don't want to get payment ourself for the sale and handle the disputes for order shipping or chargebacks.
When a sale is done on our app, the buyer should send the payment to the sellers paypal and then Paypal will handle all the other stuff regarding that like disputes or chargebacks.
I want seller to link his paypal account to our app and we will take permissions for future payments and maintain a record where we can calculate his fee regarding sales made on our platform. Paypal Mobile SDK support this feature.
But my question here is how can we automate the original purchase process? One option is when a sale is done, we will send invoice from seller side to the buyer (possible using Paypal REST API) and open invoice pay link on the buyer side. Once the buyer pay the invoice and transfer the funds to the seller we will know that sale is approved successfully because as a Paypal facilitator we have access to that invoice (we actually sent that invoice to the buyer as we have permissions of invoicing of seller account).
But what if we don't want invoicing system? Can we implement anything where buyer will send the funds to the seller without generating an invoice from our app. Like when a sale initiated, we will present buyer a page where he will pay directly to the seller (without us involved) and we will track that transaction and make outstanding cut on that sale?
My Research so far
Payapl mobile SDK for iOS don't allow us to take permissions for invoicing, we can take single, future or profile sharing permissions in app
Paypal Rest API allow us to take permissions for invoicing but not for future payments (that is necessary to take our cut from the seller's account)
If we use Paypal Mobile SDK, we can take funds in our account but not directly to our sellers account
Adaptive payments is an option where can take funds from buyers and after deducting our cut send the rest to the buyer but in that case we will be primary recipient and seller will be secondary, being a primary recipient we are responsible for shipping the product which at this stage we don't want. Want want to be seller as primary recipient
Any help regarding our situation would be greatly appreciated. We just want to automate the system somehow with the APIs and SDKs without being the primary recipient. Please give us suggestion to make this a reality. Thanks
Using any other payment gateway like Stripe or Braintree will not help here because in that case we will be taking money as registered merchants. We would really like to work with Paypal for handling all order related stuff

The Express Checkout API supports Parallel Payments, in which case you specify the SELLERPAYPALACCOUNTID in the request. This is where the money for that particular payment would be sent.
You can use this functionality even with a single payment on the order, though. So you can just setup a single payment and include that SELLERPAYPALACCOUNTID parameter, and the money will go directly to that account.
When doing this you can use your own API credentials and no permissions or anything are required from the 3rd party account to send the funds directly to them.
This PayPal PHP SDK will make the Express Checkout API calls very quick and easy for you, so you could just setup some simple PHP services to hit from your mobile app(s).

Related

Can one Create Auto Orders using PayPal payments api - where tokenised payments are initiated from website not using paypal repeat purchases?

We currently have a website that uses eWay token payments and setup Auto Order for customers. They can manage what items are in the auto orders and at what frequency the orders will be placed.
After the first order we can save the users 'Token' with eWay and charge their card at each instance.
We would like to add in the ability to pay with PayPal, but cannot see a similar feature where future orders can be placed without the user interacting.
The issue is that the price may differ from original payment, as discounts for the item may change or the user could add in other products to the auto order. So we don't want to have a repeat purchase setup in PayPal, rather automatically charge the users account when needed.
Been looking through paypal API docs and nothing is jumping out as the correct way to proceed.
We have tried payments through eWay to PayPal however they are not supporting paypal through their gateway anymore so are not much help.
Our website is PHP, Mysql driven and we currently use PayPalExpress checkout API for single orders.
For PayPal, the receiving account needs a feature called "reference transactions". This is not enabled by default in the live environment (though it is in sandbox). It requires business approval, so the PayPal account owner should contact PayPal's general customer support or an account manager (note: not technical support) to discuss the business need for the feature.
Once approved for the "reference transactions" feature on a live business account, PayPal can guide you on which API to best integrate to make use of this. Something like v2 or v3 vault and that API's payment tokens are a possibility that sounds exactly what you are describing, though there are other (older/legacy) APIs that use something called a "billing agreement" as what's effectively a token as well.

Stripe - Payout the sellers with custom amounts (On demand)

The situation
In my e-commerce project, I'm using stripe card element to catch payments from customers to the platform's Stripe account. After my Laravel application listens to the webbook of a successful payment that is fired by Stripe, the app then fires a job to add credit on the seller's platform account. This part works perfectly fine.
The question
Is there a way to add some sort of a button in the seller's profile on the platform that allows the seller to receive exactly the amount that is on their account on the platform?
Let's say he has $100 credit on the platform, after clicking 'pay me' button, the seller will get this $100 paid out from the platform's stripe account to his bank account.
I have accomplished until now:
1- A visitor can add item to cart and checkout.
2- Uses stripe card element to take the payment.
3- When payment is successful, the amount goes to the platform's stripe account.
4- The application listens to successful payment webhook and adds credit to the seller's account on the platform (As simple as having a column on the database for each seller with the default of 0 and it increases upon each successful customer payment).
Thoughts
What do you think about this? https://stripe.com/docs/connect/add-and-pay-out-guide
I'm thinking of using this technique since I'm doing everything manual. I believe I can skip the part where I top-up my Stripe account (Since it should be having credit by default from the successful payment).
So here is what I think:
0- A customer makes a successful payment towards some products and the application catches Stripe webhooks and fires a job to add credit to the seller's platform account.
1- The seller receives a notification that he has credit on the platform's account.
2-  The seller then can click on a button that takes him to a route where I redirect him to create (stripe express account)[https://stripe.com/docs/connect/add-and-pay-out-guide?integration=with-code#with-code-create-account-link]
3- After the seller gets redirected to the platform again and I catch the webhook that account has been created, The seller then will be redirected to receive the determined amount by my platform. https://stripe.com/docs/connect/add-and-pay-out-guide?integration=with-code#with-code-pay-out-to-user
You can ask your sellers to register an express account when they onboard your platform, so that your sellers can submit all necessary documentation for account verification and make their accounts payout enabled.
When your customer is about to make a payment, you should create a destination charge so that Stripe can automatically transfer the funds from platform to a connected account, you can also opt to charge an application fee from this transaction if you wish.
Stripe will automatically perform payouts based on the account's payout schedule , if you prefer to do it manually, change the schedule's interval to manual . Visit this page to learn more about manual payouts.

Manage Payment Flow Through Php Api

i had done simple payment and reccuring payment in paypal using php..but now i want do payment like ebay system..i want manage seller account,middle patry account,buyer account. when buyer order for any product that time money tranfer from buyer account to middle party account and when buyer got product at that time money tranfer from middle party to seller account..i want make this system using php..i tried for create customer and add charge in stripe..but i dont know how to deduct charge from middle party in stripe php api
You can check the whole Stripe API available for PHP at this link and check what meets your needs:
https://stripe.com/docs/api?lang=php#intro

How do large merchant resellers process payments and payouts?

I am looking for information on how large resellers collect payments and pay the people who sell on their site. (e.g. Redbubble.com, a company that pays artists a commission for their work)
Specifically, I am looking for different solutions that cover a few key functions at minimal cost (like Paypal fees)
Ability to take payment from credit cards and paypal (others a benefit)
Track sales for each merchant as payments are processing
Collect payments in central account
Payout all processed payments on a monthly basis
P.S. I imagine there are a few ways to do this, I am hoping to gain some insight on what solutions have been proven.
P.P.S. This is not a technology specific question. Whatever APIs or third party solutions you know of are fair game.
Thanks for your knowledge!
Try PayPal adaptive payments.
Paypal Adaptive payments
You can also try Stripe to collect funds to one account and to trasfer them to third party acccounts but this only works in the US.
Stripe Payments
You could use the Adaptive Payments API and that would allow you to split the payments up among multiple receivers in a single transaction in real-time. If you go that route the API calls that you'd be interested in are...
Pay - This setups the actual payment and the receivers on the payment.
SetPaymentOptions - This allows you to provide more details like items, shipping, etc.
ExecutePayment - This actually processes the payment in the system after it's been setup with the previous calls.
PaymentDetails - This obtains details about a completed transaction.
Preapproval (possibly) - This allows you to get a Preapproval key for a user that will allow you to trigger payments on that users behalf at any time in the future with the use of the preapproval key.
PreapprovalDetails (if you use preapprovals) - This obtains details about an active preapproval profile.
To get all of that working in the live environment you'll need to submit an application through your PayPal developer account to obtain a Classic API App ID. For development on the sandbox there is a global App ID that can be used.
Another option would be to take payments on your site using any PayPal product like Payments Standard, Express Checkout, Payments Pro, etc. and have all the money come to your account, and then use the Pay API to distribute those funds out to people accordingly. This could be automated with an IPN solution and possibly the use of a CRON job on your server.
This is the method I like to use, and I typically go with a full Payments Pro / Express Checkout integration for payments on my site and then I distribute via the Pay API within an IPN solution or CRON job like I mentioned.

PHP: PayPal Integration

im building a site where 2 user groups exist: sellers and buyers. The buyers buy stuff and should pay to the sellers via PayPal.
So, its not a kind of a web shop where users are paying directly to me ( as a website owner/online shop), BUT TO THE OTHER USERS (sellers). So i need to forward a PayPal transaction from one user on my site (buyer) to the other one (seller).
I read some PayPal API Descriptions, but its assumed there that i want to process the PayPal Payments to my PayPal account, what's not my case.
An idea would be that sellers pay to me, and i then pay to buyers, but that's not what i want to do.
So , what I want is: the buyer should process the PayPal payment directly to the seller's PayPal account, and i should then receive the payment confirmation and inform the seller about it.
Does anyone have an idea, expirience or suggestion with this stuff? Thanks in advance!
You have a lot of options for how you can handle that.
One, you could use the Express Checkout API to build the checkout system, and you'd use the Permissions API (optional) so that users can easily grant your application permissions to make API calls on their behalf. Note that users could also do this manually through their PayPal profile until you get the Permissions part integrated.
To get your payments, you could have your users create a preapproval profile using the Preapproval API. This will allow you to submit payments on their behalf automatically at any time. As such, you could use the preapproval key within Pay calls directly in the checkout flow or within IPN (which is what I would recommend) to submit payments to yourself from the user's account.
Another option is to use a parallel payment within Express Checkout. This would handle splitting the payment for you automatically between the seller and yourself, but the buyer would see that split during checkout.
Another option would be to use the Pay API for the checkout which would allow you to create a chained payment. This is the same as a parallel payment except that it hides the split from the buyer, and you could actually delay the payment to secondary receivers if you need to for any reason.
Hope that helps.
if you have a buy now button or similar, use the sellers' email address as below
<input type="hidden" name="business" value="sellers#email.com">
and it will pay the user with that email address. If that's not their paypal address, it will prompt them to either sign up for paypal to receive or add it to a current account.
Then use PHP mail() or your CMS/Admin system to notify you when the successful payment page has been loaded after a referral back from Paypal.

Categories