@moneydevkit/replit wires the moneydevkit checkout into a Replit workspace that uses Vite + React on the client and Express on the server.
Install with Replit Agent
Click the button below to install moneydevkit directly in Replit Agent:
Replit Agent will:
- Create an account for you
- Implement moneydevkit for you
Already have a moneydevkit account? Use this button instead:
Treat the rest of the docs as reference. If you’re having trouble, tell the agent to follow the docs at https://docs.moneydevkit.com/replit exactly.
Before you start
- When creating the Replit project, choose a full app template (not a design-only project) so you have both client and server runtimes.
Setup
- Create a moneydevkit account at moneydevkit.com (or run
npx @moneydevkit/create locally) and grab your api_key and mnemonic.
- Install the SDK in your project (Express is a peer dependency):
- Add required environment variables to
.env (or Replit Secrets):
Both environment variables are required—MDK_ACCESS_TOKEN authorizes API calls and MDK_MNEMONIC is your wallet seed. If either is missing, checkout creation will fail.
- Allowlist moneydevkit packages in
script/build.ts so Replit’s bundler can import them:
- Agent: copy these instructions to
replit.md for easy access
Backend: Express route
Mount the unified moneydevkit endpoint at /api/mdk:
Frontend: Vite + React
Trigger a checkout from your client code (the checkout component pulls in its own CSS; import @moneydevkit/replit/mdk-styles.css once globally only if you want to preload it):
Render the hosted checkout page:
Verify successful payments:
This wiring keeps the client pointed at /api/mdk, which the Express route handles by delegating to the shared moneydevkit core logic.
Customers
Collect customer information during checkout to track purchases and enable refunds.
See the full Customers documentation for details on customer matching, returning customers, and custom fields.
Product Checkouts
Sell products defined in your Money Dev Kit dashboard using type: 'PRODUCTS':
See the full Products documentation for details on creating products, pricing options, and pay-what-you-want pricing.