Stripe Integration
Lukittu automatically delivers licenses to your customers via email when
they purchase through Stripe.
Implementation Overview
Follow these steps to configure licensing for the products you sell using Stripe:Creating a Product in Lukittu
Creating a Stripe Product for Lukittu
Follow these steps to create and configure a Stripe product for use with Lukittu:Required Metadata for Lukittu
Add the following metadata key-value pairs to your product:| Key | Description |
|---|---|
product_id | Your Lukittu product ID (required). Can be a single ID or a comma-separated list of product IDs. |
Optional Metadata for Lukittu
The following metadata keys are optional and can be added as needed:| Key | Type | Description |
|---|---|---|
ip_limit | Number | Maximum number of IPs allowed. |
hwid_limit | Number | Number of concurrent users allowed. |
expiration_days | Number | Number of days until the license expires. |
expiration_start | ACTIVATION or CREATION | Determines when expiration starts (default: CREATION). Applicable if expiration_days is used. |
Notes on Expiration and Subscriptions
Subscription-Based Products
Subscription-Based Products
Do not use any expiration-related metadata (
expiration_days, expiration_start).Lukittu automatically handles license expiration for subscription-based products. If a payment is not received, the license will expire automatically at the end of the billing period.One-Time Payment Products
One-Time Payment Products
Expiration metadata can be used as outlined above to define license
durations.
Adding a Stripe Webhook
Create a New Event Destination
Click Add endpoint to create a new webhook. Set the Endpoint URL
to:
https://app.lukittu.com/api/v1/integrations/stripe?teamId=YOUR_TEAM_ID Replace YOUR_TEAM_ID with your Lukittu team’s ID.To find your Team ID, go to the Lukittu dashboard and navigate to
Team → Settings.
Configure Webhook Events
Select Listen to events on your account. Add the following events to
the webhook: -
invoice.paid - customer.subscription.deleted -
customer.subscription.created - customer.subscription.updated -
checkout.session.completedAdding a Restricted API Key to Lukittu
Create a New Restricted Key
Click Create Restricted Key. In the dialog: - Purpose: Select
“Providing this key to another website.” - Name: Enter a name for
the key (e.g.,
Lukittu). - URL: Set the URL to:
https://app.lukittu.comFinishing the Integration
Navigate to the Integrations Section
Log in to your Lukittu dashboard and go to Integrations → Stripe
Integration.
Enter API Key and Webhook Signing Secret
Provide the restricted API key you created earlier. Enter the
webhook signing secret (starting with
whsec_) from the Stripe
webhook configuration.Testing Your Integration
Optional Testing Procedure (Recommended)
Optional Testing Procedure (Recommended)
-
Switch to Test Mode in Stripe
- Enable Test Mode on your Stripe dashboard.
- Repeat the steps to set up API keys, webhooks, and products in this isolated environment.
-
Test Transactions
- Use Stripe’s test credit cards to simulate payments and validate your integration.
-
Transition to Production
- Once testing is complete and successful, replicate the setup in Live Mode to start selling.