Automatically charge Formlabs prints in Fabman
Hi everyone,
We’ve published a webhook script that automatically creates charges in Fabman for Formlabs 3D prints.
It connects to the Formlabs API, fetches the latest print job data (volume, material), and calculates the cost based on metadata configured in your Fabman resource.
Key features:
- Charges are created only for selected resources (e.g. Formlabs printers).
- Pricing is based on the used material (
price_per_ml
), with a fallback to a default rate. - Includes logging and debugging output for easy troubleshooting.
- Webhook security via secret token.
- Full configuration and code are open source.
GitHub repo:
https://github.com/happylabHQ/fabman-charge-formlabs
Requirements:
- Your server must support HTTPS with a valid SSL certificate (required by Fabman webhooks).
- A Fabman API token.
- A Formlabs API account (client ID + password login).
Fabman configuration tips:
To ensure that the charge is triggered right after the print finishes, configure the printer’s resource settings in Fabman like this:
Enable “Detect machine status based on power consumption”
→ Set threshold to 40 VAEnable “Turn off idle equipment if members don’t interact”
→ Set timeout to 10 minutes (or suitable value)
This setup ensures the printer automatically powers down shortly after finishing a job — triggering the resourceLog_updated
webhook event that creates the charge.
Example resource metadata in Fabman:
{
"printer_serial": "LucidEel",
"price_per_ml": 0.10,
"FLCW4001": {
"name": "CastableWax40",
"price_per_ml": 0.23
},
"FLFL8001": {
"name": "Flexible80A",
"price_per_ml": 0.13
}
}