---
title: Parameters
description: Prefill and lock parts of the buy widget's order form.
---

These calls prefill the order form. Make them straight after `init`, in the same
script: they are read once, when the widget loads.

## Set parameters

```js
btcdirect('set-parameters', {
  baseCurrency: 'BTC',
  quoteCurrency: 'EUR',
  quoteCurrencyAmount: 123,
  paymentMethod: 'creditCard',
  walletAddress: 'bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq',
  returnUrl: 'https://example.com',
  partnerOrderIdentifier: '12345abcde',
  fixedAmount: true,
  fixedCurrency: true,
  fixedPaymentMethod: true,
  showWalletAddress: true
});
```

Every field is optional; pass only what you want to prefill.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `baseCurrency` | string | optional | The coin to preselect, by ticker. |
| `quoteCurrency` | string | optional | The fiat currency to preselect. |
| `baseCurrencyAmount` | number | optional | The crypto amount to prefill. |
| `quoteCurrencyAmount` | number | optional | The fiat amount to prefill. When both amounts are set, this one is used. |
| `paymentMethod` | string | optional | The payment method to preselect. |
| `walletAddress` | string | optional | The customer’s wallet address. |
| `walletAddressTag` | string | optional | Its destination tag, for coins that use one. |
| `returnUrl` | string | optional | Where the "Back to partner" button goes. Overrides the init option. |
| `partnerOrderIdentifier` | string | optional | Your own reference for the order. |
| `fixedAmount` | boolean | optional | Lock the amounts. |
| `fixedCurrency` | boolean | optional | Lock the currencies. |
| `fixedPaymentMethod` | boolean | optional | Lock the payment method. |
| `showWalletAddress` | boolean | optional | false hides the wallet address on the form. |

> **Order updates and your fee**
>
> Order updates reach you through [webhooks](https://partner.btcdirect.eu/v2/webhooks.md), configured once for your
> account rather than per order. An integration that already passes a per-order
> `callbackUrl` keeps receiving updates there, once your account manager has
> enabled it. Your fee is set on your account: a fee sent from the browser is not
> one we can trust, so `fee` is ignored.

## Other calls

### Currencies

```js
btcdirect('currencies', { crypto: 'BTC', fiat: 'EUR' });
```

### Lock the coin

```js
btcdirect('currencies', { crypto: 'ETH', fiat: 'EUR' });
btcdirect('lock-cryptocurrency', { lockCryptocurrency: true });
```

### Prefill the order

```js
btcdirect('order', {
  crypto: 'LTC',
  fiat: 'EUR',
  amount: 1,
  type: 'crypto' // or 'fiat'
});
```

### Payment method

```js
btcdirect('payment-method', { method: 'iDeal' });
```

### Skip the order form

When the amount, currency, wallet address and payment method are all provided,
go straight to confirming the order:

```js
btcdirect('attempt-direct-confirm', { enableAttemptDirectConfirm: true });
```

### Include a DCA tab

Adds a recurring-purchase tab beside the buy form:

```js
btcdirect('include-dca', { include: true });
```

### Your order reference

```js
btcdirect('partner-order-identifier', { partnerOrderIdentifier: '12345abcde' });
```
