When processing an order, you might run into a "Failed to generate label: shipment.References:The billing preference PON is missing or its value is invalid. 'id' cannot be null" error.

The error relates to a misconfiguration of the Billing Account of the Client you're trying to process the order.

To solve this issue you will have to:

1. Access Clients under the Maintenance menu

2. Click on the client related to the order

3. Edit the Billing Account (Carrier) related to the order and error

4. Set Reference 1 and Reference 2 either picking an option from the dropdown, or entering a fixed value

5. Press Save to apply the changes