Simple Integration
Get KeyKit working with your vibe-coded product in 2 minutes.
Step 1: Configure Stripe Checkout
Set up Stripe to redirect to KeyKit after payment
// In your Stripe checkout session creation
const session = await stripe.checkout.sessions.create({
payment_method_types: ['card'],
line_items: [{
price: 'price_123',
quantity: 1,
}],
mode: 'payment',
success_url: 'https://keykit.app/success?org=YourCompany&product=YourProduct&session_id={CHECKOUT_SESSION_ID}',
cancel_url: 'https://yoursite.com/cancel',
})What this does:
- Customer pays on Stripe (as normal)
- Stripe redirects to KeyKit success page
- KeyKit shows branded success page with license key
- Customer gets their license immediately
Step 2: Validate Licenses in Your App
Check if customer's license key is valid
// License validation in your app
async function checkLicense(licenseKey) {
const response = await fetch('https://keykit.app/api/validate', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ token: licenseKey })
})
return response.json()
}
// Usage
const result = await checkLicense(userEnteredKey)
if (result.valid) {
// Unlock premium features
console.log('License valid for:', result.product.name)
} else {
// Show upgrade prompt
console.log('Invalid license:', result.error)
}What this does:
- Validates license keys in real-time
- Returns product information
- Handles expired/invalid keys gracefully
- Works from any environment (browser, server, mobile)
That's It! 🎉
KeyKit handles everything else automatically:
- • Generates unique license keys for each customer
- • Shows branded success page with your logo/colors
- • Sends professional email (optional)
- • Syncs with Stripe for renewals/cancellations
- • Tracks usage and provides analytics