Copy and paste button code

DocsLegacyLast updated: June 14th 2021, @ 7:36:51 am


Important: NVP/SOAP is a legacy integration method. We accept new integrations and support existing integrations, but there are newer solutions. If you're starting an integration, we recommend our latest solutions.

When you click Create Button on the Create PayPal payment button page, PayPal generates encrypted button code that you can paste directly on your website. Encrypted code helps to secure your button from malicious tampering and fraudulent payments.

Copy and paste the Website button code

  1. On the Websites tab of Add your button code to your webpage, click Select Code to select the generated HTML code.

  2. Right-click the selected code and select Copy to copy it to the clipboard.

  3. In your HTML editor, open the HTML page where you want to display the button.

    Important: Make sure you are in the HTML code view of your webpage.

  4. Paste the code from the clipboard to the location in your webpage code where you want the button displayed.

Important: PayPal cannot protect URL code for email payment links if the button is not saved on the PayPal website and thus is not hosted by PayPal. To generate secure email payment links, always use hosted buttons.

Note: Email payment links do not support buttons with multiple options, such as color, size, and so on. Use buttons with multiple options only on webpages.

  1. On the Email tab, click Select Code .
  2. Right-click the selected code and select Copy to copy it to the clipboard.
  3. Open an email template or message.
  4. Paste the code from the clipboard to the location in your email where you want the button displayed.

Troubleshoot problems with pasted HTML code

After you paste the code to your webpage or email, ensure that it is an exact match of the code that you copied from PayPal. Pasted code might not match the generated code for one of these reasons:

  • You did not copy all generated code.
  • Your editing tool may have special areas for pasting HTML code and other areas for pasting URLs and display text. Be sure you paste the generated code into a field that accepts HTML code or URLs.
  • Your editing tool might change some characters in the pasted code.

Next