Customs & trade · x402
eu-carbon-customs
EU CBAM (carbon border adjustment) default embedded emissions for a CN/TARIC code and country of origin, from the official Commission default-values file: direct, indirect and total tCO2e per tonne, production route, year mark-up, and optional embedded emissions and certificate cost for a shipment (tonnes, EUR price).
0.003 USDC / call · {atomic} atomic · 3000 atomic
Endpoint
GET|POST https://forge-tools.dentreprise.workers.dev/api/eu-carbon-customs
Parameters
| Name | Required | Type | Description |
|---|---|---|---|
cn | Required | string | CN/TARIC code 4-10 digits |
country | Required | string | Origin country name or ISO alpha-2 |
year | Optional | string | 2026+ |
tonnes | Optional | string | Shipment mass in tonnes (optional) |
price_eur | Optional | string | CBAM certificate price EUR/tCO2e (optional) |
Example request (unpaid — expect 402)
curl -sS -D - "https://forge-tools.dentreprise.workers.dev/api/eu-carbon-customs?cn=72081000&country=CN&tonnes=100&price_eur=75"
Example 402 challenge
The same object is also sent as a base64 PAYMENT-REQUIRED header. Amounts are atomic USDC units (6 decimals).
{
"x402Version": 2,
"error": "Payment required",
"resource": {
"url": "https://forge-tools.dentreprise.workers.dev/api/eu-carbon-customs",
"description": "EU CBAM (carbon border adjustment) default embedded emissions for a CN/TARIC code and country of origin, from the official Commission default-values file: direct, indirect and total tCO2e per tonne, production route, year mark-up, and optional embedded emissions and certificate cost for a shipment (tonnes, EUR price).",
"mimeType": "application/json"
},
"accepts": [
{
"scheme": "exact",
"network": "eip155:8453",
"amount": "3000",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"payTo": "0x7B8bf45ac6AcbA6D4CFB626b57D3f5fF3C9C89F7",
"maxTimeoutSeconds": 120,
"extra": {
"name": "USD Coin",
"version": "2"
}
}
]
}Retry with payment
curl -sS "https://forge-tools.dentreprise.workers.dev/api/eu-carbon-customs?cn=72081000&country=CN&tonnes=100&price_eur=75" \ -H "PAYMENT-SIGNATURE: $PAYMENT"
Example response
{
"cn": "72081000",
"country_table": "China",
"items": [
{
"description": "Flat-rolled products…",
"total": 2.5,
"total_with_markup": 2.75,
"embedded_emissions_t": 275
}
]
}