Skip to content

Latest commit

 

History

History
82 lines (69 loc) · 1.85 KB

File metadata and controls

82 lines (69 loc) · 1.85 KB
title Quickstart
description Integrate Trails in under 5 minutes
sidebarTitle Quickstart

Install

```shell npm npm install 0xtrails ``` ```shell pnpm pnpm add 0xtrails ``` ```shell yarn yarn add 0xtrails ``` ```shell bun bun add 0xtrails ```

Add the Widget

import { TrailsWidget } from '0xtrails/widget'

export function Checkout() {
  return (
    <TrailsWidget
      apiKey="YOUR_API_KEY"
      mode="pay"
      toAddress="0xYourMerchantAddress"
      toAmount="10"
      toChainId={8453}
      toToken="USDC"
    />
  )
}

User pays with any token from any chain → You receive exactly 10 USDC on Base.

**Get an API key**: Sign up and create an API key on the [Trails Dashboard](https://dashboard.trails.build/landing)

Starter Templates

Try it now Starter kit Starter kit

Next Steps

Stablecoin payments, merchant integration Cross-chain token swaps Protocol deposits, trustless deposit addresses, chain onboarding, built-in onramps, and more Integrated DeFi Yield Deposits

Full reference: SDK Configuration · API Reference · Hooks