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

# Code Snippets

> Embed your payment form on your website or share a direct payment link.

## Overview

Code Snippets gives you three ways to get your payment form in front of customers: an embeddable script, a button trigger, and a direct link. Go to **Advanced > Code Snippets** to find all three.

## Embed Script

The embed script loads your payment form as a modal on any webpage. Add it once to your site's `<head>` tag:

```html theme={null}
<script
  src="https://app.dimepayments.com/embed.js"
  data-merchant="your-slug"
  data-key="pk_live_xxxx">
</script>
```

Once the script is on the page, any element with a `data-dime-open` attribute will open the payment modal when clicked.

## Button Trigger

Add `data-dime-open` to any button or link on your site to trigger the payment modal:

```html theme={null}
<button data-dime-open>Pay Now</button>
```

You can style this button however you like -- the `data-dime-open` attribute is all that is needed to wire it up.

## Direct Payment Link

Your direct payment link is a standalone URL you can share anywhere -- email, text message, invoices, or your website:

```
https://app.dimepayments.com/your-slug
```

Click **Copy** to copy it to your clipboard, or **Open** to preview your live payment page.

## Tips

* Add the embed script to your website's global header so it loads on every page
* Use multiple `data-dime-open` buttons across different pages -- a "Pay Now" button in the nav, a button at the bottom of an invoice page, etc.
* The direct payment link works great for email invoices and text reminders where embedding code is not possible
