---
title: Onboarding widget
description: Registration and identity verification, on its own.
---

Takes a new customer through creating an account and verifying their identity.

## Implementing the widget

Load the onboarding script, as in [Getting started](https://partner.btcdirect.eu/v2/widget/getting-started.md):

```html
<script lang="js">
  (function (btc, d, i, r, e, c, t) {
    btc[r] = btc[r] || function () {
      (btc[r].q = btc[r].q || []).push(arguments)
    };
    c = d.createElement(i);
    c.id = r; c.src = e; c.async = true;
    c.type = 'module'; c.dataset.btcdirect = '';
    t = d.getElementsByTagName(i)[0];
    t.parentNode.insertBefore(c, t);
  })(window, document, 'script', 'btcdirect',
    'https://cdn.btcdirect.eu/onboarding/onboarding.js'
  );

  btcdirect('init', { token: 'API_KEY' });
</script>
```

## Init options

Besides the options every widget takes:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `returnUrl` | string | optional | Where the button on the finished screen takes the customer. |
| `userIdentifier` | string | optional | Your identifier for the customer, so they are signed in automatically after creating their account. |

When the customer finishes, the widget sends
`btcdirect-embeddable-registration-completed` (see
[account events](https://partner.btcdirect.eu/v2/widget/buy/events.md#account-events)).
