# Donate: Sample HTML button code (/archive/paypal-payments-standard/integration-guide/html-example-donate)



> **Warning:** This product is [deprecated](/archive/product-lifecycle) and should not be used for new integrations. Use [Payment Links and Buttons](/payment-links-buttons/overview) instead. For information about migrating, visit the [Upgrade Hub](https://developer.paypal.com/upgrade/wps/guide/).

The following code samples demonstrate various features of PayPal-hosted Donate buttons.

* [Basic Donate button](#basic-donate-button)
* [Fixed contribution amount](#fixed-contribution-amount)
* [URL code for Donate email payment links](#url-code-for-donate-email-payment-links)

> **Note:** **Important:** This page contains unencrypted button code for illustrative purposes only. To prevent malicious tampering of buttons on your live website, always encrypt your manually created buttons.

## Basic Donate button [#basic-donate-button]

The sample HTML code below illustrates a basic Donate button where donors enter their own contribution amount during checkout. The code uses the `currency_code` variable to set the currency for the contribution amounts that donors enter.

The sample HTML code below illustrates a basic Donate button where donors enter their own contribution amount during checkout. The code uses the

```text lineNumbers
<form action="https://www.paypal.com/donate" method="post" target="_top"> <!-- Identify your business so that you can collect the payments. --> <input type="hidden" name="business" value="donations@kcparkfriends.org"> <!-- Specify details about the contribution --> <input type="hidden" name="no_recurring" value="0"> <input type="hidden" name="item_name" value="Friends of the Park"> <input type="hidden" name="item_number" value="Fall Cleanup Campaign"> <input type="hidden" name="currency_code" value="USD"> <!-- Display the payment button. --> <input type="image" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate"> <img alt="" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" ></form>
```

The sample code above produces the following result:

<img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate,Button" />The sample code above produces the following result:

## Fixed contribution amount [#fixed-contribution-amount]

The sample HTML code below illustrates a Donate button where the contribution amount that donors make is fixed and cannot be changed. The code uses the `amount` and the `currency_code` variables to set fixed contribution amount at $25.00 USD.

The sample HTML code below illustrates a Donate button where the contribution amount that donors make is fixed and cannot be changed. The code uses the

```text lineNumbers
<form action="https://www.paypal.com/donate" method="post"> <!-- Identify your business so that you can collect the payments. --> <input type="hidden" name="business" value="donations@kcparkfriends.org"> <!-- Specify details about the contribution --> <input type="hidden" name="no_recurring" value="0"> <input type="hidden" name="item_name" value="Friends of the Park"> <input type="hidden" name="item_number" value="Fall Cleanup Campaign"> <input type="hidden" name="amount" value="25.00"> <input type="hidden" name="currency_code" value="USD"> <!-- Display the payment button. --> <input type="image" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate"> <img alt="" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" ></form>
```

## URL code for Donate email payment links [#url-code-for-donate-email-payment-links]

You can write your own URL code for Donate email payment links. You can use the same variables and values that you include in HTML Donate buttons.

> **Note:** **Important:** The example email payment link shown below is included for illustrative purposes only. In a production environment, you should always use a hosted email payment link to prevent malicious users from tampering with the code. Non-hosted email payment links are not secure.

Paste the following code onto your web page below an image or a text description of the item.

```text lineNumbers
https://www.paypal.com/donate?business=donations@kcparkfriends.org&no_recurring=0&item_name=Friends+of+the+Park&item_number=Fall+Cleanup+Campaign&amount=25¤cy_code=USD
```

For information on pasting code, see [Copy and paste button code](/archive/paypal-payments-standard/integration-guide/copy-paste-code).

## See also [#see-also]

* [HTML reference](/archive/paypal-payments-standard/integration-guide/html-reference-landing)
* [Donate basic payment options](/archive/paypal-payments-standard/integration-guide/checkout-exp-donate)
* [Customize advanced features](/archive/paypal-payments-standard/integration-guide/step-3)
* [Donate checkout experience](/archive/paypal-payments-standard/integration-guide/checkout-exp-donate)
