---
title: Transaction history widget
description: The customer's orders, inside your page.
---

Shows the customer's orders. If they are not signed in, the widget asks them to
sign in first.

## Implementing the widget

Load the transaction history 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/transaction-history/transaction-history.js'
  );

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

It takes the options every widget takes, and the `locale` and `logout` calls.
