With some HTML code and a unique link from PayPal, you can add a Donate or Buy Now button to your site.
- These instructions are a little different from what PayPal suggests because we restrict certain code on sites that don’t have plugins enabled.
- PayPal’s interface is different from country to country. Depending on where you are logging in to PayPal, you may need to explore to find the exact location of the PayPal links.
- The method described in this guide works for all plans, including the Free plan. If you don’t want to deal with HTML code, we have an easier, no-code required Pay with PayPal block available in all paid plans except the Personal plan.
In this guide
There are three steps to creating a PayPal button:
- Get your PayPal link
- Get the Button image link
- Put the links together to create a PayPal button.
When adding a PayPal button to your post, page, or sidebar, you’ll first need to get a PayPal link code from your PayPal account:
- Go to http://www.paypal.com/login and log in to your PayPal account.
- Once logged into your PayPal account, go to https://www.paypal.com/buttons/ for a list of buttons you can add.

💡
Your list of buttons may look slightly different from the screenshot above. You are looking for the option to create a new button within your PayPal account.
The following instructions will work for all buttons except the Smart Buttons. Smart Buttons require you to use JavaScript, a code restricted on sites without a WordPress.com Business plan or higher.
Select the type of button you want to add to go directly to the instructions.
- In https://www.paypal.com/buttons/, click on the Donate option.
- Make any changes you want on the next page, then choose Continue.

- Next, choose whether you want your account name or email address to be the listed organization they’ll be donating to.

- Then choose the currency type, and amount donors can give. Then select Finish and Get Code.

- On the next page, choose Shareable URL from the menu at the top. Then select Copy to Clipboard to copy the URL.

In some cases, you may not see a Sharable URL tab. Instead, look for an Email tab.
You’re looking for a link that usually starts with
https://www.paypal.com/cgi-bin/webscr?...
- Paste your Shareable URL into notepad or another text editor for use later.
- Jump to Step 2 – Getting the Button Image.
- In https://www.paypal.com/buttons/, click on one of the following options:
- Buy Now
- Add to Cart
- Subscribe (requires a PayPal Premier or Business account)
- Automatic Billing (requires a Paypal Premier or Business account)
- Fill out the Item Name, Price, Shipping, Tax, and other fields.
⚠️
Do not select any Customize button options, like drop-down menus, or additional text fields.

- Click on Create Button.
- On the Add your button code to your webpage screen, click on the Email tab.

✅
If you do not see the Email tab shown in the screenshot above, make sure you have not added any customizations to the button.
- Paste your Email Link into notepad or another text editor for use later.
- Jump to Step 2 – Getting the Button Image.
- In https://www.paypal.com/buttons/, click on Sell on Social.
- Click Add product to create a new PayPal product.
- Add the required photo, product name, description, amount, and shipping rate.
- Optionally, configure the Taxes section.
- Click Create.

- Select the Get link button on the next screen to copy your link to your clipboard.
- Paste your Email Link into notepad or another text editor for use later.
- Jump to Step 2 – Getting the Button Image.
✅
Paste your link from Step 1 into a text editor or other safe place so that you don’t lose it when you copy the following button code.
Next, you’ll have to choose a button image below. Copy the Image URL next to the image you want to use for your button, then proceed to step three to put everything together.

https://www.paypalobjects.com/webstatic/en_US/btn/btn_donate_74x21.png

https://www.paypalobjects.com/webstatic/en_US/btn/btn_donate_92x26.png

https://www.paypalobjects.com/webstatic/en_US/btn/btn_donate_cc_147x47.png

https://www.paypalobjects.com/webstatic/en_US/btn/btn_donate_pp_142x27.png

https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif

https://www.paypalobjects.com/webstatic/en_US/btn/btn_buynow_cc_171x47.png

https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif
Once you have the PayPal Link from step one, and the image URL you want to use for step two, it’s time to put them together!
First, add a new Custom HTML block inside your post or page. Then, use the following code:
<a style="display:block;margin-left:auto;margin-right:auto;text-align:center" href ="YOUR PAYPAL LINK HERE">
<img src="IMAGE URL HERE" alt="Your alt text here" />
</a>
- Replace YOUR PAYPAL LINK HERE with the link you got in Step 1
- Replace IMAGE URL HERE with the image URL you chose in Step 2
- Add alt text for “Your alt text here” to describe the button.
- Remember to leave the quotes around both links and the alt-text!

You’re done!