Widget (beta)

Introduction

The orda widget is a comprehensive, embeddable React component that enables multi-chain cryptocurrency payments in your application. Built on top of the @ordanetwork/sdk, it provides a complete payment solution with minimal configuration.

circle-info

Key Features

  • Multi-Chain Support: EVM chains (Ethereum, Polygon, Arbitrum, Base, Optimism, etc.) and Solana

  • Multiple Transaction Types:

    • Swap: Cross-chain token swaps

    • Off-Ramp: Convert crypto to fiat (crypto → BRL via PIX)

    • On-Ramp: Convert fiat to crypto (BRL → crypto via PIX)

  • Wallet Integration: Seamless connection with WalletConnect/Reown AppKit

  • Recipient Management: Save and manage payment recipients

  • Token Prices & Balances: Real-time USD prices and multi-chain balance fetching

  • Responsive Design: Works on desktop and mobile devices

  • Customizable Theming: CSS variables for easy customization

Prerequisites

Before integrating the widget, you'll need:

  1. WalletConnect Project ID: Create a free project at https://cloud.reown.com/

  2. orda API Credentials: Sign up at the orda developer portal to get your clientId and clientSecret

  3. React Application: The widget requires React 18+ or React 19+

  4. Node.js: Version 18 or higher


Installation

Install the SDK and required peer dependencies.

Version Compatibility

Package
Version

@ordanetwork/sdk

Latest

react

^18.0.0 || ^19.0.0

react-dom

^18.0.0 || ^19.0.0

wagmi

^2.0.0

viem

^2.0.0

@tanstack/react-query

^5.0.0

@solana/web3.js

^1.90.0


Quick Start

This section shows you how to integrate the widget in a Next.js App Router application (the recommended approach). See other examples for Vite, Create React App and Next.js Pages router here.

1

Set Environment Variables

Create a .env.local file in your project root:

circle-exclamation
2

Create JWT Authentication Route

Create a server-side API route to exchange your credentials for a JWT token.

File: app/api/auth/jwt/route.ts

3

Create Provider Component

Create a client component that wraps your app with the orda provider.

File: app/providers.tsx

4

Update Root Layout

Import the widget styles and wrap your app with the Providers component.

File: app/layout.tsx

5

Use the Widget

Import and render the widget in your page.

File: app/page.tsx

6

Run Your App

Visit http://localhost:3000 and you should see the orda payment widget!

Last updated