---
title: What are widgets?
description: The buy and sell flow, embedded in your own pages with one script.
---

A widget is the whole trading flow on your own page. You add a script and a
target element; the customer never leaves your site, and you do not build any of
the screens: amount entry, payment, verification and delivery all happen inside
it.

_(The page embeds a live buy/sell widget here, running against this environment.)_

That is not a picture: it is the buy widget, running live.

## Available widgets

- **Buy** (fiat-to-coin) — The customer buys crypto with fiat: amount, payment method, wallet address and payment.
- **Sell** (coin-to-fiat) — The customer sells crypto for fiat, paid out to their account. Your app can send the crypto for them.
- **Transaction history** (transaction-history) — The customer’s orders, after they sign in.
- **Onboarding** (onboarding) — Registration and identity verification, on its own.
- **DCA** (dollar-cost-average) — Recurring purchases: the customer sets up a savings plan funded by bank transfer.

## Widget or Unified Checkout?

- **Unified Checkout** (A link) — You send the customer to a page we host. Least work, and nothing to maintain when a payment method changes. The customer leaves your site.
- **Widget** (A script) — The flow renders inside your page. The customer stays with you, and you own the surrounding layout.

Both drive the same orders, the same verification and the same webhooks. The
choice is about where the customer is standing, not about what they can do.

## How it works

1. Add the widget's script to your page.
2. Initialise it with your api-key.
3. The widget renders in a target element on your page.
4. The customer completes their order inside the widget.
5. You follow the order through its [webhooks](https://partner.btcdirect.eu/v2/webhooks.md) and the widget's
   events.

[Getting started](https://partner.btcdirect.eu/v2/widget/getting-started.md) walks through each step.
