Tax
Create tax rate definition
Create a reusable tax rate definition for manual tax calculation.
Authorization
bearerAuth AuthorizationBearer <token>
Use your secret API key as the bearer token
In: header
Request Body
application/json
name*string
description?string|null
taxRate*string
Decimal string between 0 and 1 (e.g., '0.0875')
Match
^\d+(\.\d{1,4})?$jurisdiction?string|null
Optional jurisdiction label
taxType?string|null
Tax type label (defaults to 'manual')
isActive?boolean|null
Whether this definition is active (defaults to true)
Response Body
application/json
application/json
application/json
curl -X POST "https://api.getlumen.dev/v1/tax/rate-definitions/create" \ -H "Content-Type: application/json" \ -d '{ "name": "California manual tax", "description": "Manual fallback rate", "taxRate": "0.085", "jurisdiction": "US-CA", "taxType": "manual" }'{
"id": "tax_rate_def_1Abc9rQp3Kf4s6T8uYz0Lp",
"merchantId": "mer_4aExPpQ7R3tSa1BcDe9LmN",
"name": "California manual tax",
"description": "Manual fallback rate",
"taxRate": "0.085",
"jurisdiction": "US-CA",
"taxType": "manual",
"isActive": true,
"createdAt": "2025-02-20T08:10:00.000Z",
"updatedAt": "2025-02-20T08:10:00.000Z"
}{
"error": [
{
"code": "custom",
"message": "Tax rate must be a valid decimal number (e.g., '0.0875' for 8.75%)",
"path": [
"taxRate"
]
}
]
}{
"error": "Internal server error"
}