SmartCredit.io
ApplicationTwitterTelegramLinked In
  • SmartCredit.io
  • Fixed-term/Fixed-rate Borrowing/Lending
    • How are loan requests matched?
    • Credit Lines
    • Fixed-Income Funds
    • Fixed Loan Term
    • Fixed Interest Rate
    • Efficient use of Collateral
    • Positions Monitoring System
    • No Bank Run Risks
    • Collaterals
    • Collateral Ratios
    • Liquidations
    • Loss Provision Fund
    • Oracles Integration
    • Fiat On-Ramp/Off-Ramp
    • Borrow/Lend SDK and Widgets
      • Use Cases
      • Borrow/Lend SDK
        • Borrowing SDK
          • Authentication
            • Auth Challenge
            • Authenticate
          • Validators
          • Collateral Ratio
          • Credit Line
            • Get Credit Lines
            • Create Credit Line
          • Loan Request
            • Calculate Collateral Amount
            • Sign Loan Request
            • Create Loan Request
          • View Loans
            • All Loans
            • Single Loan
          • Deposit Collateral
            • Deposit collateral for ETH
            • Deposit Collateral for ERC20
          • View Collateral
            • Locked Collateral
            • Unlocked Collateral
          • Repay Loan
            • Repay ETH Loan
            • Repay ERC20 Loan
          • Terminate Loan
          • Liquidation
            • Liquidation Probability
            • Increase Collateral for ETH
            • Increase Collateral for ERC20
        • Lending SDK
          • Authentication
            • Auth Challenge
            • Authenticate
          • Create FIF
          • Get FIF List
          • Deposit in FIF
            • Deposit ETH
            • Deposit ERC20
          • Withdraw FIF
          • Terminate FIF
      • Borrow/Lend UI Widgets
        • WordPress Integration
          • Borrowing Widget WordPress Plugin
            • Integration
          • Lending Widget WordPress Plugin
            • Integration
        • JS Integration
          • Borrowing Widget Integration
          • Lending Widget Integration
  • Fixed-term/Fixed-rate Leveraged Lido staking
    • Start leveraged staking
    • Regular finishing
    • Early finishing
    • Positions Monitoring
    • Platform Fees
  • How to earn?
    • Earning via Rewards
    • Earning via Fixed-Term/Fixed-Rate
    • Earning via Leverage Lido Staking
  • Staking and Rewards
    • Borrower and Lender Bonus Rewards
    • Staking
    • Gasless Re-staking
    • Integrator Rewards
    • Affiliate Program
  • Security
    • Audits
    • AI-based Crypto Transactions Monitoring
    • Bug Bounties
  • Regulations
    • Peer-to-Pool-to-Peer Business Models
    • Peer-to-Peer Business Models
    • Offering Access to the Securities Products
    • Crypto Transactions Monitoring
  • Roadmap
    • Release 1.0 - Foundation
    • Release 1.1 - Fixed Income Funds
    • Release 1.2 - Credit Lines
    • Release 1.3 - UI & AI
    • Release 1.4 - Fixed Rate Leveraged Lido Staking
    • Release 1.5 - Simple and Advanced Borrowing
    • Release 1.6 - Islamic Banking
  • Our Token
  • Partners
  • Revenue Model
  • FAQs
  • Tutorials
  • Social Media Channels
  • AI-driven Decentral Autonomous Bank
Powered by GitBook
On this page
  1. Fixed-term/Fixed-rate Borrowing/Lending
  2. Borrow/Lend SDK and Widgets
  3. Borrow/Lend UI Widgets
  4. JS Integration

Lending Widget Integration

The integrating website/app should include the lending-widget.js script along with the selector <lending-widget referral="" theme="" logo=""></lending-widget>.

The referral parameter is optional and can include integrator's referral code.

The width parameter should include the width of the widget in px you want to be on your website. The widget is optimized for a minimum width of 450px

The height parameter should include the height of the widget in px you want to be on your website.

The theme parameter should include one of the current supported themes: default and light

A unique user ID to track users can be set by integrators by selecting the widget and using the following function:

LendingWidget.set('customer_data', { userId: USER_ID });

USER_ID must be replaced with the ID of the user as a string.

There is one event that an integrator can listen to: smartcreditio_launched. This event is triggered when user clicks Launch SmartCredit.io button and will return an object with the values selected by the user. Events can be subscribed to by selecting the widget and using the following function:

LendingWidget.addEventListener('EVENT_NAME', (event) => event.detail)

EVENT_NAME must be replaced with the event name.

The widget is optimized for a minimum width of 450px.

PreviousBorrowing Widget IntegrationNextFixed-term/Fixed-rate Leveraged Lido staking

Last updated 3 years ago