# Low-code buy button (/guides/low-code-buy-button)

Accept PayPal payments with no backend. Generate a Buy Button in your PayPal dashboard and paste it straight into your site.



The Buy Button is PayPal's low-code checkout experience. Set up your product and price in the [PayPal dashboard](https://www.paypal.com/signin?returnUri=https%3A%2F%2Fwww.paypal.com%2Fncp%2Flinks%2Fcreate), paste the generated embed code onto your page, and let customers pay on a secure PayPal-hosted checkout page. No backend, no SDK, no API required.

The Buy Button supports PayPal, Pay Later, Venmo, Apple Pay, and major debit and credit cards. It's available in more than 200 countries and regions, supports multiple languages, and accepts more than 23 currencies.

## Prerequisites [#prerequisites]

You need a [PayPal Business account](https://www.paypal.com/us/business). The Buy Button feature isn't available on personal accounts.

> **Note:** If you have a personal account, you can upgrade to Business for free from your PayPal account settings. There's no need to create a new account.

## Create your Buy Button [#create-your-buy-button]

Complete these steps to build your button in the PayPal dashboard, then copy the generated code onto your page.

### Step 1: Sign in [#step-1-sign-in]

Log into your [PayPal Business account](https://www.paypal.com/signin).

### Step 2: Start the button creator [#step-2-start-the-button-creator]

Choose one of these entry points:

#### Option 1

<img src="https://www.paypalobjects.com/ppdevdocs/paypal-create-button-menu.1b0bdhwss2rg1.png" alt="From + Create, choose Payment Link or Button." />

From **+ Create**, select **Payment Link or Button**.

#### Option 2

<img src="https://www.paypalobjects.com/ppdevdocs/paypal-side-menu-create-button.3_jdky_89v9lo.png" alt="Or use Pay & Get Paid, then Create Payment Links and Buttons." />

Select **Pay & Get Paid**, then **Create Payment Links and Buttons**.

### Step 3: Select Payment buttons [#step-3-select-payment-buttons]

Open the [Build Your Payment Links and Buttons](https://www.paypal.com/ncp/links/create) page and select **Payment buttons**.

### Step 4: Enter the product details [#step-4-enter-the-product-details]

* **Name:** the product your customer is buying
* **Description** (Optional): a brief product summary
* **Price:** enter the amount and currency

<img src="https://www.paypalobjects.com/ppdevdocs/create-button-1.gif" alt="Creating a button: name, description, price, then build." />

Creating a button: name, description, price, then build.

### Step 5: Create the button [#step-5-create-the-button]

Select **Build it**. Before saving, you can customize the button style and colors, and choose whether checkout opens in-context or in a new window.

### Step 6: Customize your button (optional) [#step-6-customize-your-button-optional]

Use the dashboard tabs to update the button text, style, colors, and checkout flow without writing CSS.

#### Button customization

<img src="https://www.paypalobjects.com/ppdevdocs/button-customisation.2g8g54iwk-zh_.png" alt="Style tab: button shape and color." />

Style tab: button shape and color.

#### More options

<img src="https://www.paypalobjects.com/ppdevdocs/button-more-options.09cye3mo1_0vy.png" alt="More options: label text and layout." />

More options: label text and layout.

#### Checkout options

<img src="https://www.paypalobjects.com/ppdevdocs/button-checkout.2mkwk6bnot7zk.png" alt="Checkout: open in-context or in a new window." />

Checkout: open in-context or in a new window.

#### Confirmation

<img src="https://www.paypalobjects.com/ppdevdocs/button-confirmation.0aaxtsjcd1haq.png" alt="Confirmation: the message customers see after paying." />

Confirmation: the message customers see after paying.

### Step 7: Embed the button [#step-7-embed-the-button]

PayPal provides two embed formats. Choose the one that works best for your site.

#### Stacked buttons (hosted)

This option loads the PayPal, Pay Later, Venmo, and card buttons from a hosted script. It is the recommended integration and requires two snippets.

**Part 1.** Paste into `<head>` once per page:

```html
<!-- index.html (in <head>) -->
<script src="https://www.paypal.com/sdk/js?client-id=YOUR_CLIENT_ID&components=hosted-buttons&currency=USD"></script>
```

> **Note:** Do not modify the query parameters. They are generated for your button and account, and changing them will break the integration.

**Part 2.** Paste into `<body>`, near the product:

```html
<!-- index.html (in <body>) -->
<div id="paypal-container-BUTTON_ID"></div>
<script>
  paypal
    .HostedButtons({
      hostedButtonId: "BUTTON_ID",
    })
    .render("#paypal-container-BUTTON_ID");
</script>
```

Replace `BUTTON_ID` with the ID from your PayPal dashboard. To display multiple products on one page, repeat Part 2 with each product's unique ID.

> **Note:** If you cannot add code to 
>
> `<head>`
>
> , place Part 1 at the top of 
>
> `<body>`
>
> , above Part 2. Both snippets must be on the same page for the button to render.

<img src="https://www.paypalobjects.com/ppdevdocs/buttons-final.0x3w8lgf5dpra.png" alt="Two Buy Buttons live on a product page." />

Two Buy Buttons live on a product page.

For more information, see the [PayPal Payment Links and Buttons help article](https://www.paypal.com/us/cshelp/article/what-are-paypal-payment-buttons-and-how-do-i-use-them-help432).

#### Single button (HTML only)

This format is a self-contained HTML form with built-in styles. It requires no script tag.

```html
<!-- buy-button.html -->
<div>
  <style>
    .pp-BUTTON_ID {
      text-align: center;
      border: none;
      border-radius: 0.25rem;
      min-width: 11.625rem;
      padding: 0 2rem;
      height: 2.625rem;
      font-weight: bold;
      background-color: #ffd140;
      color: #000000;
      font-family: "Helvetica Neue", Arial, sans-serif;
      font-size: 1rem;
      line-height: 1.25rem;
      cursor: pointer;
    }
  </style>
  <form
    action="https://www.paypal.com/ncp/payment/BUTTON_ID"
    method="post"
    target="_blank"
    style="display:inline-grid;justify-items:center;align-content:start;gap:0.5rem;"
  >
    <input class="pp-BUTTON_ID" type="submit" value="Buy Now" />
    <img
      src="https://www.paypalobjects.com/images/Debit_Credit_APM.svg"
      alt="Accepted debit and credit cards"
    />
    <section style="font-size:0.75rem;">
      Powered by
      <img
        src="https://www.paypalobjects.com/paypal-ui/logos/svg/paypal-wordmark-color.svg"
        alt="PayPal wordmark"
        style="height:0.875rem;vertical-align:middle;"
      />
    </section>
  </form>
</div>
```

Replace `BUTTON_ID` with your button ID.

> **Tip:** The HTML-only option works anywhere you can paste markup: static sites, email templates, and CMS platforms like Webflow or Squarespace. It has no JavaScript dependency, so it won't block page rendering.

<img src="https://www.paypalobjects.com/ppdevdocs/single-paypal-buy-button.0q33o-u9l_a-m.png" alt="The Single Button rendered from pasted HTML." />

The Single Button rendered from pasted HTML.

<img src="https://www.paypalobjects.com/ppdevdocs/buttons-final.0x3w8lgf5dpra.png" alt="Two Buy Buttons live on a product page." />

Two Buy Buttons live on a product page.

For more information, see the [PayPal Payment Links and Buttons help article](https://www.paypal.com/us/cshelp/article/what-are-paypal-payment-buttons-and-how-do-i-use-them-help432).

## Add multiple buttons to one page [#add-multiple-buttons-to-one-page]

You can add multiple buttons to a single page, one per product. Use the following guidelines:

* Each button must use a &#x2A;*unique `hostedButtonId`**. Reusing the same ID will cause only the first button to render.
* All buttons on one page must use the **same currency**. Mixing currencies causes buttons after the first to fail silently.

Find each button's ID in your PayPal dashboard under the button details.

> **Warning:** Mixed currencies on a single page fail silently. No error is shown, and only the first button will render. Keep every button on the page in the same currency.

## Troubleshooting [#troubleshooting]

**The Buy Button option is missing from my account**

**Cause:** The feature is Business-only.

**Fix:** Upgrade to a PayPal Business account.

**My button code looks out of date after editing**

**Cause:** PayPal saves changes on the server automatically.

**Fix:** Copy the code again only if you changed the currency.

**Not all payment methods show for my customer**

**Cause:** Available payment methods depend on the customer's country and eligibility.

**Fix:** This is expected behavior.

**Some buttons don't render when I have several on one page**

**Cause:** Duplicate IDs, or mixed currencies.

**Fix:** Use a unique ID per button and keep them all in the same currency.
