Tax & Pricing Modes
Pricing Modes
Inflow supports two pricing modes that determine how tax is applied:
| Mode | Description |
|---|---|
TAX_EXCLUSIVE (default) | Product prices are excluding tax. Tax is calculated and added on top. The customer pays price + tax |
TAX_INCLUSIVE | Product prices include tax. The displayed price is the total the customer pays. Tax is extracted from the price |
Example
For a product priced at €100 with 20% VAT:
| Mode | Product Price | Tax | Total Charged |
|---|---|---|---|
| TAX_EXCLUSIVE | €100 | €20 | €120 |
| TAX_INCLUSIVE | €100 | €16.67 (included) | €100 |
Setting the Pricing Mode
Note:
pricingModeis only available for server-to-server payments (POST /api/server/payment) and subscription offers. Hosted checkout payments (POST /api/checkout/payment) always useTAX_EXCLUSIVE.
On Server-to-Server Payment Creation
curl -X POST https://api.inflowpay.xyz/api/server/payment \
-H "X-Inflow-Api-Key: inflow_priv_your_key" \
-H "Content-Type: application/json" \
-d '{
"products": [{ "name": "Product", "price": 10000, "quantity": 1 }],
"currency": "EUR",
"customerEmail": "[email protected]",
"billingCountry": "FR",
"purchasingAsBusiness": false,
"pricingMode": "TAX_INCLUSIVE"
}'On Subscription Offer Creation
curl -X POST https://api.inflowpay.xyz/subscription/offer \
-H "X-Inflow-Api-Key: inflow_priv_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Pro Plan",
"description": "Monthly access",
"amountInCents": 2999,
"currency": "EUR",
"interval": "month",
"intervalCount": 1,
"pricingMode": "TAX_EXCLUSIVE"
}'If pricingMode is not specified, TAX_EXCLUSIVE is used by default.
Automatic VAT Calculation
Inflow automatically calculates the applicable VAT rate based on the customer's billing country. The VAT rate is determined when the payment is created using the billingCountry field.
Tax Rate API
You can query the tax rate for a specific country and amount before creating a payment:
curl "https://api.inflowpay.xyz/api/tax/rate?countryCode=FR&amountInCentsHT=10000&postalCode=75001" \
-H "X-Inflow-Api-Key: inflow_priv_your_key"| Parameter | Required | Description |
|---|---|---|
countryCode | Yes | ISO 3166-1 alpha-2 country code (e.g. FR, DE, US) |
amountInCentsHT | Yes | Base amount in cents (excluding tax) |
postalCode | No | Required for some countries (e.g. US) |
purchasingAsBusiness | No | Default: false |
Response:
{
"amountWithTaxInCents": 12000,
"taxAmountInCents": 2000,
"taxRateInPercentage": 20,
"taxablePartInPercentage": 100,
"countryCode": "FR",
"postalCode": null,
"purchasingAsBusiness": false
}B2B Reverse Charge
For business-to-business (B2B) transactions within the EU, VAT reverse charge rules may apply:
- Set
purchasingAsBusiness: truewhen creating the payment. - Provide the customer's
businessNameandtaxId(VAT number). - Inflow applies the appropriate B2B tax rules based on the customer's country and your merchant country.
curl -X POST https://api.inflowpay.xyz/api/server/payment \
-H "X-Inflow-Api-Key: inflow_priv_your_key" \
-H "Content-Type: application/json" \
-d '{
"products": [{ "name": "Service", "price": 50000, "quantity": 1 }],
"currency": "EUR",
"customerEmail": "[email protected]",
"billingCountry": "DE",
"purchasingAsBusiness": true,
"businessName": "Acme GmbH",
"taxId": "DE123456789",
"pricingMode": "TAX_EXCLUSIVE"
}'Tax in Payment Responses
Tax information is included in payment responses:
{
"id": "pay_abc123",
"amountInCents": 10000,
"amountTaxesIncluded": 12000,
"taxCountry": "FR",
"taxRateInPercentage": 20,
"status": "PAYMENT_SUCCESS"
}| Field | Description |
|---|---|
amountInCents | Base amount in cents (excluding tax) |
amountTaxesIncluded | Total amount in cents including tax |
taxCountry | Country used for tax calculation |
taxRateInPercentage | Applied tax rate (e.g., 20 for 20%) |
Quaderno Integration
For advanced tax compliance (automated tax receipts, filings, etc.), Inflow integrates with Quaderno. See Quaderno Integration for setup instructions.
Updated 17 days ago