Can you create an Open Amount PayPal button

erocafellar
Contributor
Contributor

I thought you used to be able to crate a paypal button where a customer inputs the amount vs a fixed set price or having pricing levels.

 

I know the Donate button is similar, but is there an official Payment button that does this?

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

snowshoe
Frequent Advisor
Frequent Advisor

Yes, depending on the type of button determines what needs to be done.

 

If you want to allow your customers to input an amount on the PayPal Screens for a Buy Now Button, just enter a "0" in the "Amount" Field when you are creating the button.   This method works for people who want to use the online button creator.   Note, this will not work for Add to Cart item buttons.

 

For Add to Cart, you can create an "amount" input box.  Using this method, you must manually code the item button  See the example below, it's a common Pay Your Bill Online solution:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>Button Example Code</title>

<!-- START META TAG SECTION -->
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="Content-Language" content="en">
<!-- END META TAG SECTION -->



</head>

<body>

<!-- START SAMPLE CODE SECTION -->


<!-- PARAGRAPH 1 -->
Pay Your Bill Online Examples

<br><br>

Add to Cart - Customer Enters Amount, very simple.

<br><br>
Notes:
<br>
This is an Add to Cart example.&nbsp;&nbsp;  Once on the PayPal Screens, the customer can change the Quantity as this behavior is normal for Add to Cart functionality.


<br><br>
<hr align="left" width="50%" noshade>
<br><br>

<!-- START CONTENTS -->

<!-- START BUTTON EXAMPLES -->


<!-- Start of Add to Cart Form -->
<!-- Note: target="_self" was replaced with the variable target="_self" -->
<!-- Note: shopping_url also added to code -->
<!-- These two changes allow better functionality with IE and Firefox --> 
<form target="_self" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- If using a Business or Company Logo Graphic, include the "cpp_header_image" variable in your View Cart code. -->
<input type="hidden" name="cpp_header_image" value="https://www.yourwebsite.com/logo.jpg"> 
<input type="hidden" name="on0" value="Customer Number">Please Enter Your Customer Number:&nbsp;&nbsp;
(Example:&nbsp;&nbsp; 99999999)
<br><br>
<input type="text" name="os0">
<br><br>
<input type="hidden" name="on1" value="Invoice Number">Please Enter Your Invoice Number:&nbsp;&nbsp;
(Example:&nbsp;&nbsp; 99999999)
<br><br>
<input type="text" name="os1">
<br><br>
Enter Amount Due :&nbsp;&nbsp;
(Example:&nbsp;&nbsp; nnn.nn)
<br>
<input type="text" name="amount">
<br><br>
<input type="reset" name="reset" value="Clear Selections">
<br><br>
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<!-- Replace "business" value with your PayPal Email Address or Account ID -->
<input type="hidden" name="business" value="your email address">
<input type="hidden" name="item_name" value="Online Payment">
<input type="hidden" name="item_number" value="OLP-00001">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="shipping" value="0.00">
<input type="hidden" name="tax" value="0.00">
<!-- Replace value with the web page you want the customer to return to -->
<input type="hidden" name="shopping_url" value="http://www.yourwebsite.com/Pay_Online_02.html">
<!-- Replace value with the web page you want the customer to return to after a successful transaction -->
<input type="hidden" name="return" value="http://www.yourwebsite.com/ThankYou.html">
<!-- Replace value with the web page you want the customer to return to after item cancellation -->
<input type="hidden" name="cancel_return" value="http://www.yourwebsite.com/Cancel.html">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="country" value="US">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-ShopCartBF:btn_paynowCC_LG.gif:NonHosted">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="cn" value="Add special instructions to the seller:">
</form>
<!-- End of Form -->

<br>

<!--  Start of View Cart Button Code  -->

<form target="_self" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- If using a Business or Company Logo Graphic, include the "cpp_header_image" variable in your View Cart code. -->
<input type="hidden" name="cpp_header_image" value="https://www.yourwebsite.com/logo.jpg"> 
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="display" value="1">
<!-- Replace "business" value with your PayPal Email Address or Account ID -->
<input type="hidden" name="business" value="your email address">
<!-- Replace value with the web page you want the customer to return to -->
<input type="hidden" name="shopping_url" value="http://www.yourwebsite.com/Pay_Online_02.html">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_viewcart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

<!--  End of View Cart Button Code  -->


<!-- END BUTTON EXAMPLES -->



<!-- END SAMPLE CODE SECTION -->

<br><br><br><br>
<hr align="left" width="50%" noshade>
<br><br>
NOTES:
<br>
In order to test the code, you must replace the &quot;business&quot; value variable with your PayPal Email Address or Account ID.

</body>
</html>

 

 

Note, there are tricks for other types of buttons too.

View solution in original post

Login to Me Too
1 REPLY 1
Solved

snowshoe
Frequent Advisor
Frequent Advisor

Yes, depending on the type of button determines what needs to be done.

 

If you want to allow your customers to input an amount on the PayPal Screens for a Buy Now Button, just enter a "0" in the "Amount" Field when you are creating the button.   This method works for people who want to use the online button creator.   Note, this will not work for Add to Cart item buttons.

 

For Add to Cart, you can create an "amount" input box.  Using this method, you must manually code the item button  See the example below, it's a common Pay Your Bill Online solution:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>Button Example Code</title>

<!-- START META TAG SECTION -->
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="Content-Language" content="en">
<!-- END META TAG SECTION -->



</head>

<body>

<!-- START SAMPLE CODE SECTION -->


<!-- PARAGRAPH 1 -->
Pay Your Bill Online Examples

<br><br>

Add to Cart - Customer Enters Amount, very simple.

<br><br>
Notes:
<br>
This is an Add to Cart example.&nbsp;&nbsp;  Once on the PayPal Screens, the customer can change the Quantity as this behavior is normal for Add to Cart functionality.


<br><br>
<hr align="left" width="50%" noshade>
<br><br>

<!-- START CONTENTS -->

<!-- START BUTTON EXAMPLES -->


<!-- Start of Add to Cart Form -->
<!-- Note: target="_self" was replaced with the variable target="_self" -->
<!-- Note: shopping_url also added to code -->
<!-- These two changes allow better functionality with IE and Firefox --> 
<form target="_self" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- If using a Business or Company Logo Graphic, include the "cpp_header_image" variable in your View Cart code. -->
<input type="hidden" name="cpp_header_image" value="https://www.yourwebsite.com/logo.jpg"> 
<input type="hidden" name="on0" value="Customer Number">Please Enter Your Customer Number:&nbsp;&nbsp;
(Example:&nbsp;&nbsp; 99999999)
<br><br>
<input type="text" name="os0">
<br><br>
<input type="hidden" name="on1" value="Invoice Number">Please Enter Your Invoice Number:&nbsp;&nbsp;
(Example:&nbsp;&nbsp; 99999999)
<br><br>
<input type="text" name="os1">
<br><br>
Enter Amount Due :&nbsp;&nbsp;
(Example:&nbsp;&nbsp; nnn.nn)
<br>
<input type="text" name="amount">
<br><br>
<input type="reset" name="reset" value="Clear Selections">
<br><br>
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<!-- Replace "business" value with your PayPal Email Address or Account ID -->
<input type="hidden" name="business" value="your email address">
<input type="hidden" name="item_name" value="Online Payment">
<input type="hidden" name="item_number" value="OLP-00001">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="shipping" value="0.00">
<input type="hidden" name="tax" value="0.00">
<!-- Replace value with the web page you want the customer to return to -->
<input type="hidden" name="shopping_url" value="http://www.yourwebsite.com/Pay_Online_02.html">
<!-- Replace value with the web page you want the customer to return to after a successful transaction -->
<input type="hidden" name="return" value="http://www.yourwebsite.com/ThankYou.html">
<!-- Replace value with the web page you want the customer to return to after item cancellation -->
<input type="hidden" name="cancel_return" value="http://www.yourwebsite.com/Cancel.html">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="country" value="US">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-ShopCartBF:btn_paynowCC_LG.gif:NonHosted">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="cn" value="Add special instructions to the seller:">
</form>
<!-- End of Form -->

<br>

<!--  Start of View Cart Button Code  -->

<form target="_self" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- If using a Business or Company Logo Graphic, include the "cpp_header_image" variable in your View Cart code. -->
<input type="hidden" name="cpp_header_image" value="https://www.yourwebsite.com/logo.jpg"> 
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="display" value="1">
<!-- Replace "business" value with your PayPal Email Address or Account ID -->
<input type="hidden" name="business" value="your email address">
<!-- Replace value with the web page you want the customer to return to -->
<input type="hidden" name="shopping_url" value="http://www.yourwebsite.com/Pay_Online_02.html">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_viewcart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

<!--  End of View Cart Button Code  -->


<!-- END BUTTON EXAMPLES -->



<!-- END SAMPLE CODE SECTION -->

<br><br><br><br>
<hr align="left" width="50%" noshade>
<br><br>
NOTES:
<br>
In order to test the code, you must replace the &quot;business&quot; value variable with your PayPal Email Address or Account ID.

</body>
</html>

 

 

Note, there are tricks for other types of buttons too.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.