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"
}
}
}
}
}
| Option | Type | Default | Description |
|---|---|---|---|
enabled | Boolean | false | Enable grouped invoicing |
days_until_due | Integer (0-365) | 14 | Days until the consolidated invoice is due |
invoice_schedule.interval | String | "monthly" | "monthly" or "quarterly" |
require_identity_verification | Boolean | true | Require 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 Date | Invoice Issue Date | Due Date |
|---|---|---|
| January 5th | February 1st | February 15th |
| January 20th | February 1st | February 15th |
| February 15th | March 1st | March 15th |
Quarterly, first business day of following quarter:
| Purchase Date | Invoice Issue Date | Due Date |
|---|---|---|
| January 15th | April 1st | April 15th |
| February 20th | April 1st | April 15th |
| April 10th | July 1st | July 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_nameorganization_numbercountry
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
- Customer Checkout: configuration options, identity verification, and billing address details
- Merchant Initiated: create and pay invoices without customer interaction
- Invoice Delivery: control who delivers the invoice