Japan has a dual VAT system — 10% standard and 8% reduced for food and beverages. Torify computes both with configurable rounding modes (floor/round/ceil).
https://torify.dev/v1/tax/calculate
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
amount |
integer | Yes | Base amount (excluding tax) | 10000 |
category |
string | No | standard | food | beverage | food |
{ "ok": true, "data": { "rate": 0.08, "tax": 800, "total": 10800 } }
curl "https://torify.dev/v1/tax/calculate?amount=10000"
import { wrapFetchWithPayment } from 'x402-fetch';
import { privateKeyToAccount } from 'viem/accounts';
const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
const fetchWithPayment = wrapFetchWithPayment(fetch, account);
const res = await fetchWithPayment(
'https://torify.dev/v1/tax/calculate?amount=10000'
);
const data = await res.json();
console.log(data); // { ok: true, data: { ... } }
import requests
# Free MCP tier (no auth) or API key (X-API-Key header)
res = requests.get(
"https://torify.dev/v1/tax/calculate?amount=10000",
headers={"X-API-Key": "your_torify_pro_key"}
)
print(res.json())
/v1/invoice/validate — Japan Invoice Number Format Validation API
/v1/invoice/verify — Japan Invoice Verification: Qualified Invoice (T-Number) API
/v1/eltax/check — Japan Electronic Bookkeeping Compliance API