This page is a supplement to an article titled Receiving Unique Payments with PayPal. If you came here directly and it doesn’t make sense, be sure to read the article for an introduction.

Form input

What is it?

This form can be put on your website and made available to your clients for convenient invoice payments. It provides an easy way for them to define both the invoice number and the amount of money they owe you or your company. It doesn’t ask for any credit card information, which is handled by PayPal in the next step, so you don’t need an SSL certificate and/or a dedicated IP address.

How do I do it?

  1. Copy the code below and paste it into your web page.
  2. Change the business value from yourpaypal@emailaddress.com to your actual PayPal email address.
  3. Change the item_name value from Invoice-Payment to anything you like. This value appears on the PayPal page and represents the title of the transaction. It can be a product name, a service name, a part name, or your Uncle’s name. Really, anything is valid here.
  4. Change the few instances of invoiceNumber to anything you like. I chose Invoice number because it’s general enough and suits my particular needs.
  5. Add/edit/remove any classes, IDs, and XHTML elements to flavor the form more to your liking.

Note: I haven’t included any type of form validation but I recommend you do; here are some options.

Code

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<div>
	<input type="hidden" name="cmd" value="_xclick" />
	<input type="hidden" name="business" value="yourpaypal@emailaddress.com" />
	<input type="hidden" name="item_name" value="Invoice-Payment" />
	<input type="hidden" name="currency_code" value="USD" />
</div>
<p>
	<label for="amount">Payment amount:</label> <input type="text" name="amount" id="amount" /><br />
	<label for="invoiceNumber">Invoice number:</label> <input type="text" name="item_number" id="invoiceNumber" /><br />
	<input type="submit" value="Next step" />
</p>
</form>

Demo

Feel free to enter any Payment amount and Invoice number below and click Next step. On the page that follows, take note of how these values are displayed and be sure to not go any further than that, unless you really want to give me money… which is cool with me.

(ex. 3255.85)
(ex. 1506)

Direct link

What is it?

It’s a link that you can send to your clients, in an email for instance, allowing them to click it and pay you or your company a pre-determined amount of money. It contains a few details that you can change to represent particular details about the transaction.

How do I do it?

  1. Copy the code below and paste it into an email.
  2. Change the business value from yourpaypal%40emailaddress%2ecom to your actual PayPal email address. Take note of the special characters and be sure to use %40 instead of @ and %2e instead of . like in the example below.
  3. Change the item_name value from Hosting-May-2008 to anything you like. This value appears on the PayPal page and represents the title of the transaction. It can be a product name, a service name, a part name, or your Uncle’s name. Really, anything is valid here.
  4. Change the item_number value from Invoice264 to anything you like. I chose to use a specific invoice number because, in my situation, it helps me to remember details about the transaction.
  5. Change the amount value from 189%2e50 to the invoice amount currently being requested. Take note of the special characters; 189.50 should be written as 189%2e50.
  6. When you’re done changing the values, put all of the code on one line, be sure there are no spaces, then send the email to your client.

Code

https://www.paypal.com/cgi-bin/webscr?cmd=_xclick
&business=yourpaypal%40emailaddress%2ecom
&item_name=Hosting-May-2008
&item_number=Invoice264
&amount=189%2e50
&currency_code=USD

Demo

Feel free to click the link below. On the page that follows, take note of how these values are displayed and be sure to not go any further than that, unless you really want to give me money… which is cool with me.

Pay your invoice