Skip to main content

Grouped Invoices (B2B)

Grouped invoicing consolidates multiple purchases from the same customer into a single invoice per billing period. Instead of receiving an invoice for each transaction, the customer gets one combined invoice at the end of the month or quarter.

How It Works

Each purchase creates its own transaction with status CAPTURED. At the end of the billing period, Kravia consolidates all transactions for the same customer into a single invoice.

Configuration

Enable invoice_b2b_grouped and set the billing interval:

{
"configuration": {
"kravia": {
"type": "payment_type",
"invoice_b2b_grouped": {
"type": "payment_product_type",
"enabled": true,
"days_until_due": 14,
"invoice_schedule": {
"interval": "monthly"
}
}
}
}
}
OptionTypeDefaultDescription
enabledBooleanfalseEnable grouped invoicing
days_until_dueInteger (0-365)14Days until the consolidated invoice is due
invoice_schedule.intervalString"monthly""monthly" or "quarterly"
require_identity_verificationBooleantrueRequire BankID verification

Invoice Schedule

Invoices are issued on the first business day after the billing period ends.

Monthly, first business day of following month:

Purchase DateInvoice Issue DateDue Date
January 5thFebruary 1stFebruary 15th
January 20thFebruary 1stFebruary 15th
February 15thMarch 1stMarch 15th

Quarterly, first business day of following quarter:

Purchase DateInvoice Issue DateDue Date
January 15thApril 1stApril 15th
February 20thApril 1stApril 15th
April 10thJuly 1stJuly 15th

Quarters: Q1 (Jan-Mar), Q2 (Apr-Jun), Q3 (Jul-Sep), Q4 (Oct-Dec)

If the 1st falls on a weekend, the invoice is issued on the following Monday.

Customer Grouping

Purchases are consolidated per customer, identified by:

  • business_name
  • organization_number
  • country

All purchases matching the same customer within a billing period are grouped into a single invoice.

The customer_reference field on the billing address is a free-text reference for the merchant. For grouped invoices, it also controls grouping: purchases with different customer_reference values are invoiced separately, even within the same organization.

{
"billing_address": {
"first_name": "Ola",
"last_name": "Nordmann",
"business_name": "Nordmann AS",
"organization_number": "123456789",
"customer_reference": "dept-engineering",
"email": "ola@nordmann.no",
"phone_number": "+4799999999",
"address_line": "Storgata 1",
"postal_code": "0151",
"postal_place": "Oslo",
"country": "NO"
}
}

Billing Address

Grouped invoices use the same B2B billing address fields as standard B2B invoices, plus the optional customer_reference for grouping.

Integration

Grouped invoices work with both integration approaches:

  • Customer Checkout: use payment_product_type: "kravia.invoice_b2b_grouped" in your session configuration
  • Merchant Initiated: use payment_product_type: "kravia.invoice_b2b_grouped" in the pay request

See Also