---
problem: 'You already have a website and want visitors to search your rentals and start a direct booking without rebuilding that site.'
---

# Booking widgets for your own site

Choose a search widget, a single-rental booking box or a booking grid, and copy its code to your existing website.

## How it works

Add rental search and booking tools to your existing website with Rental Ninja widgets. Choose a widget in the Rental Ninja website editor, then paste its generated code into your own site's HTML or embed block.

The widget loads from the address of your Rental Ninja website. That address is separate from the page where you paste the code.

### Before you copy the code {#before-copying}

Use an active, ready Rental Ninja website. Its website address must be verified. Your account needs an active subscription. To accept bookings, enable bookings for the website. Make sure the payment gateway is active for the rental and its booking source. Do not leave the website inactive for widget use.

Open the editor through **Connections**, then **Websites**. Your account must be verified. The channel manager must be enabled for your account. Your version of Rental Ninja must support **Connections**. You also need access to **Connections**. See [who can open Connections](https://rental-ninja.com/help/how-the-channel-manager-works#who).

### Choose a widget {#choose-a-widget}

| Widget | What visitors get | Options to choose |
|---|---|---|
| **Search widget** | A search form that opens results on your hosted Rental Ninja website. | **Width** and **Language**. **Background**. |
| **Booking box** | Dates, guests and a price quote for one rental. Continuing opens its hosted property page in a new tab. | **Rental** and **Language**. **Background**. |
| **Booking grid** | A searchable grid of rentals, with rental details inside the widget. | **Guests** and **Homes per page**. **Language**. |

For the search widget, **Full width** fills the space your page gives it. The search widget and booking box offer background options. Choose **Theme** or **Transparent**.

The grid offers 6, 12 or 24 homes per page, starting at 12.

The booking box selector excludes paused rentals.

### Payment and the return to your page {#payment-and-return}

Payment takes guests outside the widget to Stripe Checkout. Stripe Checkout cannot run inside the embedded frame. A widget is not an in-page payment form.

For the booking grid, add your host site's domain under **Allowed domains** to allow a return to your page after checkout. The page must use HTTPS on the default port.

The domain list also controls where your widgets can be embedded. Adding domains restricts external embedding to the listed hosts. You can add up to 20 entries. Enter the hostname actually used by your page, including `www` if applicable.

## Why it works this way

- Payment happens outside the widget because Stripe Checkout cannot run inside the embedded frame.

## Set it up

1. In **Connections**, open **Websites**.
2. Choose your Rental Ninja website.
3. Open **Widgets**. The website must be active before the widget controls appear. To accept bookings, you also need an active subscription. Enable bookings for the website. Make sure the payment gateway is active for the rental and its booking source.
4. Choose a widget:
   - **Search widget**
   - **Booking box**
   - **Booking grid**
5. For a booking box, select the **Rental** to embed.
6. Choose the widget's language and the layout options offered for that widget.
7. To restrict embedding or allow the grid's return, enter your host site's hostname under **Allowed domains**. A return page must use HTTPS on the default port. To leave the domain list unchanged, continue to **Copy** instead.
8. If you entered a new domain, select **Add domain**.
9. If the domain list has changed, select **Save**.
10. Select **Copy** beside the generated code.
11. Paste the complete snippet into your own site's HTML or embed block, keeping both the iframe and the script.
12. Publish that page using your site's editor.
13. Open the published page and check the widget on desktop and mobile, including the destination opened when you continue.

Changing the widget options generates a different snippet; it does not edit code you already pasted into another website. Copy and replace that code when you change those options. The **Allowed domains** list has its own **Save** button.

### Good to know {#good-to-know}

- If you have not created a Rental Ninja website yet, start with [Create your website](https://rental-ninja.com/help/create-your-website).
- If the code is unavailable because the address is not verified, select **Set up domain** and finish the address setup first.
- Accounts connected through their own channel manager account do not have the **Connections** menu. This setup path is unavailable to them.
- The grid offers **Destination** when several destinations are available.
- A transparent booking box keeps its own themed surface behind the booking controls.
- If no rental is offered, select **Open listings** to review the website's rentals.
- If a valid return address is unavailable, checkout uses the hosted property page instead.
- With the allowed-domain list empty, grid checkout opens in a new tab and uses the hosted property page for the return. Leaving the list empty also allows external sites to embed your widgets.
- This return behaviour does not change the booking box's link: that widget continues on the hosted property page in a new tab.
