Generate Factur-X Invoices with Perl

Learn how to easily integrate GoFX into your Perl stack.

Dealing with complex XML generation in Perl can be extremely tedious. GoFX abstracts all the EN16931 complexity away. Send a simple JSON payload and get a perfectly compliant hybrid PDF back in milliseconds.

Ecosystem Focus

Integrating Factur-X / EN16931 within the Perl ecosystem is now seamless. Avoid building complex XML DOMs manually and let GoFX handle the heavy lifting. Generate hybrid PDF/A-3 invoices directly via our REST API.

Prerequisites

Ensure you have Perl 5 / LWP::UserAgent configured in your environment to make outbound HTTP POST requests to the GoFX API.

> Code Example
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $req = HTTP::Request->new(POST => "https://api.gofx.app/v1/invoice/generate");
$req->content_type("application/json");
$req->content($json_payload);
my $res = $ua->request($req);
open my $fh, ">", "facture.pdf";
print $fh $res->content;
close $fh;