Tax, discounts and your customers' VAT IDs

Give each invoice line a tax rate, take a discount off before tax, and collect your customer's billing address, business name and VAT ID before they pay.

5 min read Invoices

An invoice's payment page with three lines taxed at 19% and 7%, a 10% discount and the tax at each rate

When you bill a business, the invoice has to show the tax on each line, any discount, and who you billed, with their VAT number. Invoice lines now take a tax rate, invoices take a discount before tax, and invoices and payment links can collect your customer's billing address, business name and VAT or tax ID before they pay.

Add tax and a discount to an invoice

Open Invoices and press New invoice. In the Items card, give a line a rate under Tax %, from 0 to 100 with up to two decimals, to add tax on top of its price. A line left empty carries none.

Discount takes a Percent, above 0 and below 100, or an Amount, less than the items come to, and it is taken off the items before tax. The foot of the card adds up the subtotal, the discount, the tax at each rate and the total as you type.

The Items card of a new invoice in euros: three lines taxed at 19% and 7%, a 10% discount, and below them the subtotal, the discount, the tax at each rate and a total of €3,244.86
Each rate's tax gets a line of its own, worked out after the discount.

The discount is shared over the lines in proportion to their price, and each rate's tax is worked out on what is left of its lines, rounded to the cent. Above, the lines at 19% come to €2,760.00, 10% off leaves €2,484.00, and their tax is €471.96, which the invoice prints as "Tax 19% on €2,484.00".

Your customer is charged the total, and the subtotal, discount and tax show on the invoice's page in the dashboard, its payment page, the printed invoice and the Invoices export.

Ask for billing details, or fill them in

In the Customer card of a new invoice, Add a billing address and tax ID lets you fill in a business name, a VAT or tax ID and an address yourself. Turn on Ask the customer for their billing details and the customer confirms or corrects them on the invoice's page before paying. With it off, the customer is not asked and yours are printed.

On a payment link, open Payment links, then New payment link or a link's Edit, and switch on Collect billing details in the Checkout card.

The Checkout card of a payment link with three switches on: Require an email address, Ask for the customer name and Collect billing details, above the Extra questions section
The switch sits with the email and name switches, above the link's extra questions.

What your customer sees

Before the customer is shown where to pay, the checkout asks for a Billing address. The country starts on the one already on the invoice, or else the one they connect from, and city, postal code and state or region are required, optional or left out as that country's addresses need. The postal code is checked against the country. Ticking I am buying for a business opens Business name and VAT or tax ID, both optional.

The checkout asking for a billing address in Germany, with a business name and a VAT ID for a customer buying for a business
On an invoice, the details you entered fill the form in, and the customer can correct any of them.

A VAT number from the EU, the United Kingdom, Switzerland or Norway is checked against its country's format and kept in one form, upper case with its prefix, such as DE123456789. One that does not fit is refused, and a tax ID from any other country is kept as typed. Only the format is checked: the number is not looked up in a VAT register.

Where the details are printed

The invoice and the receipt print them under "Billed to": the business, then your customer's name, the address the way its country writes it, and the tax ID. A credit note prints the same lines under "Issued to". Your customer prints the invoice with Print or save as PDF on its payment page, and you with Print / PDF on the invoice in the dashboard.

A printed invoice billed to Nordwind GmbH, with Clara Weber's name, a Berlin address and the tax ID DE123456789, three lines with their tax rates, a 10% discount, the tax at each rate and a total of €3,244.86
Each line shows its rate, and each rate's tax names the amount it was worked out on.

In the dashboard, a charge's Customer card and an invoice's Details card show them, and Export CSV on Charges and on Invoices has columns for them. When the billing address is in another country than the customer's IP address, the Customer card warns you, as Know more about who is paying explains.

In the API, the MCP server and WooCommerce

POST /v1/invoices takes a tax_rate on each item, a discount_percent or a discount_amount, and customer_business_name, customer_tax_id, customer_address and collect_billing_details. This request bills the same lines as above:

cURL

Copy failed. Select the code and copy it manually.

curl -X POST https://api.velirapay.com/v1/invoices \
  -H "Authorization: Bearer $VELIRAPAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_name": "Clara Weber",
    "customer_email": "clara.weber@example.com",
    "customer_business_name": "Nordwind GmbH",
    "customer_tax_id": "DE123456789",
    "customer_address": {
      "line1": "Friedrichstraße 68", "city": "Berlin",
      "postal_code": "10117", "country": "DE"
    },
    "collect_billing_details": true,
    "currency": "EUR",
    "items": [
      {"description": "Website redesign", "quantity": "1",
       "unit_amount": "2400.00", "tax_rate": "19"},
      {"description": "Hosting, 12 months", "quantity": "1",
       "unit_amount": "360.00", "tax_rate": "19"},
      {"description": "Training session", "quantity": "2",
       "unit_amount": "150.00", "tax_rate": "7"}
    ],
    "discount_percent": "10"
  }'

The invoice comes back, in the API and in invoice webhooks, with its subtotal, discount, discount_percent and tax, all null when it has neither tax nor a discount. Before 26 November 2026 the API ignored the tax and discount fields, so code that already sent them now bills the taxed, discounted total.

The totals on the invoice

Copy failed. Select the code and copy it manually.

{
  "data": {
    "object": "invoice",
    "currency": "EUR",
    "subtotal": "3060.00",
    "discount": "306.00",
    "discount_percent": "10.00",
    "tax": "490.86",
    "amount": "3244.86"
  }
}

Payment links take collect_billing_details too, and POST /v1/charges takes business_name, tax_id and address in its customer object, which every charge returns in the API and in webhooks. The MCP tools create_invoice, create_payment_link, update_payment_link and create_charge take the same fields.

VeliraPay for WooCommerce 0.4.11 sends each order's billing company, address and VAT number with its invoice, reading the VAT number from the common VAT plugins or from the velirapay_customer_tax_id filter.

Good to know

  • VeliraPay does not work out tax for you: the rates you set on an invoice are what is charged, and a payment link's price is what the customer pays.
  • Tax and a discount need items, and an invoice has up to 50 of them.
  • An invoice cannot be changed once it is created: to correct a rate or a discount, void it and create a new one.
  • Coupons are for payment links and charges. An invoice takes its own discount instead.
  • Billing details are asked for on the hosted checkout only.

The invoices reference has a request with tax and a discount, and the charges reference describes the customer object. Refund a customer to the address they give you covers credit notes, Checkout questions, now with ten types the other things a payment link can ask, and the late November update the rest of what changed.

Share this article
X LinkedIn