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

CryptoPayment

Usage

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

function App() {

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

  return (
        <div>
            <CryptoPayment 
                      Address={ {EVM:"0x056397760b973BfB921Bc10Be9DA5034B1e921d7", STARKNET:"0x05Ea419aa3Ad67A9f9721dc38257f8Cc1E032b0Ac83ED6b532Aad3e1778c1B9F"}} // Wallet Address to receive Funds.
                      Chains={[ Chains.Ethereum, Chains.Polygon, Chains.Starknet, Chains.Sepolia]}
                      Tokens ={[Tokens.STARK, Tokens.SETH, Tokens.DAI, Tokens.ETH, Tokens.BNB, Tokens.USDC]} 
                      Amount={100} // Amount in USD
                      noOfBlockConformation={2}
                      setPaymentStatus = {setPaymentStatus}
                      Style = {{displayName: "Make Payment", 
                                backgroundColor: "#007bff",
                                color: "#fff",
                                border: "none",
                                padding: "10px 20px",
                                borderRadius: "4px",
                                fontSize: "18px",
                                cursor: "pointer"}} 
            />
	  </div>

  )

}

Important

PreviousUsageNextFor Starknet

Last updated 4 months ago

Visit list of & for more details.

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