Creating paypal buttons on the fly - paypal

I have a webapp, where users sell printing services, I want to allow my users to add a pay now buttons to their pages so customers can pay for their services.
My users specify their paypal email address etc in the settings and set up their services with a price etc.
What API should I use to create the pay now buttons on the fly ?
Thanks

You don't need an API for creating "pay now" buttons. You can either create the button from within your customer's Paypal accounts or dynamically generate with HTML (see HTML Variables for Paypal Payments standard).
One advantage of creating the buttons from your/their Paypal account is that you can get an additional layer of security (support for encrypting the form or using a hosted button id so user cannot change the amount submitted to Paypal).
However, if you deal with hundreds of different buttons then it makes more sense to dynamically generate the buttons and just perform additional validation when Paypal sends back the confirmation (either through PDT or IPN) before shipping your items.

You could use PayPal's JavaScriptButtons API and create your buttons dynamically with:
paypal.button.create(business, data, config, parentNode)

There is an button manager API that let's you create secure buttons - here is more info: https://www.x.com/developers/paypal/products/button-manager

PayPal offers different buttons based on your requirement.
Follow these steps to generate PayPal button:
Login to your PayPal Account
Click on Tools --> All Tools
Click on PayPal buttons
Now you are given few button options --> Buy Now is one if them.
Follow those three steps and then copy the code at the end of 3 steps and paste it in the page where you want this button to appear.
You are good to take Payments!

Related

PayPal Pay Now Button - Email Link

I have browsed this forum and been through the PayPal documentation but I am confused. I know what I need but cannot work-out how to specify it for my coder.
We have a .Net application that runs on our internal network. We use this application to create customer quotations. These quotations are emailed to our customers. I simply want the application to be create a link that I can send to the customer such then when it is opened it takes them straight into Paypal and allows then to make a payment for the quotation. Or maybe the link is embedded into the body of the quotation that I send. Either would be fine.
I know of programs that do this (Sage Line50 does it with Sagepay rather than PayPal) but I cannot get my head around the process. Most of my research is talking about taking payments from an external website but trawling through the PayPal documentation it looks like it should be possible. But I cannot figure out whether I need Smart Buttons or PayPal Me. The key thing is that I don't want to force customers to have a PayPal account so guest access must be an option.
Smart Payment Buttons would be ideal, and offer the best payment experience to your customers. However, they require your own server on which to host some HTML/JS for them. They do not offer a link that can take the customer directly from an email to a PayPal checkout.
I recommend using Smart Payment Buttons, if you are able to host one. The flow is:
Email -> page on your server with Smart Button -> PayPal payment.
The key thing is that I dont want to force customers to have a PayPal account so guest access must be an option.
PayPal.me does not meet that requirement
If your requirement is truly a link that proceeds directly:
Email -> PayPal.com checkout for payment (no webserver of yours) ... well, there two solutions for this.
One is to use PayPal invoicing, which can be emailed directly by PayPal, or can be a link which you share yourself (via your own email). A PayPal invoice can be created manually via: https://www.paypal.com/invoice/create . Or programmatically via the invoicing API (see developer.paypal.com)
The second way, which may work fine but is a very old web 1.0 way of doing things, is to start by going to http://www.paypal.com/buttons and create a Buy Now button for an item named "Placeholder", amount "777.88". Expand the section "Step 2", and uncheck the option to Save the button at PayPal. Do not change any of the customization options, particularly ones that add menus or input fields.
Once you have generated the code, click the option above it to remove code protection, and then switch to the E-mail tab.
This will give you a plain HTML link with a description and amount that can be set dynamically by your developer when sending your own email. Additional useful variables, such as invoice (for an invoice number that is unique for what is being paid for, and can't be accidentally paid twice) are documented here.
Again, Smart Payment Buttons should be preferred if you have a web server to act as an intermediary. Here is a skeleton demo of the experience.

Block countries for payment in Paypal

I have setup Paypal button on my website and my client want to block payment for some countries. Is there any option??
I recommend to not try this in code, just log into your PayPal account and do the following. This will set FOR SURE filters for your account.
Login to your Account.
Click on Profile
Click on My Selling Tools
Under Getting paid and managing my risk
Look for Managing risk and fraud
Click on Update
At the bottom, look for Risk Controls
Check the radio button for Country Monitor
Click on Edit
On the Choose your Countries page
Add the countries you don't want to sell to in the My Monitored Countries
Below check the radio button for Decline
Click on Save
Note, you can also control the dollar amount that you're willing to accept.

How to make PayPal recurring donation button for OTHER nonprofits

I would like to include PayPal recurring donation buttons on my website so that users can donate to other nonprofits/charities of my choosing. My website would include many of these buttons, and all money would be sent directly to these charities. How would I go about this? As far as I know, one can only create donate/subscription buttons where the money goes to the creator of the button. Thanks!
When you create the button make sure to uncheck the option to save the button at PayPal, which would bind it to that account.
When you do that the HTML code provided will include a "business" parameter that would be the email address of the account the profile should be created with and the money should drop in to.
Another option would be using the Express Checkout API, with which you can specify the account the money should go to with the SELLERPAYPALACCOUNTID parameter.

save button in my merchant's PayPal account

I have created my own Buy Now button where the amount is entered in a text box on my web page by users. My Paypal id hard written in this form. Is it possible to save this button in my own Merchant account?
Use the Standard Integration Wizard to create your button. Step 3, I think it is, in the process asks if you want to manage inventory for the button. If you click into the details for that one you'll see it has a check box for "Save to my PayPal account" which should be checked by default.
When you create a button with this option it gets saved in your button manager and can be adjusted in the future if you want.
If you're familiar with web service API's you can also use the Button Manager API to generate buttons that are saved in your account. If you're working with PHP my class library for PayPal will make that very simple for you.

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