Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cryptlex/third-party-integrations/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Each payment platform integration requires specific environment variables to authenticate with both the payment provider and the Cryptlex API. This page provides a comprehensive reference for all supported environment variables.Stripe Integration
Required environment variables for the Stripe webhook integration:Your Stripe webhook signing secret, used to verify the authenticity of incoming webhook events.Where to find it:
- Go to the Stripe Dashboard
- Select your webhook endpoint
- Click “Reveal” in the “Signing secret” section
whsec_Example: whsec_1234567890abcdefghijklmnopqrstuvwxyzThe Cryptlex Product ID corresponding to the license you want to create or renew.Where to find it:
- Log in to your Cryptlex Dashboard
- Navigate to Products
- Copy the Product ID from your product details
abc12345-6789-0def-ghij-klmnopqrstuvA valid Cryptlex API access token for authenticating requests to the Cryptlex API.Required permissions:
license:readlicense:writeuser:readuser:write
- Log in to your Cryptlex Dashboard
- Navigate to Settings > Access Tokens
- Create a new token with the required permissions
The base URL of the Cryptlex Web API.Default value:
https://api.cryptlex.com/v3When to change: Only modify this if you’re using a dedicated Cryptlex instance or testing environment.FastSpring Integration
Required environment variables for the FastSpring webhook integration:Your FastSpring webhook secret, used to verify the authenticity of incoming webhook events using HMAC-SHA256 signature validation.Where to find it:
- Log in to your FastSpring Dashboard
- Navigate to Integrations > Webhooks
- Create or view your webhook configuration
- Copy the HMAC SHA256 Secret
X-FS-Signature header against this secret.The base URL of the Cryptlex Web API.Default value:
https://api.cryptlex.com/v3A valid Cryptlex API access token for authenticating requests.Required permissions:
license:readlicense:writeuser:readuser:writelicenseTemplate:read(required only if subscription add-ons are supported)
FastSpring integration requires
licenseTemplate:read permission if you plan to support subscription add-ons that map to different license templates.Paddle Integration
Required environment variables for the Paddle webhook integration:Your Paddle webhook secret, used to verify webhook signatures using the Paddle SDK.Where to find it:
- Log in to your Paddle Dashboard
- Navigate to Developer Tools > Notifications
- Create or view your notification settings
- Copy the webhook secret key
paddle.webhooks.unmarshal() method to verify the Paddle-Signature header.No Paddle API key is required for webhook verification. The SDK validates signatures using only the webhook secret.
The base URL of the Cryptlex Web API.Default value:
https://api.cryptlex.com/v3A valid Cryptlex API access token for authenticating requests.Required permissions:
license:readlicense:writeuser:readuser:write
Environment Variables Comparison
Quick reference table showing which variables are required for each platform:| Variable | Stripe | FastSpring | Paddle |
|---|---|---|---|
STRIPE_WEBHOOK_SECRET | Required | - | - |
FASTSPRING_WEBHOOK_SECRET | - | Required | - |
PADDLE_WEBHOOK_SECRET | - | - | Required |
CRYPTLEX_PRODUCT_ID | Required | - | - |
CRYPTLEX_ACCESS_TOKEN | Required | Required | Required |
CRYPTLEX_WEB_API_BASE_URL | Required | Required | Required |
Note: Stripe is the only integration that requires
CRYPTLEX_PRODUCT_ID as an environment variable. FastSpring and Paddle extract product information from the webhook payload.Setting Environment Variables
AWS Lambda
In the AWS Lambda console:- Navigate to your function
- Go to Configuration > Environment variables
- Click Edit
- Add each required variable with its value
- Click Save
Docker
Using command-line flags:.env
Node.js
Export in shell:.env
Security Best Practices
Use Secrets Management
Use Secrets Management
For production deployments, use dedicated secrets management:
- AWS: AWS Secrets Manager or Parameter Store
- Kubernetes: Kubernetes Secrets
- Docker Swarm: Docker Secrets
- Azure: Azure Key Vault
- GCP: Google Secret Manager
Rotate Credentials Regularly
Rotate Credentials Regularly
Implement a rotation policy for:
- Webhook secrets (every 90 days)
- Cryptlex access tokens (every 6-12 months)
- AWS credentials (every 90 days)
Limit Token Permissions
Limit Token Permissions
Create Cryptlex access tokens with only the minimum required permissions:
- Never use admin tokens for webhook integrations
- Create dedicated tokens per integration
- Document which token is used where
Never Commit Secrets
Never Commit Secrets
Protect your secrets from accidental exposure:
- Add
.envfiles to.gitignore - Use git-secrets or similar tools to scan commits
- Enable secret scanning in GitHub repository settings
- Review all code before pushing to public repositories
Monitor Access Logs
Monitor Access Logs
Regularly review access patterns:
- Check Cryptlex API usage logs
- Monitor webhook delivery success rates
- Set up alerts for authentication failures
- Review CloudWatch or application logs for anomalies
Validation
The webhook server validates all required environment variables at startup. If any required variable is missing, the server will:- Log an error message indicating which variable is missing
- Return a 400 error response for webhook requests
- Reject the webhook with message:
<VARIABLE_NAME> was not found in environment variables.
Troubleshooting
Variable Not Found Error
Symptom: Error message<VARIABLE_NAME> was not found in environment variables
Solution:
- Verify the variable is set in your deployment environment
- Check for typos in variable names (they are case-sensitive)
- Ensure variables are available to the process (not just in your shell)
Webhook Signature Verification Failed
Symptom: Webhook requests are rejected with signature verification errors Solution:- Verify the webhook secret matches your payment platform configuration
- Check for extra whitespace in the secret value
- Ensure you’re using the correct secret for the environment (test vs. live)
Cryptlex API Authentication Failed
Symptom: Errors creating users or licenses Solution:- Verify the access token has the required permissions
- Check that the token hasn’t expired
- Ensure
CRYPTLEX_WEB_API_BASE_URLpoints to the correct environment
Next Steps
AWS Lambda Deployment
Deploy using GitHub Actions to AWS Lambda
Docker Deployment
Deploy using Docker containers