Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dintero.com/llms.txt

Use this file to discover all available pages before exploring further.

Use this flow when customers select invoice payment during checkout. The customer provides their billing details, completes identity verification if required, and invoice delivery and collection are handled automatically.

How It Works

Step-by-Step Implementation

1. Configure Payment Types

Enable the payment types you need in your payment profile or session configuration:
{
  "configuration": {
    "kravia": {
      "type": "payment_type",
      "invoice_b2b": {
        "type": "payment_product_type",
        "enabled": true,
        "days_until_due": 14
      },
      "invoice_b2b_grouped": {
        "type": "payment_product_type",
        "enabled": true,
        "days_until_due": 14,
        "invoice_schedule": {
          "interval": "monthly"
        }
      },
      "invoice_b2c": {
        "type": "payment_product_type",
        "enabled": true,
        "days_until_due": 14
      }
    }
  }
}

2. Create Checkout Session

POST /v1/sessions-profile
Authorization: Bearer <token>
Content-Type: application/json

{
  "url": {
    "return_url": "https://example.com/accept",
    "callback_url": "https://example.com/callback"
  },
  "order": {
    "amount": 50000,
    "currency": "NOK",
    "vat_amount": 10000,
    "merchant_reference": "order-123",
    "items": [
      {
        "amount": 50000,
        "quantity": 1,
        "line_id": "1",
        "description": "Consulting services",
        "vat": 25,
        "id": "item-1"
      }
    ]
  },
  "configuration": {
    "kravia": {
      "type": "payment_type",
      "invoice_b2b": {
        "type": "payment_product_type",
        "enabled": true,
        "days_until_due": 14
      }
    }
  }
}

3. Customer Completes Checkout

The customer:
  1. Selects “Invoice” as payment method
  2. Enters billing address (see Billing Address Requirements)
  3. Completes BankID verification (if required)
  4. Invoice is created and Kravia begins delivery to the customer

4. Receive Transaction

After invoice creation, you receive a transaction with status AUTHORIZED. An INITIATE_CAPTURE event is added automatically to mark the start of Kravia’s delivery and collection. The status remains AUTHORIZED until the shopper pays the invoice.
{
  "id": "T12345",
  "status": "AUTHORIZED",
  "payment_product_type": "kravia.invoice_b2b",
  "metadata": {
    "kravia:invoice_number": "A1B2C-000001",
    "kravia:invoice_url": "https://checkout.dintero.com/transaction-attachments/..."
  },
  "events": [
    {
      "event": "AUTHORIZE",
      "metadata": {
        "kravia:invoice_date": "2026-01-15",
        "kravia:invoice_due_date": "2026-01-29",
        "kravia:invoice_number": "A1B2C-000001",
        "kravia:creditor_id": "12345",
        "kravia:debtor_id": "67890",
        "kravia:invoice_id": "98765",
        "kravia:case_number": "CASE-001"
      }
    },
    {
      "event": "INITIATE_CAPTURE"
    }
  ]
}
When Kravia confirms the shopper has paid, the transaction transitions to CAPTURED (or PARTIALLY_CAPTURED for partial payment) and a CAPTURE event is appended. See Transaction management for the shared lifecycle and event model.
The kravia:invoice_url is available for your reference. You can download the PDF for your records. Delivery to the customer is handled automatically.

Configuration Options

OptionApplies ToTypeDefaultDescription
enabledAllBooleanfalseEnable this payment type
days_until_dueAllInteger (0-365)14Days until invoice is due
require_identity_verificationAllBooleantrueRequire BankID verification
invoice_schedule.intervalB2B GroupedString"monthly"Billing cycle: "monthly" or "quarterly"
invoice_channelB2B, B2CString"kravia""kravia" for automatic delivery, "merchant" for merchant delivery

Identity Verification

Identity verification is required by default for all payment types and uses BankID. To disable it, set require_identity_verification: false on the payment type configuration.

Transaction Lifecycle

In the standard checkout flow, the transaction is AUTHORIZED when the invoice is created and an INITIATE_CAPTURE event is added as Kravia begins delivery. The transaction moves to CAPTURED once Kravia confirms the shopper has paid the invoice in full, or to PARTIALLY_CAPTURED for partial payment. See the transaction lifecycle in the overview for the full state diagram, and Transaction management for the shared capture/void/refund operations.

Cancellations

Refund is not supported for Kravia. To cancel an invoice, use POST /v1/transactions/{id}/void:
POST /v1/transactions/{transaction_id}/void
Authorization: Bearer <token>
Transaction statusEffect of void
AUTHORIZEDCancels the invoice with Kravia. Status changes to AUTHORIZATION_VOIDED.
PARTIALLY_CAPTUREDCancels the remaining unpaid amount with Kravia. Funds already in transit from the shopper are automatically refunded by Kravia.
CAPTUREDNot allowed — the shopper has already paid in full.
If the shopper overpays an invoice, Kravia automatically refunds the difference to the shopper. No merchant action is needed.
The /refund operation is not available for Kravia transactions.

Billing Address Requirements

B2C Invoices

Required fields: first_name, last_name, address_line, postal_code, country (ISO 3166 alpha-2), phone_number, email

B2B Invoices

All B2C fields plus: business_name, organization_number, and optionally customer_reference (a free-text reference field, also used for invoice grouping).
Organization numbers: Norway uses 9 digits, Sweden uses 10 or 12 digits.

Invoice Dates

Standard Invoices (B2B and B2C)

  • Issue date: transaction date
  • Due date: issue date + days_until_due (default: 14 days)

Grouped Invoices (B2B Grouped)

For grouped invoices, multiple purchases are consolidated into a single invoice per billing period. See Grouped Invoices for schedule details, customer grouping logic, and configuration.

See Also

Last modified on May 7, 2026