> ## Documentation Index
> Fetch the complete documentation index at: https://www.cashfree.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Payment Button

> Embed Cashfree Payment Buttons by copy-pasting auto-generated HTML into your website or blog to accept secure online payments without writing any code.

Cashfree payment button provides a simple HTML code that you can copy and paste on your website, blog, or any HTML page. The system-generated code offers a professional and secure way to collect payments for any use case, as shown in the following example.

<Tabs>
  <Tab title="Visual preview">
    <div
      style={{ width: 'fit-content',
margin: 'auto', marginTop: '12px', border: '2px solid #00000016', borderRadius: '12px', overflow: 'hidden' }}
    >
      <img src="https://mintcdn.com/cashfreepayments-d00050e9/jYxrIHTD_584HHFC/static/payments/no-code/customize/button-Screenshot.png?fit=max&auto=format&n=jYxrIHTD_584HHFC&q=85&s=3693b7cc5e8fd06c16c62e09cce0714c" alt="payment button preview" style={{ width: '700px', height: 'auto' }} width="1964" height="1518" data-path="static/payments/no-code/customize/button-Screenshot.png" />
    </div>
  </Tab>

  <Tab title="Code snippet">
    <div style={{ marginTop: '12px' }}>
      <CodeGroup>
        ```html HTML theme={"dark"}
        <form>
          <a href="https://payments.cashfree.com/forms/gsdjkljlk" target="_parent">
            <div class="button-container" style="background: #000000">
              <div>
                <img src="https://cashfreelogo.cashfree.com/cashfreepayments/logosvgs/Group_4355.svg" alt="logo" class="logo-container">
              </div>
              <div class="text-container">
                <div style="font-family: Arial; color: #fff; margin-bottom: 5px; font-size: 14px;">Pay Now</div>
                <div style="font-family: Arial; color: #fff; font-size: 10px;">
                    <span>Powered By Cashfree</span>
                    <img src="https://cashfreelogo.cashfree.com/cashfreepayments/logosvgs/Group_4355.svg" alt="logo" class="seconday-logo-container">
                </div>
              </div>
            </div>
          </a>
         <style>
          .button-container{ border: 1px solid black; border-radius: 15px; display: flex; padding: 10px; width: fit-content; cursor: pointer; }
          .text-container{ display: flex; flex-direction: column; align-items: center; margin: 0 10px; justify-content: center; }
          .logo-container{ width: 40px; height: 40px; }
          .seconday-logo-container{ width: 16px; height: 16px; vertical-align: middle; }
          a{ text-decoration:none; }
        </style>
        </form>
        ```
      </CodeGroup>
    </div>
  </Tab>
</Tabs>

## Key benefits

The payment button streamlines your collection process with several automated features:

* **Fast setup**: Accept payments in a matter of minutes by simply embedding a code snippet.
* **Custom information collection**: Collect information based on your case, such as donations, events, selling physical or digital products, etc.
* **Automated redirects**: Redirect back to your website by using the **Return URL** feature after a transaction.
* **Instant invoicing**: Send invoices after successful payment to your customers automatically.

## Use cases

You can deploy the payment button across various business models to handle transactions efficiently.

* **E-commerce**: Sell physical or digital products on any custom website or blog.
* **Donations**: Collect funds for social causes or NGOs with a simple Donate Now button.
* **Events**: Manage registrations and payments for workshops, webinars, or local events.
* **Service bookings**: Allow customers to pay for appointments or reservations using custom CTA text such as Book Now or Reserve Now.

## Creating a payment button

Follow these steps to log in, configure, and generate your custom payment button within the Merchant Dashboard:

1. Log in to the [Merchant Dashboard](https://merchant.cashfree.com/auth/login).

2. Go to **Payment Gateway Dashboard** > **Payment Button** > click **Create Payment Button**.

3. Enter the **Button Text** (Call to Action) and specify with examples such as Pay Now, Donate Now, Book Now, or Reserve Now.

4. Customise the **Button Text Colour**, **Background Colour**, **Select Font Style**, and **Select Form Code** according to your website or blog. You can view the preview directly in the editor.

5. You need a **Payment form** to create a payment button. These forms let you collect customer information such as name, address, and other details specific to your use case.

6. Create your form in the [**Payment Form Dashboard**](https://merchant.cashfree.com/merchants/pg/payment-forms/all) and link it to your payment button using the **Form Code**. We recommend using a readable form code in the personalised URL section during creation; you can find this code listed against each form in the dashboard.

7. After you click **Create**, copy the generated HTML snippet and paste it into your website.

<img src="https://mintcdn.com/cashfreepayments-d00050e9/DeEJgR8JYJYYSz3P/static/payments/no-code/payment-forms/Pay-button-create.gif?s=9a3d9581072d30f91cc7bbd785d1da69" alt="Payment Button Creation" width="1920" height="1080" data-path="static/payments/no-code/payment-forms/Pay-button-create.gif" />

## Platform integration guides

Choose your website hosting platform below to see specific instructions for embedding your payment button code accordingly:

<Tabs>
  <Tab title="Google Sites">
    Follow the steps given below to integrate the payment button with Google Sites:

    1. Log in to your [Google Site](https://sites.google.com/) and switch to **Editor mode**.
    2. Navigate to the page on which you want to place the button.
    3. Navigate to **Insert** → **Embed** → **Embed Code** and paste the Cashfree button code from the dashboard.
    4. **Publish** to view the button on your Google Site.
  </Tab>

  <Tab title="GoDaddy">
    Follow the steps given below to add an HTML section for your payment button on GoDaddy:

    1. Log in to your [GoDaddy website](https://www.godaddy.com/) and switch to **Editor mode**.
    2. Navigate to the page on which you want to place the button.
    3. **Add a section**, select **HTML**, and click **Add**. Paste the Cashfree button code.
    4. Add a pixel length of **1000** in **Forced Height** field and **Publish** the site.
  </Tab>

  <Tab title="Weebly">
    Follow the steps given below to add the payment button using the Embed Code element on Weebly:

    1. Log in to your [Weebly website](https://www.weebly.com/login) and switch to **Editor mode**.
    2. Navigate to the page on which you want to place the button.
    3. Navigate to **Build** → **Individual Elements** → **Embed Code**.
    4. Drag and drop an element and select **Click to set Custom HTML** box.
    5. Select **Edit Custom HTML** and add the Cashfree payment button code.
    6. **Publish** to view changes.
  </Tab>

  <Tab title="Blogger">
    Follow the steps given below to add the payment button code in the HTML view on Blogger:

    1. Log in to your [Blogger website](https://www.blogger.com/) and switch to **Editor mode**.
    2. Navigate to the page on which you want to place the button.
    3. Select **HTML view**, add the Cashfree payment button code, and **Publish**.
  </Tab>
</Tabs>

<div className="hidden" data-table-of-contents="bottom">
  <p className="mt-4 font-medium flex items-center gap-2 related-docs-heading">
    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="w-4 h-4">
      <path d="M3 4h7a2 2 0 0 1 2 2v13a2 2 0 0 0-2-2H3z" />

      <path d="M21 4h-7a2 2 0 0 0-2 2v13a2 2 0 0 1 2-2h7z" />
    </svg>

    <span>Related topics</span>
  </p>

  <ul>
    <li><a href="/docs/api-reference/payments/latest/payment-links/create">Create Payment Link API</a></li>
    <li><a href="/docs/api-reference/payments/latest/payment-links/get">Get Payment Link API</a></li>
    <li><a href="/docs/api-reference/payments/latest/payment-links/webhooks">Payment Link Webhooks</a></li>
  </ul>
</div>
