Back to Docs

Quick Start Guide

Get up and running with Yeld in under 5 minutes. This guide will walk you through creating your first checkout link and accepting your first payment.

yarn create yeld-app
Last updated: September 2026

Prerequisites

  • Node.js 18+ installed
  • npm or yarn package manager
  • Basic knowledge of React and Next.js
  • A Supabase account (free tier works)
01

Create a Yeld Account

Sign up for a Yeld account to get your API credentials and dashboard access.

npm run dev
  • Visit https://yeld.app/signup
  • Enter your email and create a password
  • Verify your email address
  • Complete your profile setup
02

Set Up Your Environment

Install the necessary dependencies and configure your environment variables.

.env.local
EVM_MASTER_MNEMONIC=your_master_mnemonic_here
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
  • Copy .env.example to .env.local
  • Set your EVM master mnemonic (generate with `openssl rand -hex 32`)
  • Add your Supabase credentials
  • Never commit .env.local to version control
03

Create a Business

Create a business entity in the dashboard to start accepting payments.

import { createCheckoutLink } from "@/lib/checkout-links";

// Create a checkout link for your business
await createCheckoutLink("biz_your_business_id", {
  planName: "Premium Plan",
  plan: "premium",
  description: "Monthly premium subscription",
  price: "50.00",
  billing: "recurring",
  initialFee: "10.00",
  trial: "7",
  stock: "100",
});
  • Navigate to the dashboard at /[bizId]/dashboard
  • Click 'Create Business' to generate a new business
  • Note your business ID (biz_...)
  • This ID is used in all API calls
04

Create a Checkout Link

Generate a payment link that customers can use to pay you.

import { getCheckoutLinks } from "@/lib/checkout-links";

// Fetch your checkout links
const links = await getCheckoutLinks("biz_your_business_id");

console.log(links);
// [
//   {
//     id: "uuid...",
//     businessId: "uuid...",
//     planId: "plan_abc123",
//     planName: "Premium Plan",
//     price: "50.00",
//     currency: "USDC",
//     network: "base-sepolia",
//     billing: "recurring",
//     createdAt: Date,
//   }
// ]
  • Use createCheckoutLink server action to create links
  • Configure: plan name, price, billing type, trial period
  • Share the link with customers via URL or QR code
  • Track payments in your dashboard
05

Accept Your First Payment

Receive crypto payments directly to your business wallet.

// Server-side: Process a payment
import { getCheckoutLinkByPlanId } from "@/lib/checkout-links";
import { db } from "@/db";
import { checkoutSessions } from "@/db/schema";
import { eq } from "drizzle-orm";

// Verify a payment on-chain
async function verifyPayment(planId: string, txHash: string) {
  const link = await getCheckoutLinkByPlanId(planId);
  if (!link) throw new Error("Checkout link not found");

  // Check transaction on blockchain
  const tx = await verifyTransaction(txHash, link.network);
  
  if (tx.success && tx.recipient === link.address) {
    // Create payment session
    await db.insert(checkoutSessions).values({
      checkoutLinkId: link.id,
      businessId: link.businessId,
      chain: link.network,
      status: "confirmed",
      txHash,
      expectedAmount: link.price,
      resolvedAt: new Date(),
    });
    
    return { success: true, amount: link.price };
  }
  
  return { success: false, error: "Payment verification failed" };
}
  • Share your checkout link with customers
  • Customers send USDC to your business address on Base Sepolia
  • Payments are confirmed on-chain
  • Track all transactions in your dashboard

What's Next?

Now that you've set up Yeld, explore these topics to learn more:

Complete Example

Here's a complete example of a checkout page component:

// components/CheckoutButton.tsx
"use client";

import { useState } from "react";
import { createCheckoutLink } from "@/lib/checkout-links";
import { Button } from "@/components/ui/button";

export function CheckoutButton({ bizId }: { bizId: string }) {
  const [loading, setLoading] = useState(false);
  const [error, setError] = useState<string | null>(null);

  async function handleCreateLink() {
    setLoading(true);
    setError(null);

    try {
      const result = await createCheckoutLink(bizId, {
        planName: "One-Time Payment",
        plan: "one-time",
        description: "Payment for services",
        price: "25.00",
        billing: "one-time",
        initialFee: "",
        trial: "",
        stock: "10",
      });

      if (result.ok) {
        alert("Checkout link created successfully!");
        // Redirect to dashboard or show the link
      } else {
        setError(result.error);
      }
    } catch (err) {
      setError("Failed to create checkout link");
    } finally {
      setLoading(false);
    }
  }

  return (
    <div>
      <Button onClick={handleCreateLink} disabled={loading}>
        {loading ? "Creating..." : "Create Checkout Link"}
      </Button>
      {error && (
        <p className="mt-2 text-sm text-destructive">{error}</p>
      )}
    </div>
  );
}