Stripe integration
Lukittu supports Stripe by automatically delivering licenses to customers via email upon purchase.
Implementation steps
Follow these steps to configure licensing for the products you sell using Stripe:
-
Create a product in the Lukittu platform.
-
Create the same product in the Stripe dashboard.
-
Add custom attributes to the product’s metadata.
-
Set up a webhook endpoint.
-
Add the restricted API key and webhook secret from Stripe to your Lukittu platform Stripe integration.
Creating a Product in the Lukittu Platform
-
Navigate to the Products page and click Add Product.
-
Enter a name for your product and click Save.
-
Open the page for the newly created product and copy the product’s ID.
Here’s an improved version of your documentation steps, formatted in Markdown for clarity:
Creating a Stripe Product for Lukittu
Follow these steps to create and configure a Stripe product for use with Lukittu:
Steps to Create a Stripe Product
-
Access the Stripe Dashboard Navigate to the Product Catalog section on your Stripe dashboard.
-
Add a Product
-
Click the Add a Product button.
-
Enter a product name.
- Tip: Use the same name as your Lukittu product for consistency and easier identification.
-
-
Locate Metadata Options
-
Depending on your device, you should see a More Options dropdown.
-
Open the dropdown and locate the Metadata section.
- Note: Metadata allows you to add custom data to your Stripe product. Lukittu uses this metadata to map Stripe products to its backend.
-
Required Metadata for Lukittu
Add the following metadata key-value pairs to your product:
Key | Description |
---|---|
product_id | Your Lukittu product ID (required for identification). |
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. |
seats | 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
-
For Subscription-Based Products Do not use any expiration-related metadata (
expiration_days
,expiration_start
).-
Why: 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.
-
-
For One-Time Payment Products Expiration metadata can be used as outlined above to define license durations.
Adding a Stripe Webhook
Follow these steps to set up a webhook for Lukittu in Stripe:
Steps to Add a Webhook
-
Search for Webhooks
- Use the search bar on your Stripe dashboard to search for Webhooks.
-
Create a New Event Destination
- Click Add endpoint (or similar option) to create a new webhook.
- Set the Endpoint URL to:
Replace
YOUR_TEAM_ID
with your Lukittu team’s ID.- How to Find Your Team ID:
- Go to the Lukittu dashboard.
- Navigate to Team → Settings to locate your team ID.
- How to Find Your Team ID:
-
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.completed
-
Save the Webhook
- After configuring the events, save the newly created webhook.
-
Retrieve the Webhook Signing Secret
- Once saved, Stripe will generate a Signing Secret for the webhook.
- The signing secret starts with
whsec_
.
- The signing secret starts with
- Note: You will need this signing secret to complete the Stripe integration in Lukittu.
- Once saved, Stripe will generate a Signing Secret for the webhook.
Adding a Restricted API Key to Your Lukittu Platform Account
Follow these steps to create and add a restricted API key from Stripe to your Lukittu account:
Steps to Create a Restricted API Key
-
Navigate to API Keys in Stripe
- Go to the API Keys section on your Stripe dashboard.
-
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:
-
Create and Copy the Key
- Click Create Restricted Key.
- Copy the generated key.
-
Add the Key to Lukittu
- Log in to your Lukittu dashboard.
- Go to the Stripe Integration section.
- Paste the copied API key into the appropriate field to complete the integration. Here’s an improved and polished version of your instructions:
Finishing Touches
With your restricted API key and webhook signing secret ready, follow these final steps to complete your Stripe integration:
Setting Up Stripe Integration in Lukittu
-
Navigate to the Integrations Section
- Log in to your Lukittu dashboard.
- Go to Integrations and select 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.
-
Verify the Integration
- If everything was set up correctly, your Stripe integration should now be fully functional.
- You can start generating payment links for your Stripe products and selling your software!
Testing Your Integration (Optional but 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.