Fortmatic
WebsiteDashboardSupport
v1.x
v1.x
  • 🚀Get Started
  • 📦Install with NPM
  • 🧩Examples
  • 💬FAQ
  • Web3 Integration
    • Web3 Provider
    • Network Configuration
    • Get User Account
    • Send Ether Transaction
    • Smart Contract Functions
    • User Signing
    • SDK Error Handling
    • Batch Request
  • Smart Contract
    • ERC20 Transfer
    • ERC20 Approve
    • ERC20 TransferFrom
    • Generic Contract Call
  • Fortmatic Native
    • Log In
    • Log Out
    • Is User Logged In
    • Compose Transaction
    • Deposit Address
    • Configuration
  • Security
    • Domain Verification
Powered by GitBook
On this page
  • Send Ether
  • Send Any Amount Anywhere
  • Send Transactions with Web3

Was this helpful?

  1. Fortmatic Native

Compose Transaction

PreviousIs User Logged InNextDeposit Address

Last updated 5 years ago

Was this helpful?

On top of web3 compatibility, Fortmatic also provides custom SDK functions that are optimized for better developer experience and end-user flows. Here's how users can initiate Ether transfers from their wallet to another.

Send Ether

As a developer, you can send Ether using the Fortmatic.transactions.sendmethod. With the Fortmatic SDK you don't need to specify the sender's wallet address or use Wei for the transaction amount, the Ether to Wei conversion is done for you automatically.

import Fortmatic from 'fortmatic';

const fm = new Fortmatic('YOUR_API_KEY');

fm.transactions.send({
  amount: '100.001',
  to: '0xe0cef4417a772512e6c95cef366403839b0d6d6d'
});

Send Any Amount Anywhere

In addition to the familiar confirmation dialog with web3. You can allow end-users to send any amount of Ether to any address by leaving out send option parameters.

import Fortmatic from 'fortmatic';

const fm = new Fortmatic('YOUR_API_KEY');

// End user customizes the ETH amount
fm.transactions.send({
  to: '0xe0cef4417a772512e6c95cef366403839b0d6d6d'
});

// End user customizes the destination
fm.transactions.send({
  amount: '56.10003',
});

// End user customizes the amount and the destination
fm.transactions.send()

Send Transactions with Web3

You can also use Fortmatic to send transactions with web3 if you already use it to develop. You can follow the links below:

Send Ether Transaction
Smart Contract Functions
Web3 Provider