---
title: Transactions and recurring buys
description: The two elements beside the trading flow — the customer's order history and their recurring buys.
---

Two things a customer comes back for have no journey to walk through, so they
are elements of their own rather than `subjects` of `<btcdirect-journey>`. Both
take the same credentials.

## Order history

`<btcdirect-transactions>` lists the customer's orders, newest first, with each
order's status and details.

```html
<btcdirect-transactions
  api-key="API_KEY"
  user-identifier="CUSTOMER_ID"
  locale="en"
></btcdirect-transactions>
```

Without a `user-identifier` the customer signs in inside the element first.

## Recurring buys

`<btcdirect-savings>` lets the customer set up, view and stop recurring buys:
a standing transfer from their bank that buys the same coin every time it
arrives.

```html
<btcdirect-savings api-key="API_KEY" locale="en"></btcdirect-savings>
```

It opens on an introduction, so a guest can read what a recurring buy is before
signing in. To offer your own wallets as payout addresses, set the same
`wallets` property as on the trading element (see
[Attributes](https://partner.btcdirect.eu/v3/widget/attributes.md)):

```js
document.querySelector('btcdirect-savings').wallets = [
  { currency: 'BTC', address: 'bc1q…', label: 'Savings' },
];
```

A wallet for a coin that lives on more than one network is left out, since the
plan form picks an address per network and your wallet names only the coin.

## Attributes

Both elements read these:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `api-key` | string | required | Your api-key. |
| `user-identifier` | string | optional | Your own id for a customer you have already registered with us. |
| `locale` | string | optional | Language for the widget’s own copy: nl, en, de, fr or es. |
| `theme` | string | optional | dark for the dark theme. Anything else is light. |
| `api-base-url` | string | optional | REST base. Defaults to ours; override it to point at another environment. |
