Skip to content

GPT Monetization with Stripe

A Next.js + MCP application for monetizing ChatGPT apps using Stripe

Categories
Share
Post on X

Sell products directly from ChatGPT through Stripe's external checkout integration.

Features

  • Stripe product listing and checkout integration
  • React widgets for product display in ChatGPT
  • Success and cancel pages for checkout flow
  • MCP endpoint at /mcp via Next.js adapter
  • Custom hooks for tool invocation and external links
  • Ready-to-deploy on Vercel

Getting Started

Prerequisites

You need a Stripe account with:

  • Sandbox mode enabled
  • Some one-off products created
  • Your secret key (sk_test_...)

1. Create the project

Shell

2. Environment setup

Shell

Add your Stripe secret key:

Shell

3. Install & run

Shell

Requires Node.js 22.12 or newer. pnpm install also installs @xmcp-dev/compiler, the dev dependency that runs xmcp dev and xmcp build.

This starts both the xmcp dev server and Next.js concurrently.

Project Structure

Text

Testing with ChatGPT

  1. Deploy your app and get the MCP endpoint URL (https://your-app.vercel.app/mcp)
  2. In ChatGPT, go to Apps & Connectors → Advanced Settings and enable developer mode
  3. Create a new connector with your MCP server URL (no authentication required)
  4. Start a new chat and use / to access your connector

Deploy

Deploy with Vercel

Or build manually:

Shell

Learn More

Other templates

One framework to rule them all