Automatic License Key Delivery
Store license keys securely and automatically deliver them to customers when they complete a purchase. No code required - just upload your keys and link them to your products.
AES-256 Encryption
Keys are encrypted at rest and only decrypted at delivery time
Duplicate Prevention
Atomic transactions ensure no key is ever sent twice
Instant Delivery
Keys are emailed immediately after payment confirmation
Low Stock Alerts
Get notified when your inventory runs low
Quick Start
Get license key delivery working in 4 simple steps:
Create a License Product
Go to your License Keys Dashboard and click "New Product". Give it a name that matches what you're selling.
Add Variants
Create variants for different editions or tiers of your product. Each variant has its own price, stock, and unique Variant ID that you'll use during checkout.
Example variants: "Standard License", "Pro License", "Enterprise License"
Upload License Keys
For each variant, upload your license keys. You can paste them directly, upload a CSV file, or add them one at a time. Keys are encrypted immediately upon upload.
XXXX-XXXX-XXXX-1234 XXXX-XXXX-XXXX-5678 XXXX-XXXX-XXXX-9012
Add Variant ID to Checkout
Copy your Variant ID from the dashboard and include it in your checkout integration. That's it - keys will be delivered automatically after payment!
Integration
Add the variant_id parameter to your existing checkout integration. The license key system works with all checkout methods.
Secure Pricing
When using variant_id, the price is always pulled from your dashboard - not from URL parameters. This prevents customers from manipulating the checkout URL to pay less. You don't need to passamount - it will be ignored if provided.
Frontend SDK (pebblepay.js)
// Price is pulled from your variant settings in the dashboard
// No need to pass amount - it's set in your dashboard for security
PebblePay.checkout({
storeId: 'your_store_id',
variantId: 'var_abc123', // Price is configured in dashboard
customerEmail: 'customer@example.com',
onSuccess: (result) => {
// License key is automatically emailed to customer
console.log('Payment successful:', result.orderId);
}
});Checkout Links
Add the variant ID as a query parameter. The price is set in your dashboard:
https://payments.pebblepay.io/checkout/your_store_id?variant_id=var_abc123
Note: Any amount parameter in the URL will be ignored when variant_id is present.
Server-side API
const response = await fetch('https://payments.pebblepay.io/api/checkout/create-order', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_key'
},
body: JSON.stringify({
store_id: 'your_store_id',
variant_id: 'var_abc123', // Price from dashboard
customer_email: 'customer@example.com'
// amount is NOT needed - variant price is used
})
});Why is pricing handled this way?
- Security: Prevents URL manipulation attacks where customers could modify the amount
- Consistency: Price changes in the dashboard apply immediately to all checkouts
- Simplicity: Fewer parameters to pass - just the variant ID
How It Works
Understanding the fulfillment flow:
Payment Verified
Customer completes checkout and payment is confirmed by our system
Key Reserved
An available key is atomically reserved using database transactions (prevents duplicates)
Email Delivered
Key is decrypted and sent to the customer from orders@payments.pebblepay.io
Order Completed
Fulfillment is marked complete with full audit trail
Security
License keys are valuable digital assets. Our system is designed with security as a top priority:
Encryption at Rest
All license keys are encrypted using AES-256-GCM before being stored in our database. Keys are only decrypted at the moment of email delivery - never exposed via APIs or dashboards.
Atomic Transactions
Key reservation uses PostgreSQL row-level locking (FOR UPDATE SKIP LOCKED) to ensure no two processes can claim the same key, even under high load.
Idempotent Fulfillment
Each order can only trigger fulfillment once. Webhook retries, network issues, or duplicate requests will not cause multiple keys to be sent.
Masked Display
Keys are displayed as XXXX-XXXX-XXXX-ABCD in the dashboard. Only the last 4 characters are visible to help you identify keys.
Low Stock Alerts
Never run out of license keys unexpectedly. Configure alerts to notify you when stock runs low.
Alert Configuration
Go to License Keys Settings to configure:
- Low stock threshold (e.g., alert when fewer than 10 keys remain)
- Email notifications to your account email
- Dashboard notifications with badge indicators
Troubleshooting
Customer didn't receive their key
Check the fulfillment status in your dashboard. If status is "completed", the email was sent - ask the customer to check spam. You can use the "Resend Key" button to send it again.
Fulfillment shows "out_of_stock"
Upload more license keys to the variant. The customer will need to contact you for manual fulfillment, or you can trigger a resend once stock is replenished.
Keys not being delivered automatically
Ensure the variant_id in your checkout matches exactly with the Variant ID shown in your dashboard. The variant must also have available keys in stock.
