Entur Developer
Partner
REST
Invoices

B2B Invoices

Server

B2B invoice operations for partners


Check credit for a business customer

GET
https://api.entur.io/sales
/v1/b2b/credit-check/{organisationNumber}

Checks whether a company is approved for invoice purchases and returns its available credit limit. The invoice provider may reject invoice creation if the purchase amount exceeds the company's available credit. Calling this before creating a B2B invoice is optional, but recommended to avoid a failed invoice creation.

Check credit for a business customer › path Parameters

organisationNumber
​string · pattern: ^[89][0-9]{8}$ · required · style: simple

Norwegian organisation number (9 digits, starting with 8 or 9)

Example: 817352812

Check credit for a business customer › Headers

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Check credit for a business customer › Responses

Credit check result

Result of a credit check for a company
organisationNumber
​string · required

Organisation number of the company

Example: 817352812
companyName
​string · required

Registered name of the company

Example: MONOZUKI AS
approved
​boolean · required

True if the company is approved for invoice purchases. If approved, verify that the order amount does not exceed either availableLimit or perOrderLimit before creating the order.

currency
​string · required

ISO 4217 currency code for the amounts

Example: NOK
availableLimit
​string · pattern: ^-?[0-9]+\.[0-9]{2}$ · required

Remaining credit for invoice purchases, in currency

Example: 487160.62
perOrderLimit
​string · pattern: ^-?[0-9]+\.[0-9]{2}$ · required

Maximum amount for a single order

Example: 487160.62
declineReasons
​string[]

Why the company was declined. Present only when approved is false, UNDEFINED if no specific reason is given. Values may be added over time, so handle unknown values.

Example: ["TOO_HIGH_RISK"]

Create a B2B invoice

POST
https://api.entur.io/sales
/v1/b2b/invoices

Creates a B2B invoice for an existing Entur order. The request must reference a payment transaction (via paymentId and transactionId) that was created in Entur's payment service with payment type TWO_B2B or TWO_B2B_CONSOLIDATED. The payment type determines how the invoice is issued: TWO_B2B invoices are issued immediately, while TWO_B2B_CONSOLIDATED invoices are created as drafts and not issued to the buyer until they are included in a consolidated invoice (see the consolidated invoices endpoint). Unless a separate agreement with Entur and the invoice provider has been made for the partner to handle buyer verification independently, the buyer must verify the purchase by navigating to the returned paymentUrl.

Create a B2B invoice › Headers

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Create a B2B invoice › Request Body

Request to create a B2B invoice
orderId
​string · required

The Entur order ID for which to create the invoice

Example: CPPT96C8
redirectUrl
​string · required

The URL the buyer is redirected to after completing verification with the invoice provider

Example: https://partner-app.example.com/payment/complete
paymentId
​integer · int64 · required

The payment ID associated with this invoice

Example: 436801
transactionId
​integer · int64 · required

The transaction ID from payment-service connected to this invoice. The transaction must have payment type TWO_B2B or TWO_B2B_CONSOLIDATED.

Example: 123123321
organisationNumber
​string · pattern: ^[89][0-9]{8}$ · required

Norwegian organisation number of the company being invoiced (9 digits, starting with 8 or 9). Company details such as name and address are automatically retrieved from Brønnøysundregistrene by the invoice provider.

Example: 817352812
​BuyerInfo · required

Contact information for the buyer

Create a B2B invoice › Responses

B2B invoice created

The created B2B invoice
paymentUrl
​string · required

URL the buyer must navigate to in order to verify the invoice purchase

Example: https://checkout.two.inc/mi/order/dLBPjwCr6UTf5nS9setTSv40UqSjDsE
invoiceId
​integer · int64 · required

Entur's internal ID of the created invoice

Example: 900001

Get a B2B invoice

GET
https://api.entur.io/sales
/v1/b2b/invoices/{invoiceId}

Returns a B2B invoice order belonging to the caller's organisation, with its status, lines and fees.

Get a B2B invoice › path Parameters

invoiceId
​integer · int64 · required · style: simple

Id of the B2B invoice order, as returned when it was created

Example: 900001

Get a B2B invoice › Headers

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Get a B2B invoice › Responses

The invoice

A B2B invoice order
invoiceId
​integer · int64 · required

Entur's id of the invoice

Example: 900001
orderId
​string · required

The Entur order the invoice belongs to

Example: CPPT96C8
invoiceType
​string · required

TWO_B2B for invoices invoiced on their own, TWO_B2B_CONSOLIDATED for invoices that are invoiced through a consolidated invoice

Example: TWO_B2B
status
​string · required

Status of the invoice. Current values:

  • PENDING: created, but not yet invoiced
  • INVOICED: invoiced to the buyer
  • AWAITING_CONSOLIDATION: ready to be included in a consolidated invoice
  • CONSOLIDATED: invoiced through a consolidated invoice, see consolidatedInvoiceId
  • PARTIALLY_CREDITED: part of the invoice has been credited
  • CREDITED: the whole invoice has been credited

New values may be added; clients must accept unknown values. Payment status is not included.

Example: INVOICED
totalAmount
​string · required

Sum of all lines and fees including VAT, net of credits

Example: 948.00
currency
​string · required

Currency in ISO 4217 format

Example: NOK
​B2bInvoiceLine[] · required
​B2bInvoiceFee[] · required
createdAt
​string · date-time · required

When the invoice was created

consolidatedInvoiceId
​integer · int64

Id of the consolidated invoice this invoice is part of. Set when the invoice is invoiced through a consolidated invoice, and remains set if the invoice is later credited.

Example: 900100
updatedAt
​string · date-time

When the invoice was last updated


Create a consolidated invoice

POST
https://api.entur.io/sales
/v1/b2b/consolidated-invoices

Consolidates one or more B2B invoice drafts into a single invoice, so the buyer receives one invoice for all of them. All referenced invoice orders must have been created with payment type TWO_B2B_CONSOLIDATED, belong to the same company, and not already be part of a consolidated invoice. The billing details of the first invoice order in the request are used as the template for the consolidated invoice. The consolidated invoice is issued immediately and cannot be undone.

Create a consolidated invoice › Headers

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Create a consolidated invoice › Request Body

Request to consolidate several B2B invoice orders into one invoice
invoiceIds
​integer[] · minItems: 1 · required

IDs of the B2B invoice orders to include, as returned when the orders were created. Each ID must appear only once.

Example: [900001,900002,900003]
reference
​string

Optional merchant reference, passed on to the invoice provider

Example: PROJECT-2026-10

Create a consolidated invoice › Responses

Consolidated invoice created

The created consolidated invoice
consolidatedInvoiceId
​integer · int64 · required

Entur's ID of the consolidated invoice

Example: 900100

Download the PDF of a B2B invoice

GET
https://api.entur.io/sales
/v1/b2b/invoices/{invoiceId}/pdf

Returns the invoice PDF for a B2B invoice order that is invoiced on its own. Invoice orders created for consolidated invoicing have no PDF of their own; fetch the PDF of the consolidated invoice instead.

Download the PDF of a B2B invoice › path Parameters

invoiceId
​integer · int64 · required · style: simple

Id of the B2B invoice order, as returned when it was created

Example: 900001

Download the PDF of a B2B invoice › query Parameters

lang
​string · enum · style: form · explode: true

Language of the PDF

Enum values:
nb_NO
en_US
sv_SE
Default: nb_NO
original
​boolean · style: form · explode: true

If the invoice has been credited, the credit note is returned by default. Set to true to get the original invoice instead.

Default: false

Download the PDF of a B2B invoice › Headers

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Download the PDF of a B2B invoice › Responses

The invoice as PDF

binary · application/pdf

Download the PDF of a consolidated invoice

GET
https://api.entur.io/sales
/v1/b2b/consolidated-invoices/{consolidatedInvoiceId}/pdf

Returns the invoice PDF for a consolidated invoice.

Download the PDF of a consolidated invoice › path Parameters

consolidatedInvoiceId
​integer · int64 · required · style: simple

Id of the consolidated invoice, as returned when it was created

Example: 900100

Download the PDF of a consolidated invoice › query Parameters

lang
​string · enum · style: form · explode: true

Language of the PDF

Enum values:
nb_NO
en_US
sv_SE
Default: nb_NO
original
​boolean · style: form · explode: true

If the invoice has been credited, the credit note is returned by default. Set to true to get the original invoice instead.

Default: false

Download the PDF of a consolidated invoice › Headers

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Download the PDF of a consolidated invoice › Responses

The invoice as PDF

binary · application/pdf

Did you find what you were looking for?