cloudflarecloudflare-apps

Is it possible to change products in Cloudflare App using hooks?


I would like to update prices defined in products based on the options provided in the installation form (e.g. promo codes). I tried to update schema.options.*.productDefinitions using "option-change" hook but it doesn't work.


Solution

  • Using Cloudflare Apps paid products requires a Cloudflare subscription and therefore all the paid products must be configured through the process outlined here: https://cloudflareapps.com/apps/developer/docs/payments-and-billing/products

    While you cannot dynamically change the schema of products, you can change the product the user selected using a hook and make that product free. I have not tested this though.