Error 500 (Internal Server Error) Creating Licence - generate-license.php

Followed the instructions on creating a licence and currently using a webhook from Stripe to try to generate a licence when a customer is created, but no joy so far. Keep getting Error 500 (Internal Server Error)…

So far

  • Added $CRYPTLEX_SECRET to .php file
  • Included ***.php?cryptlex_secret= in URL endpoint
  • Added $PERSONAL_ACCESS_TOKEN with correct privileges - license:write, user:read, user:write
  • Added Webhook details to Stripe, specified generate-license.php?cryptlex_secret=**** as URL

RESULT: After creating a customer, Error 500 displayed
******* is currently unable to handle this request.**

STRIPE: Webhook details

URL: https:///generate-license.php?cryptlex_secret=*
Description: To create licence in Cryptlex after a new customer is created
Event types: customer.created

Is there something missing? As it seems more like trial and error at the moment.


The php script you are using is crashing. You need to debug it. I would recommend running the script locally and using stripe-cli to simulate the events.

Thank you. Has anyone actually successfully tested this with a real Stripe account? Or is it just assumed that it works?

So according to -> “You can easily automate the order process of your product”, licensing solution looks good but sorry not as easy as described (read other similar posts too on the forum asking for more details on automating licence creation). Either we have to issue the licences manually or we’ll permanently switch to another licensing solution.
Thanks anyway

Final little suggestion from here: Automatically creating licences is probably a critical requirement for end-users using Cryptlex, it would be good to perhaps spend some time expanding the technical documentation in that area with real examples. For example, Stripe use some dummy test data to show clear examples or scenarios. I’ve seen the Github example, but as indicated above it’s not too helpful in this specific scenario.

Maybe there’s a way to further simplify the automation of licence creation.

The php example assumes you will do the data mapping from Stripe yourself. The default mapping is for FastSpring. Maybe this will help, it is for stripe:

I agree there should be more examples. We are actually planning to support the popular e-commerce solutions natively, but that will take some time.

I agree this is great software but I am finding it impossible to understand how I can get the license activated using payment.succeed in Stripe and then how I would then pass the key to customer and the download url too.
It needs some flow diagrams and specific links to where the detail solutions can be found to implement everything else that is required to get this to work with payments etc.