Cannot pass amount from my site to paypal using the paypal generated donate button code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I created a donate button allowing the user to enter the amount they wish to donate. I added the following line to test:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="amount" value="25.00"> <!-- I added this line -->
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="MYCUSTOMBUTTONID">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_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">
Clicking the Donate button opens the Paypal site, but the amount is blank.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You're using a 'hosted' PayPal button. You can't add in this variable directly in the code.
You'll need to go to your PayPal Profile > My selling tools > My payment buttons and update the button(s) listed there.
For technical assistance with PayPal merchant product offerings, please file a ticket at https://www.paypal.com/mts/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't understand what I need to update. There are only hosted buttons there. When I go into advanced options and add "amount" to the advanced variables Paypal generates the same script as when I don't have any advanced options.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello jester,
The amount would actually be updated in Step 1 of the button creation tool (Action > Edit button).
The code will remain the same, but because the button is 'hosted' (all confidential information is securely stored with PayPal), it will be updated on our end. As soon as you update the button in the button tool, the proper amount will be used upon checkout.
For technical assistance with PayPal merchant product offerings, please file a ticket at https://www.paypal.com/mts/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay, I can edit the button to tell it to use the advanced variable "amount=0" in step 3 for the hosted Donate button. Now instead of a blank amount field on Paypal, I get a "0" regardless of the amount entered on my site. It seems to me that the button is rather usless if I cannot pass the amount to Paypal with it.
What am I doing wrong?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You shouldn't use the advanced variables section. Use the "Amount" field in Step 1 instead.
For technical assistance with PayPal merchant product offerings, please file a ticket at https://www.paypal.com/mts/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay, so in step one there are two options for the amount. Enter a specified amout, such as $25. If I choose this amount then Paypal will always enter $25 for the amount regardless of the amount the user enters on my site. If I do not use the advanced variable and choose to let the user enter an amount in step one, Paypal will show a blank amount regarless of the amount the user enters on my site. There is no option to allow me to pass the amount from my site to Paypal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I should have searched farther for my problem, as you are having the same issue as I. I decided to not use a secure hosted button, and instead set the "cmd" input field to "_donations", and now I can fill in the "amount" input field to what ever I wish. Unfortunately, it is not secure, but it appears to be the only way around my (and your) problem.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Donate image not working in Merchant services (Archive)
- Donate Button does not work in FF or Chrome in Merchant services (Archive)
- Customize Receipts in Reporting and tracking (Archive)
- Add to Cart Drop Down Menu Problem (challenge) in Merchant services (Archive)
- Donate and Subscribe Button in one form in Merchant services (Archive)