Easily integrate AlgoREP's eco-contribution calculation API into your checkout. Ensure compliance and automate fee management with our reliable solution.


Eco-contribution has become a core compliance duty for any company selling regulated products in France and, increasingly, across Europe. To keep pace with evolving rules and multiple EPR streams, merchants need a real-time way to surface the correct eco fees at checkout—without brittle spreadsheets or hard-coded tables.
This article shows how to connect your commerce stack to the Algorep platform, calculate eco contributions from live cart data and keep fees perfectly aligned with the declarations you will later file with French eco-organizations.
Reading time : ~12 min
In France, producers and importers must declare eco contributions to accredited bodies such as Léko, Citeo, Ecomaison, Refashion, ecosystem, Valobat and Batribox for every relevant EPR stream (packaging, textiles, electronics, furniture, batteries and more). Since the 2020 AGEC law, rules change often, new streams appear and marketplaces demand an Identifiant Unique (IDU) before listings go live.
Algorep solves the scaling problem with an AI engine that classifies each product, calculates the exact fee in real time and exposes the result through an API. Unlike tools that only add static fees to price lists, Algorep also prepares complete producer declarations, acting as a trusted bridge between sellers, eco-organizations and French marketplaces.
The API returns one line per declared product. According to Algorep documentation, the calculation is:
unit-based scale = quantity × price weight-based scale = quantity × price × itemWeight
The value is rounded to two decimals so it can be used directly for checkout totals and accounting.
Example response:
{ "producerNrn": "98181160700010", "eprCountryCode": "FR", "declarationPeriodCode": "2025", "codePeriod": "SEP", "codeVendor": "AMAZ", "schemeCode": "BAT", "ecoOrganismName": "BATRIBOX", "scaleCode": "BP-BAT-LIT", "ecoProductReference": "B07R59DMQR", "quantity": 200, "itemWeight": "0.5", "price": 2.561, "priceUnit": "Poids (KG)", "ecoContribution": 512.2 }
Key fields for checkout are ecoContribution, quantity, price, itemWeight, ecoOrganismName, schemeCode, scaleCode and ecoProductReference.
Send an API key in the Authorization header from your backend.
Inject producerNrn, EprCountryCode and DeclarationPeriodCode when the cart is stable. Example:
curl https://…/producers/34368801600504/declarations/eco-contributions?EprCountryCode=FR&DeclarationPeriodCode=2023 -H "Authorization: $API_KEY"
Match ecoProductReference to your SKU, read ecoContribution, adjust for quantity changes and attach the fee to each line.

Sum all line-level fees into totalEcoContribution, add it to your grand total and decide whether to show fees per line, per scheme or as one aggregated amount.
Store per-line details (ecoContribution, schemeCode, ecoOrganismName, scaleCode, ecoProductReference) and per-order context (totalEcoContribution, EprCountryCode, DeclarationPeriodCode, producerNrn) for future reconciliation. You can also review the same data inside the CompliancR dashboard for audit trails and advanced analytics.
Common codes include ALGOREP_005 (missing parameters), ALGOREP_004 (unknown producer), ALGOREP_002 (product issue) and ALGOREP_001 (server error).
Request errors: log, show a generic message and default fees to zero while alerting support. Product errors: choose to block the sale or flag for manual review. Transient errors: retry with exponential backoff and use a circuit breaker.
Synchronous at checkout: call Algorep during payment, store results after success.
Precomputation with refresh: cache fees in a pricing service and refresh periodically.
Hybrid marketplace model: precompute per seller but still call the API for new items or sudden regulatory changes.
1. Inventory your EPR perimeter: list countries, map producerNrn to channels.
2. Connect your catalog to Algorep: ensure stable references and enable AI classification.
3. Implement the API integration: secure HTTP client, parameter wiring, SKU mapping.
4. Design the UX and reporting: decide fee display and export formats for finance teams.
5. Test across edge cases: high-volume carts, mixed categories, cross-border scenarios.

Automated eco-contribution is now mandatory for selling on major French marketplaces and prepares you for future EPR expansion in Germany, Spain, Italy and beyond. By integrating Algorep’s API you remove manual fee maintenance, ensure declaration accuracy and offer customers full transparency at checkout. Explore more resources on the Algorep France page.