Resmic
  • Resmic SDK
    • 👋Introduction
      • ðŸŠķOverview
    • ðŸ’ŦGetting Started
      • 🏃Installation
      • ðŸ‘ūUsage
        • CryptoPayment
        • For Starknet
        • For EVM
      • 📃Reference
    • 💁Support
      • ⛓ïļBlockchain
      • 🊙Tokens
      • 💰Wallets
    • 🊄Demo
      • Sample React app
    • 📰Whitepaper
      • Github
    • 🛂Contact
  • Resmic Pro
    • Introduction to Resmic Pro
    • Getting Started
    • API Authentications & Security
    • Payment Integration
    • Order Status
    • Transaction Details
    • Webhooks & Notifications
    • Supported Chains & Tokens
    • iFrame
    • Demo
      • Sample React app
    • Failed Transactions & Stuck Payments
    • Contact
  • Quick Payments
    • 🔗Quick Links
      • âœĻGetting Started
      • ðŸĪSharing Quick Links
      • 🚧Errors
    • Invocie
Powered by GitBook
On this page
  1. Resmic SDK
  2. Getting Started
  3. Usage

For EVM

Resmic Component for EVM Compatible Blockchain

Resmic SDK old version.

npm i resmic@1.0.10

Usage

import { useState } from 'react';
import {EVMConnect, Tokens, Chains} from 'resmic'

function App() {

	const [paymentStatus, setPaymentStatus] = useState(false) // Returns bool after the payment
	
	// Your code...

  return (
        <div>
            <EVMConnect  Address={"YOUR_WALLET_ADDRESS"} //Wallet address to receive funds
                Chains={[ Chains.Ethereum, Chains.Polygon, Chains.Goerli]} //Choose the blockchains to allow payments from
        	Tokens ={[Tokens.USDT, Tokens.BUSD, Tokens.MATIC, Tokens.ETH]} //Choose the Tokens to accept payments from
                Amount={100} //Amount you want to receive in USD($)
                setPaymentStatus = {setPaymentStatus}
                noOfBlockConformation={5} //No. of blocks to wait for the payment conformation (Optional)
                Style = {{displayName: "Make Payment",
                    backgroundColor: "#007bff",
                    color: "#fff",
                    border: "none",
                    padding: "10px 20px",
                    borderRadius: "4px",
                    fontSize: "18px"}}
            />
	  </div>

  )

}

Important

PreviousFor StarknetNextReference

Last updated 1 year ago

Visit list of & for more details.

ðŸ’Ŧ
ðŸ‘ū
supported blockchains
supported tokens