Product Launch Series, Article 4


If you sell products in France, Extended Producer Responsibility (EPR) makes eco-contributions unavoidable. Every producer or importer must calculate and declare fees for each relevant stream—packaging, textiles, electronics, furniture, batteries and more. Handling this manually across thousands of SKUs and several eco-organisations quickly becomes unmanageable.
Algorep’s AI-driven, API-first platform identifies the right streams, applies current fee grids and returns accurate eco-contributions in real time. This guide shows developers and CTOs how to plug the Algorep endpoint into an existing checkout so fees stay correct and compliant as regulations evolve.
Reading time : ~11 min
In France, any company placing products on the market is classed as a producer under EPR. You must declare and pay eco-contributions to approved organisations such as Léko, Citeo, Ecomaison, Refashion, ecosystem, Valobat, Batribox and others. The AGEC law keeps extending the scope, with new streams like professional packaging, sanitary textiles and fishing gear.
First. Product diversity is huge. One SKU can trigger several EPR streams depending on material, use or composition, and mapping those rules across a full catalogue is labor-intensive.
Second. Regulations are volatile. Fee grids, criteria and reporting formats change almost yearly, so hard-coded rules inside ERP or ecommerce platforms become obsolete fast.
Third. Marketplaces are strict. French marketplaces require a unique EPR identification number and can block non-compliant sellers. If checkout prices and declarations diverge, the financial and legal impact is immediate.
Embedding a calculation API aligns what customers see in the cart with what finance and legal teams declare. Algorep is currently the only provider that combines AI-based fee calculation with automated preparation of producer declarations, acting as a trusted intermediary between producers, eco-organisations and marketplaces.
The Algorep REST endpoint returns pre-calculated eco-contributions for a given producer. AI models determine the applicable streams and apply the latest fee grids; you only supply data you already manage.

GET /producers/{producerNrn}/declarations/eco-contributions The endpoint returns fees per product reference for a chosen producer, country and declaration period. Values are already multiplied by quantity (and by weight when priceUnit = Poids (KG)).
producerNrn (path, required) – Producer registration number in the target country. Example: 34368801600504.
EprCountryCode (query, required) – Country code. Example: FR.
DeclarationPeriodCode (query, required) – Declaration year. Example: 2025.
codePeriod (query, optional) – Specific month or quarter. Example: SEP.

codeVendor (query, optional) – Channel identifier. Example: AMAZ.
curl --request GET \ "https://b6l4r8pq7c.execute-api.eu-west-3.amazonaws.com/producers/34368801600504/declarations/eco-contributions?EprCountryCode=FR&DeclarationPeriodCode=2025" \ --header "Authorization: $API_KEY"
{ "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 }
The checkout needs to retrieve the fee per line item, sum it and present the total. The call is best placed in the backend for security and performance.
Frontend sends cart content (product IDs, quantities, delivery country) to the backend.
.
Backend calls the Algorep endpoint with the correct parameters.
values, sums them and attaches totals to the order.
import axios from "axios"; async function fetchEcoContributions(producerNrn, countryCode, year, apiKey) { const url = `https://b6l4r8pq7c.execute-api.eu-west-3.amazonaws.com/producers/${producerNrn}/declarations/eco-contributions`; const params = { EprCountryCode: countryCode, DeclarationPeriodCode: year }; const response = await axios.get(url, { params, headers: { Authorization: apiKey } }); if (response.data.status !== "OK") throw new Error("Algorep API error"); return response.data.data; } function computeCartEcoFee(cartItems, ecoData) { const ecoByRef = new Map(); ecoData.forEach(item => ecoByRef.set(item.ecoProductReference, item)); let total = 0; const items = cartItems.map(ci => { const e = ecoByRef.get(ci.ecoProductReference); const unitEco = e ? e.ecoContribution / e.quantity : 0; const lineEco = unitEco * ci.quantity; total += lineEco; return { ...ci, ecoContribution: lineEco }; }); return { items, totalEcoContribution: total }; }
When priceUnit equals “Poids (KG)”, the amount returned already includes weight logic; simply carry the ecoContribution forward. If a product triggers several streams, Algorep aggregates them so you can show one line to shoppers or a detailed split for reporting.
or unsupported country.
.
For recoverable issues, log the order for manual review and continue; for non-recoverable ones, block checkout and show a clear message. Always log request parameters and response IDs for later audits.
Eco fees for a given product, country and year seldom change, so cache them and refresh when Algorep updates its grids or when you switch declaration periods. By isolating the Algorep calls in a dedicated service, you can absorb new fields or streams without touching frontend code.

1. Audit your data. List producer entities, barcodes and marketplaces; ensure each SKU maps to an ecoProductReference.
2. Connect to Algorep. Request API credentials and clarify which streams and countries you need now and over the next two years.
3. Design your architecture. Decide where the integration lives (often a backend microservice) and define input/output contracts.
4. Implement and test. Call the endpoint, wire it to the cart model, add logging and test with edge cases.
5. Align finance and legal. Verify amounts and breakdowns match reporting expectations; use Algorep declarations to stay consistent.
6. Deploy gradually. Start with one channel (e.g., the French webshop), then roll out to more marketplaces and countries while monitoring error rates and fee accuracy.
Eco-contributions will keep expanding across Europe. A single API integration ensures accurate fees at checkout and compliant declarations without burdening product teams. To explore a tailored setup, start a conversation at Algorep.