# Send Ether Transaction

If you have replaced your web3 provider with Fortmatic provider, nothing needs to be changed for web3 send Ether transactions to continue working.

The Fortmatic X modal will pop open and ask users to confirm their transaction once this web3 function is called on the client-side.

![](/files/-LssnvMdETN7UHyZr1C0)

{% tabs %}
{% tab title="Web3 Pre-1.0 Stable Versions" %}

```javascript
// Initialize provider
import Fortmatic from 'fortmatic';
import Web3 from 'web3';

const fm = new Fortmatic('YOUR_API_KEY');
window.web3 = new Web3(fm.getProvider());

const toAddress = '0xb159752065EA68Ef0B22249Df25864E624fec45D';
const sendValue = web3.toWei(1, 'ether'); // Convert 1 ether to wei
  
// Get user account wallet address first
web3.eth.getAccounts((error, accounts) => {
  if (error) throw error;
  
  // Construct Ether transaction params
  const txnParams = {
    from: accounts[0],
    to: toAddress,
    value: sendValue
  }
  
  // Send Ether transaction with web3
  web3.eth.sendTransaction(txnParams, (error, txnHash) => {
    if (error) throw error;
    console.log(txnHash);
  });
});
```

{% endtab %}

{% tab title="Web3 1.0 Beta Version" %}

```javascript
// Initialize provider
import Fortmatic from 'fortmatic';
import Web3 from 'web3';

const fm = new Fortmatic('YOUR_API_KEY');
window.web3 = new Web3(fm.getProvider());

const toAddress = '0xb159752065EA68Ef0B22249Df25864E624fec45D';
const sendValue = web3.utils.toWei(1, 'ether'); // Convert 1 ether to wei
  
// Get user account wallet address first
web3.eth.getAccounts().then((accounts) => {

  // Construct Ether transaction params
  const txnParams = {
    from: accounts[0],
    to: toAddress,
    value: sendValue
  }
  
  // Send Ether transaction with web3
  web3.eth.sendTransaction(txnParams)
  .once('transactionHash', (hash) => { console.log(hash); })
  .once('receipt', (receipt) => { console.log(receipt); });
});
```

{% endtab %}
{% endtabs %}

## Custom Gas Price

![](/files/-LsssSIFT8NYY0ZBGCFg)

Fortmatic provides the option to offer a customized gas price. If provided, it will be shown as a suggested option in the delivery fee section. One parameter addition to include a customized gas price should suffice. Gas limit is optional, if not provided, Fortmatic will smartly estimate the gas limit for the transaction!

```javascript
const txnParams = {
  from: accounts[0],
  to: toAddress,
  value: sendValue,
  gasPrice: '0x2540be400', // Include your own gas price here.
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fortmatic.com/web3-integration/send-ether-transaction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
