Skip to content

Add x402 integration guide to MiniKit documentation #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,8 @@
"wallet-app/build-with-minikit/overview",
"wallet-app/build-with-minikit/quickstart",
"wallet-app/build-with-minikit/existing-app-integration",
"wallet-app/build-with-minikit/debugging"
"wallet-app/build-with-minikit/debugging",
"wallet-app/build-with-minikit/x402-integration"
]
},
{
Expand Down
86 changes: 86 additions & 0 deletions docs/wallet-app/build-with-minikit/x402-integration.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
title: "Monetize Your MiniKit App with x402"
description: "Enable instant, fee-free payments in your MiniKit app using x402 - the open payment protocol for the onchain economy"
---

## The Perfect Match: x402 + MiniKit

x402 is the easiest way to monetize your MiniKit app with instant, fee-free USDC payments on Base. By combining MiniKit's seamless wallet integration with x402's revolutionary payment protocol, you can create powerful pay-as-you-go experiences that were previously impossible.

<Card title="Start Building with x402" icon="rocket" href="https://docs.cdp.coinbase.com/x402/miniapps">
Complete integration guide for x402 in MiniKit applications
</Card>

Traditional payment systems weren't built for the onchain world. x402 changes that by reviving the [HTTP 402 Payment Required](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/402) status code to enable:

- **Zero fees**: Fee-free USDC payments on Base network
- **Instant settlement**: No waiting for payment processing
- **No accounts needed**: Users pay directly from their wallet
- **Pay-per-use**: Perfect for APIs, content, and services
- **AI-ready**: Agents can autonomously pay for services

## Unlock New Business Models

With x402 in your MiniKit app, you can monetize services that were previously impractical:

### API Services
- **Video generation**: Charge per render
- **AI models**: Pay-per-query pricing
- **Data feeds**: Micropayments for real-time data
- **Image processing**: Usage-based billing

### Digital Content
- **Paywalled articles**: Instant micropayments
- **Premium features**: Unlock functionality on-demand
- **Media streaming**: Pay-per-minute content

### In-App Services
- **Compute resources**: Charge for processing power
- **Storage**: Pay-as-you-store models
- **Notifications**: Micropayments for alerts

## How It Works in MiniKit

The integration is beautifully simple:

1. **User requests a paid service** in your MiniKit app
2. **Your server responds with 402 status** and payment details
3. **MiniKit handles the payment** seamlessly from the user's wallet
4. **Service is delivered instantly** upon payment verification

No complex authentication. No payment forms. No friction.

## The Future of Onchain Payments

x402 is designed to become the standard for onchain payments across the internet - for both humans and AI agents. By integrating x402 into your MiniKit app today, you're building for tomorrow's economy where:

- AI agents autonomously purchase services
- Micropayments enable new business models
- Cross-app interoperability is the norm
- Payment friction is completely eliminated

## Developer Benefits

- **Quick setup**: Integration in minutes, not days
- **No blockchain complexity**: x402 handles all the crypto infrastructure
- **Flexible pricing**: Charge per request, per feature, or per minute
- **Global payments**: Accept USDC from users worldwide
- **Future-proof**: Built on an open standard that will evolve with the ecosystem

## Get Started Today

Ready to monetize your MiniKit app with x402?

<Card title="x402 Quickstart for MiniApps" icon="code" href="https://docs.cdp.coinbase.com/x402/miniapps">
Step-by-step integration guide with code examples
</Card>

<Card title="x402 Core Concepts" icon="book-open" href="https://docs.cdp.coinbase.com/x402/core-concepts/how-it-works">
Understand the protocol and payment flow
</Card>

### Resources

- [x402 Documentation](https://docs.cdp.coinbase.com/x402)
- [MiniKit Overview](/wallet-app/build-with-minikit/overview)
- [Join the CDP Discord](https://discord.gg/invite/cdp)