Back to Articles
Tutorials5 minJanuary 15, 2025

Building Payment Apps with Bolt.new and MoneyGraph

How to use Bolt.new (StackBlitz) with MoneyGraph SDK. Build and deploy payment applications directly in your browser.

By MoneyGraph Team

Bolt.new (powered by StackBlitz) is a browser-based AI development environment. Build and deploy full-stack applications without leaving your browser—no local setup required.

Why Bolt.new + MoneyGraph?

Bolt.new FeatureMoneyGraph IntegrationResult
Instant EnvironmentZero setup timeStart building immediately
AI-Assisted CodingClaude integrationCompliant code generation
One-Click DeployProduction hostingLive apps in seconds
Package Managementnpm install worksFull SDK available
Real-Time PreviewInstant feedbackSee changes live

Quick Setup

Step 1: Create Vite + React + TypeScript project in Bolt.new

Step 2: Add SDK to src/lib/moneygraph.ts (single-file distribution)

Step 3: Configure .env: `` MONEYGRAPH_API_KEY=sk_test_your_key_here ``

Step 4: Initialize: ``typescript import { MoneyGraph } from './lib/moneygraph'; const mg = new MoneyGraph({ apiKey: import.meta.env.MONEYGRAPH_API_KEY }); ``

Quick Start Prompt

Tell Bolt.new:

Create a payment app using MoneyGraph SDK with Vite + React + TypeScript.

Setup: - npm install @moneygraph/sdk - Create src/lib/moneygraph.ts with SDK initialization - Add MONEYGRAPH_API_KEY to .env

Build these components:

  1. SendMoneyForm:
  2. - Amount input (USD)
  3. - Country dropdown (Nigeria, Kenya, Ghana)
  4. - Recipient details form
  5. - Real-time FX quote with countdown
  6. - "Send" button (checks KYC first)
  1. QuoteDisplay:
  2. - Shows exchange rate
  3. - Displays fees
  4. - Shows recipient amount
  5. - 2-minute countdown timer
  1. PayoutStatus:
  2. - Transaction ID
  3. - Status badge (pending/completed/failed)
  4. - Track payment button

Use server actions for all MoneyGraph API calls. Include loading states and error handling. ```

Bolt.new will generate a complete React payment app in your browser!

Server Actions Pattern

Create server actions for API calls:

// src/actions/payments.ts
'use server';
import { MoneyGraph } from '../lib/moneygraph';

const mg = new MoneyGraph({ apiKey: process.env.MONEYGRAPH_API_KEY! });

export async function sendPayout(params) { // Check KYC first const status = await mg.customers.kyc.canPayout(params.customerId); if (!status.allowed) { return { success: false, error: 'Complete KYC verification first' }; }

// Use smart payout return mg.executeSmartPayout({ customer_id: params.customerId, from_currency: 'USD', to_currency: 'NGN', amount: params.amount, recipient: params.recipient, priority: 'cost', }); } ```

Deployment Tips

TipWhy
Use TypeScriptBetter autocomplete with SDK types
Create services folderKeep API logic separate from UI
Add loading statesAPI calls take 1-3 seconds
Test sandbox firstAlways use `sk_test_*` during development
Handle quote expiryShow countdown and auto-refresh

Why Bolt.new Works for Fintech

Bolt.new's instant environment eliminates setup friction, letting you focus on payment logic instead of configuration. Combined with MoneyGraph's compliance-ready SDK, you can prototype and deploy fintech features faster than ever.

Next Steps:

Bolt.new + MoneyGraph = Production-ready payment apps in your browser.

Ready to Get Started?

Install MoneyGraph SDK and start building AI-native payment applications today