Tax & Pricing Modes

Pricing Modes

Inflow supports two pricing modes that determine how tax is applied:

ModeDescription
TAX_EXCLUSIVE (default)Product prices are excluding tax. Tax is calculated and added on top. The customer pays price + tax
TAX_INCLUSIVEProduct 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:

ModeProduct PriceTaxTotal Charged
TAX_EXCLUSIVE€100€20€120
TAX_INCLUSIVE€100€16.67 (included)€100

Setting the Pricing Mode

Note: pricingMode is only available for server-to-server payments (POST /api/server/payment) and subscription offers. Hosted checkout payments (POST /api/checkout/payment) always use TAX_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"
ParameterRequiredDescription
countryCodeYesISO 3166-1 alpha-2 country code (e.g. FR, DE, US)
amountInCentsHTYesBase amount in cents (excluding tax)
postalCodeNoRequired for some countries (e.g. US)
purchasingAsBusinessNoDefault: 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: true when creating the payment.
  • Provide the customer's businessName and taxId (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"
}
FieldDescription
amountInCentsBase amount in cents (excluding tax)
amountTaxesIncludedTotal amount in cents including tax
taxCountryCountry used for tax calculation
taxRateInPercentageApplied 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.