CalculateGenericTax
POST
/billing/v1/tax/calculate-genericRequest Body
requiredapplication/json{
"$ref": "#/components/schemas/billing.v1.CalculateGenericTaxRequest",
"$ref-value": {
"type": "object",
"properties": {
"org_id": {
"type": "string",
"examples": [
"OR98234j23"
],
"title": "org_id"
},
"amount": {
"exclusiveMinimum": 0,
"type": "string",
"examples": [
"2999"
],
"title": "amount",
"format": "int64"
},
"currency": {
"type": "string",
"examples": [
"usd"
],
"title": "currency",
"minLength": 1
},
"billing_address": {
"allOf": [
{
"$ref": "#/components/schemas/billing.v1.BillingAddress",
"$ref-value": {
"type": "object",
"properties": {
"name": {
"type": "string",
"examples": [
"Jane Doe"
],
"title": "name",
"minLength": 1
},
"line1": {
"type": "string",
"examples": [
"123 Main St"
],
"title": "line1",
"minLength": 1
},
"line2": {
"type": "string",
"examples": [
"Apt 4B"
],
"title": "line2"
},
"city": {
"type": "string",
"examples": [
"San Francisco"
],
"title": "city",
"minLength": 1
},
"state": {
"type": "string",
"examples": [
"CA"
],
"title": "state",
"minLength": 1
},
"postal_code": {
"type": "string",
"examples": [
"94105"
],
"title": "postal_code",
"minLength": 1
},
"country": {
"type": "string",
"examples": [
"US"
],
"title": "country",
"minLength": 1
},
"phone": {
"type": "string",
"examples": [
"+15551234567"
],
"title": "phone"
},
"email": {
"type": "string",
"examples": [
"billing@example.com"
],
"title": "email",
"format": "email"
}
},
"title": "BillingAddress",
"required": [
"name",
"line1",
"city",
"state",
"postal_code",
"country"
],
"additionalProperties": false
}
}
],
"title": "billing_address"
},
"line_items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/billing.v1.TaxLineItem",
"$ref-value": {
"type": "object",
"properties": {
"amount": {
"type": "string",
"examples": [
"2999"
],
"title": "amount",
"format": "int64"
},
"reference": {
"type": "string",
"title": "reference"
},
"tax_code": {
"type": "string",
"title": "tax_code"
}
},
"title": "TaxLineItem",
"additionalProperties": false
}
},
"title": "line_items"
}
},
"title": "CalculateGenericTaxRequest",
"required": [
"currency"
],
"additionalProperties": false
}
}Response Body
200application/json
Success
type: unknown
{
"$ref": "#/components/schemas/billing.v1.TaxCalculationResponse",
"$ref-value": {
"type": "object",
"properties": {
"calculation_id": {
"type": "string",
"title": "calculation_id"
},
"amount_total": {
"type": "string",
"examples": [
"2999"
],
"title": "amount_total",
"format": "int64"
},
"tax_amount_exclusive": {
"type": "string",
"examples": [
"2999"
],
"title": "tax_amount_exclusive",
"format": "int64"
},
"tax_amount_inclusive": {
"type": "string",
"examples": [
"2999"
],
"title": "tax_amount_inclusive",
"format": "int64"
},
"currency": {
"type": "string",
"examples": [
"usd"
],
"title": "currency"
}
},
"title": "TaxCalculationResponse",
"additionalProperties": false
}
}curl -X POST "https://api.rixl.com/billing/v1/tax/calculate-generic" \
-H "Content-Type: application/json" \
-d '{
"currency": "usd"
}'Success
application/json
{
"$ref": "#/components/schemas/billing.v1.TaxCalculationResponse",
"$ref-value": {
"type": "object",
"properties": {
"calculation_id": {
"type": "string",
"title": "calculation_id"
},
"amount_total": {
"type": "string",
"examples": [
"2999"
],
"title": "amount_total",
"format": "int64"
},
"tax_amount_exclusive": {
"type": "string",
"examples": [
"2999"
],
"title": "tax_amount_exclusive",
"format": "int64"
},
"tax_amount_inclusive": {
"type": "string",
"examples": [
"2999"
],
"title": "tax_amount_inclusive",
"format": "int64"
},
"currency": {
"type": "string",
"examples": [
"usd"
],
"title": "currency"
}
},
"title": "TaxCalculationResponse",
"additionalProperties": false
}
}