How to create Buy Now buttons for different merchants in paypal - paypal

I have a Digital Service Providing website. This service allows user's customers to take appointments for the services user is providing. Now the customers must be able to Pay for the service before confirming the appointment.
My requirement is each user of my website have different services and different price for it.
They have already configured these services on my web application. I have all details in the database.Now how can i integrate Pay Now buttons for this scenario? I do not want the user to configure the service price again on Paypal account?

There are a number of ways you can handle that. Do you have a shopping cart system setup on the site so people can browse and add service items and checkout all at once, or how exactly is that setup?
If you're tracking items and order price within a shopping cart you can use Payments Standard Cart Upload Method to easily gather order details and send the user over to PayPal for payment.
You could also use the Express Checkout API if you prefer web services. If you want to offer credit cards directly (without any PayPal redirect) you could include Payments Pro as well.
If you want to stick with standard buttons, but you want to automate the process, you can use the Button Manager API.

Related

PayPal as payment gateway on my marketplace website

I have a website where my users can create custom pages to sell virtual things. At the moment, the only payment gateway their buyers can use is Stripe since it's the only my website currently supports. I would like to add PayPal support, so my sellers can enter their PayPal email, then buyers can purchase goods using PayPal.
I looked into PayPal's API, and the only thing I could really find was the checkout API for commerce. I'm not interested in having any of that fancy API, or needing to have sellers enter API key(s). I simply want sellers to enter their PayPal email, and boom - done. I also do not want to have to get a verified business on PayPal if possible since I still need to do a lot of work before submitting my application for approval from PayPal.
Example:
Joe creates a page on my website to sell pictures. He wants to add PayPal support, so he goes to my website's dashboard, enters his PayPal email, and then clicks confirm. Now his buyers can purchase his pictures using PayPal.
Where should I be looking for information on this?
Create a PayPal business account. Follow the Set up standard payments guide and make 2 routes on your server, one for 'Create Order' and one for 'Capture Order', documented here. Both routes should return only JSON data (no HTML or text). Inside the 2nd route, when the capture API is successful you should store its resulting payment details in your database (particularly purchase_units[0].payments.captures[0].id, which is the PayPal transaction ID) and perform any necessary business logic (such as sending confirmation emails or reserving product) immediately before forwarding your return JSON to the frontend caller.
Pair those 2 routes with the frontend approval flow: https://developer.paypal.com/demo/checkout/#/pattern/server
To send the funds to another account, specify a payee in the order creation request.

Using Paypal (or alternative) so my customers can sell items directly

I've been searching Paypal's products and docs and I can't seen to confirm or deny if Paypal is a solution for what I need, so wanted to ask the community.
I run a web platform for creators to spin up websites. One common request is to create a page for them to sell their merch. I don't want to re-create Shopify/etc.. so have been telling them to go use that and link to their store from their website. But I'm wondering if there's an easy way to give them a very basic store experience using standard Paypal Buy Buttons.
My ideal approach:
Create a ShopItems model and users add items with price, description, shipping cost.
User adds their Paypal merchant ID
I generate a Buy with Paypal button that simply sends info to Paypal about the product being sold, how much to charge, etc..
I dont need any shopping cart functionality, and I dont want to have anything to do with the payment. I just want the end customer to feel like they're purchasing something (not sending someone $ via venmo), and have a place to add their shipping info, etc..
Currently, I see how a user can create accounts in their paypal account and then they're given a specific button for that item, but I'm trying to make this a little simpler where the user creates the product in my system and I just use Paypal for invoice/payment.
Would love any thoughts / ideas.
Integrate a version of PayPal Checkout: https://developer.paypal.com/docs/checkout/
Some sample demo code here: https://developer.paypal.com/demo/checkout/#/pattern/client (use the server version if you need robust payment completion notification -- this requires implementing two routes on your server, one for 'Set Up Transaction' and one for 'Capture Transaction', documented here: https://developer.paypal.com/docs/checkout/reference/server-integration/ )
If you know the merchant ID you're processing transactions for, this can be specified when loading the SDK: https://developer.paypal.com/docs/checkout/reference/customize-sdk/#merchant-id
Whether or not you specify a merchant ID on the SDK line, that same or some other identifier needs to be specified in the purchase_units payee object when setting up the transaction: https://developer.paypal.com/docs/checkout/integration-features/custom-payee/

Setting up automated payments

We use PayPal classic APIs.
We have a Linux server with some application/database running on it.
Users pay pages for ocr processing.
We need to offer to our users an option to make automatic payments when some condition is occured.
For example: when the user have left only 100 available pages.
In this case we want to offer to user something as "pay with PayPal 1000 pages everytime when my account have less than 100 pages".
Is this possible to do it with PayPal API?
Asolutely, this is simple to accomplish. If you prefer the Express Checkout API suite, the Reference Transactions product allows you to collect permission to re-bill your customers for additional goods and services when they check out. Then you call the reference transaction API when the event you are interested in (such as the user's inventory of prepaid pages gets low) occurs.
See:
https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns/
Other PayPal products support similar behavior in combination with Adaptive Payments, the RESTful APIs, etc etc.

Paypal on multiple websites

I would like to know if it was possible to sell products across multiple websites with a single paypal account?
I do not see any options on my management interface.
thank you
Yes, you can. PayPal makes it easy for sellers who use different brand names to manage multiple lines of business.
Therefore, you can setup your PayPal buttons or PayPal API to your individual websites.
For eg:
If you want to link your websites to your Single PayPal account for a Website Payment Standard button, then you just go ahead and create your button from PayPal(button factory)
and then use the generated button code in either of your websites.
Also, it's easy to receive payment notifications and manage orders by using a different email address for the two lines of business. More info here

Selecting optimal PayPal API

I've been given a task to integrate PayPal API to an already existing website, where buyer details should be taken out from the existing user database and all front-end design should be custom - created as part of whole system design.
I basically need to select PayPal API that will allow me to simply authorize and invoke credit card charge for selected amount of cache based on user details and credit card information.
Which of the PayPal API's is designed for this?
You would want to use Payments Pro for that.