Quick Start Guide
Get up and running with RozoAI Intent Pay SDK in 5 minutes.
π Installation
npm install @rozoai/intent-pay @rozoai/intent-common @tanstack/react-query wagmi viem @creit.tech/stellar-wallets-kit @stellar/stellar-sdkπ Basic Setup
1. Create Providers File
Create src/providers.tsx:
"use client";
import { getDefaultConfig, RozoPayProvider } from "@rozoai/intent-pay";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { type ReactNode } from "react";
import { createConfig, WagmiProvider } from "wagmi";
export const wagmiConfig = createConfig(
getDefaultConfig({
appName: "Your App Name",
})
);
const queryClient = new QueryClient();
export function Providers({ children }: { children: ReactNode }) {
return (
<WagmiProvider config={wagmiConfig}>
<QueryClientProvider client={queryClient}>
<RozoPayProvider debugMode>{children}</RozoPayProvider>
</QueryClientProvider>
</WagmiProvider>
);
}2. Wrap Your App
3. Add Payment Button with Dynamic Form
Important Notes:
toUnitsprop accepts human-readable amounts as strings (e.g.,"10"for 10 USDC, noparseFloatneeded)You must call
resetPayment()whenevertoChain,toAddress,toToken, ortoUnitsvalues changeUse
useRozoPayUI()hook to access theresetPaymentfunction
π― Quick Customization
Stellar Payout Support
For Stellar USDC payouts, use rozoStellarUSDC from @rozoai/intent-common:
π Next Steps
View complete examples for different frameworks
Read API reference for all available props
See troubleshooting guide for common issues
Last updated