# Bank invoices (krafa)

> Let payers settle in their online bank. The claim is issued through your accounting provider and confirmed by webhook when paid.

Source: https://docs.borga.is/payments/bank-invoices

A bank invoice is an Icelandic krafa: a claim that appears in the payer's online banking (netbanki) and is paid from there. There is no card and no email. Payers who prefer it are often companies and public bodies, and it is the natural fit for invoice-style purchases.

Borga does not talk to the banks itself. The claim is created by your accounting provider, which is why a connected **PayDay** account is required. DK+ does not expose bank claims through its API, so merchants on DK+ cannot offer this method yet.

## Requirements

1. PayDay connected in the current mode under **Settings → Accounting system**.
2. Bank invoices switched on under **Settings → Bank invoice**. The same page sets the due date (default 14 days) and whether the bank-invoice tab comes first or second on the checkout.
3. A hosted session with `"bank_invoice"` in `enabled_methods`.

Sessions that ask for `bank_invoice` without these fail with [`bank_invoice_not_enabled`](/errors/bank_invoice_not_enabled), [`accounting_link_required`](/errors/accounting_link_required) or [`provider_no_bank_invoice`](/errors/provider_no_bank_invoice).

## Create the session

```ts Node.js
const session = await borga.paymentSessions.create({
  amount: 49900,
  currency: "ISK",
  enabled_methods: ["card", "bank_invoice"],
  // Optional. When supplied, the fields are shown locked in checkout.
  customer_email: "anna@example.is",
  customer_kennitala: "0101302989",
  return_url: "https://yoursite.is/order/complete",
  cancel_url: "https://yoursite.is/cart",
  external_reference: "invoice_2026_0142",
});
```
```bash curl
curl https://api.borga.is/v1/payment_sessions \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 49900,
    "currency": "ISK",
    "enabled_methods": ["card", "bank_invoice"],
    "customer_email": "anna@example.is",
    "customer_kennitala": "0101302989",
    "return_url": "https://yoursite.is/order/complete",
    "cancel_url": "https://yoursite.is/cart",
    "external_reference": "invoice_2026_0142"
  }'
```

`customer_email` and `customer_kennitala` are optional. When you supply them, the checkout shows them as locked fields so the claim is issued to the right person; when you leave them out, the payer types them in. The kennitala is checksum-validated on both sides, and an invalid one fails with [`invalid_kennitala`](/errors/invalid_kennitala).

## What the payer sees

On the checkout page the payer picks **Bank invoice**, confirms their kennitala and email, and submits. Borga creates the claim through PayDay and shows a confirmation with the payment reference and the account to pay into. The claim then appears in their netbanki, and they are redirected to `return_url` like any other payer.

## What you see

The session becomes `complete` immediately, but the payment stays `created` until the bank confirms payment. Borga polls PayDay every 15 minutes and, when the claim shows as paid, marks the payment `succeeded` and sends `payment.succeeded`. Expect this to take hours to days depending on when the payer pays.

Because of this delay:

- Your return page must handle `payment_status: "created"` gracefully. Say that the invoice has been sent and the order will be confirmed when paid.
- Fulfil only from the `payment.succeeded` webhook.
- Watch `invoice.voided` for claims that were cancelled in PayDay before payment.

The Invoice object linked to the payment carries `sent_to_bank`, the payment reference and the creditor account, and the `invoice.created` event for a bank invoice includes them too.

## Subscriptions by bank invoice

Subscriptions can collect by bank invoice instead of card: create them with `collection_method: "send_invoice"` and a `days_until_due`. Each period Borga issues a claim through PayDay and marks the invoice paid when the bank confirms. See [Subscriptions](/billing/subscriptions).

## Fees

1.0% of the amount plus the bank's own claim fees, passed through at cost. No fee is charged if the claim is never paid.
