> ## 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.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.dintero.com/feedback

```json
{
  "path": "/docs/checkout/two",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Two B2B invoice payments

> Offer Two B2B invoice payments inside Dintero Checkout to give business buyers a simple, high-conversion checkout with deferred payment terms.

Two is a payment method tailored to handle businesses to business (B2B) payments. By adding Two into your Dintero checkout, you can offer customers a simple and high converting B2B payment method.

### Payment Types

| Payment Type      | Description                    | Use Case                        | EHF/ Electronic Invoice support      |
| ----------------- | ------------------------------ | ------------------------------- | ------------------------------------ |
| `two.invoice_b2b` | Business-to-business invoicing | One-time invoices to companies. | Norway, Sweden, Denmark and Finland. |

### How It Works

1. Customer selects "Two - Business Invoice" payment at checkout.
2. Billing information is collected (name, address, email, phone, country, organization number).
3. Order verification via company representatives (handled by Two)
4. A transaction is created in Dintero's system.
5. When the merchant captures the transaction, Two distributes the invoice to the customer.
6. Customer pays the invoice to Two via their bank.
7. Dintero settles the funds when they are received from Two.

### Configuration

Enable the Two payment type in the session configuration when creating a checkout session.

```
POST https://checkout.dintero.com/v1/sessions-profile
Authorization: Bearer <token>
Content-Type: application/json

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

#### Configuration Options

| Option           | Applies To | Type            | Description                                                |
| ---------------- | ---------- | --------------- | ---------------------------------------------------------- |
| `days_until_due` | All types  | Integer (0-365) | Number of days until the invoice is due. Default: 14 days. |

<Info>
  See related documentation for more information about creating payment sessions:

  * [Create a session](/docs/checkout/create-session)
  * [Checkout API reference](https://docs.dintero.com/payments-api.html#tag/session/operation/checkout_session_profile_post)
</Info>

### Verification

After the end user finishes the payment form in the Dintero checkout they are redirected to Two's *customer verification page*. The specific method Two employs (e.g., OTP via SMS/email, or Open Banking check) is determined dynamically by Two's risk assessment based on:

* The representative's details
* The buyer's company profile
* The order amount

If the customer completing the payment is not the correct stakeholder/legal representative of the company:

* The customer completing the payment needs to verify their identity
* A legal representative of the company must also verify — Two's hosted verification page will display a list of known legal representatives of the company. The customer can then contact one of those individuals and ask them to verify on their behalf. The legal rep receives a verification request (via SMS or email) and completes their own verification step.
* The order is only approved by Two once both the customer and a legal representative have completed verification. The payment is not rejected outright — the buyer is given the opportunity to get a legal rep to co-verify.

### Transaction Lifecycle

Two transactions are automatically authorized upon successful verification.

| State                   | Description                                                            |
| ----------------------- | ---------------------------------------------------------------------- |
| **AUTHORIZED**          | This is the initial successful state.                                  |
| **CAPTURED**            | Two will send an invoice to the customer's company.                    |
| **FAILED**              | Payment could not be created.                                          |
| **PARTIALLY\_REFUNDED** | A partial refund has been issued. The remaining amount is still valid. |
| **REFUNDED**            | The full transaction amount has been refunded.                         |
| **VOIDED**              | The transaction has been cancelled before it was captured.             |

```mermaid theme={null}
stateDiagram
    direction TB
    [*] --> AUTHORIZED
    [*] --> FAILED
    AUTHORIZED --> CAPTURED: Transaction Captured
    AUTHORIZED --> VOIDED: Transaction VOIDED
    CAPTURED --> PARTIALLY_REFUNDED: Partial refund
    CAPTURED --> REFUNDED: Full refund / cancel
```

#### Refunds and Cancellations

* To cancel an invoice, cancel (void) the transaction is in the **AUTHORIZED** state.
* Partial refunds can be issued while the transaction is in the **CAPTURED** state.
* For each refund on a transaction, a *credit note* is created and sent to the customer's company.

***

### Invoice Dates

* **Invoice issue date**: The date of the capture.
* **Invoice due date**: Issue date + `days_until_due` from capture (default: 14 days).

***

### Billing Address Requirements

Two requires a billing address with all payment types.

| Field                 | B2B                         |
| --------------------- | --------------------------- |
| `first_name`          | Required                    |
| `last_name`           | Required                    |
| `address_line`        | Required                    |
| `postal_code`         | Required                    |
| `country`             | Required (ISO 3166 alpha-2) |
| `phone_number`        | Required                    |
| `email`               | Required                    |
| `business_name`       | Required                    |
| `organization_number` | Required                    |

<Info>
  For Norway, the organization number is 9 digits. For Sweden, it is either 10 or 12 digits.
</Info>

### Liability

Unlike card-based payments, a `CAPTURED` status for Two does not mean the customer has paid — it means Two has sent the invoice to the customer's company. The customer still needs to pay the invoice via their bank. Funds are not guaranteed to arrive in the merchant's account until Two has collected payment and settled it to the merchant. If the customer does not pay, the merchant's receipt of funds depends on Two's collection process and the specific contract terms.
